main · last commit
13 days ago ·
7g0stsfu
ah-xuc.9 reconcile: publish review branch, watchdog on stale events, Telegram notifications
Past Stand
bd reopen ah-xuc.9
| Created by | Eugene Blikh |
| Owner | bigbes@gmail.com |
| Created | 2026-07-13T05:16:07Z |
| Started | 2026-07-13T06:57:43Z |
| Updated | 2026-07-13T07:35:20Z |
| Closed | 2026-07-13T07:35:20Z |
Finalize-path integration of Stage 2. Starts only after the claim-path bead is committed (same package). Publish: in finalize, on the success path with moveCard set, call runner.Publish before posting the In Review comment. Zero PublishInfo = not configured, plain comment. Success adds a review link line (WebURL, falling back to RemoteURL plus branch) and appends event published. Failure degrades: the comment still posts with a push-failed line carrying the error, event publish_failed (deduped). A refinalize repeats the push — pushing an up-to-date branch is idempotent and fine. Watchdog: in the check() running arm, when cfg.StallTimeout > 0 and now minus max(st.LastEvent, run.StartedAt) exceeds StallTimeout, the run is stalled: kill and finalize with OutcomeStalled, exit -1 (share the timeoutKill shape). The neither-state arm stays deadline-only — no events are observable there. failureComment renders the stalled outcome distinctly (agent went silent, not merely slow). Notifications: Notify best-effort — log on error, never gate the flow, guard the nil notifier — after a successful move plus comment: finalize with moveCard (success and failure including timeout and stalled) and the spec bounce. Text: outcome emoji, task id and title, outcome word, cost when known, and the human task link built from vikunja web_url. Tests with fakes: the In Review comment contains the review link; publish failure still posts the comment; the stall kill fires just past the boundary and not before; a run with events flowing but past run.Timeout still dies by deadline; notify recorded after move and comment in that order; nil notifier safe; a notify failure does not fail finalize.
go test ./internal/reconcile/... green, go vet clean; ordering asserted move then comment then notify; stalled and timeout outcomes distinguishable in comments, events, and notifications
Coordinator refinement: publishing arrives via a new optional reconcile Deps field of type ports.Publisher (nil-guarded like Notifier); finalize publishes only when the field is non-nil. cmd wires the runner into it in ah-xuc.10.
ah-xuc.8
— reconcile: spec-driven claim, Triage bounce, parked buckets, per-run timeout
blocks
closed
ah-xuc.2
— internal/spec: Task Spec frontmatter parse, type-label defaults, validation
blocks
closed
ah-xuc
— Stage 2: webhooks, Task Spec, full buckets, Telegram, srht push, watchdog
parent-child
closed
ah-xuc.1
— Stage 2 foundation: domain buckets/outcome, ports contracts, config surface
blocks
closed
ah-xuc.3
— vikunja: fetch task labels into BoardTask.Labels
blocks
closed
ah-xuc.4
— store: migration v2 — per-run timeout column
blocks
closed
| id | ah-xuc.9 |
| content_hash | 5c6568a5b55170ea70ba05fb8c0af96dcfaf33b977424934bdb124f8c46e5c10 |
| title | reconcile: publish review branch, watchdog on stale events, Telegram notifications |
| description | Finalize-path integration of Stage 2. Starts only after the claim-path bead is committed (same package). Publish: in finalize, on the success path with moveCard set, call runner.Publish before posting the In Review comment. Zero PublishInfo = not configured, plain comment. Success adds a review link line (WebURL, falling back to RemoteURL plus branch) and appends event published. Failure degrades: the comment still posts with a push-failed line carrying the error, event publish_failed (deduped). A refinalize repeats the push — pushing an up-to-date branch is idempotent and fine. Watchdog: in the check() running arm, when cfg.StallTimeout > 0 and now minus max(st.LastEvent, run.StartedAt) exceeds StallTimeout, the run is stalled: kill and finalize with OutcomeStalled, exit -1 (share the timeoutKill shape). The neither-state arm stays deadline-only — no events are observable there. failureComment renders the stalled outcome distinctly (agent went silent, not merely slow). Notifications: Notify best-effort — log on error, never gate the flow, guard the nil notifier — after a successful move plus comment: finalize with moveCard (success and failure including timeout and stalled) and the spec bounce. Text: outcome emoji, task id and title, outcome word, cost when known, and the human task link built from vikunja web_url. Tests with fakes: the In Review comment contains the review link; publish failure still posts the comment; the stall kill fires just past the boundary and not before; a run with events flowing but past run.Timeout still dies by deadline; notify recorded after move and comment in that order; nil notifier safe; a notify failure does not fail finalize. |
| design | |
| acceptance_criteria | go test ./internal/reconcile/... green, go vet clean; ordering asserted move then comment then notify; stalled and timeout outcomes distinguishable in comments, events, and notifications |
| notes | Coordinator refinement: publishing arrives via a new optional reconcile Deps field of type ports.Publisher (nil-guarded like Notifier); finalize publishes only when the field is non-nil. cmd wires the runner into it in ah-xuc.10. |
| status | closed |
| priority | 2 |
| issue_type | feature |
| assignee | Eugene Blikh |
| estimated_minutes | NULL |
| created_at | 2026-07-13T05:16:07Z |
| created_by | Eugene Blikh |
| owner | bigbes@gmail.com |
| updated_at | 2026-07-13T07:35:20Z |
| closed_at | 2026-07-13T07:35:20Z |
| closed_by_session | |
| external_ref | NULL |
| spec_id | |
| compaction_level | 0 |
| compacted_at | NULL |
| compacted_at_commit | NULL |
| original_size | NULL |
| sender | |
| ephemeral | 0 |
| wisp_type | |
| pinned | 0 |
| is_template | 0 |
| mol_type | |
| work_type | |
| source_system | |
| metadata | �{} |
| source_repo | |
| close_reason | d5d1efc + 64a7216 (review fix: bounded publish ctx via publish_timeout knob, zero-delta recorder covers publish/notify); reviewer merge-ready after fix, validator 10/10 with all 24 subtests by name |
| event_kind | |
| actor | |
| target | |
| payload | |
| await_type | |
| await_id | |
| timeout_ns | 0 |
| waiters | |
| hook_bead | |
| role_bead | |
| agent_state | |
| last_activity | NULL |
| role_type | |
| rig | |
| due_at | NULL |
| defer_until | NULL |
| no_history | 0 |
| started_at | 2026-07-13T06:57:43Z |
| is_blocked | 0 |
| id | 3785cc92-86f6-58d9-81c6-642d4811cc8f |
| issue_id | ah-xuc.12 |
| type | blocks |
| created_at | 2026-07-13T08:16:55Z |
| created_by | Eugene Blikh |
| metadata | �{} |
| thread_id | |
| depends_on_issue_id | ah-xuc.9 |
| depends_on_wisp_id | NULL |
| depends_on_external | NULL |
| id | 7766244e-039d-5420-8a40-8c6443c17506 |
| issue_id | ah-xuc.9 |
| type | blocks |
| created_at | 2026-07-13T08:16:52Z |
| created_by | Eugene Blikh |
| metadata | �{} |
| thread_id | |
| depends_on_issue_id | ah-xuc.8 |
| depends_on_wisp_id | NULL |
| depends_on_external | NULL |
| id | d8b95e75-79d8-555c-941d-5259c652680e |
| issue_id | ah-xuc.9 |
| type | parent-child |
| created_at | 2026-07-13T08:16:06Z |
| created_by | Eugene Blikh |
| metadata | �{} |
| thread_id | |
| depends_on_issue_id | ah-xuc |
| depends_on_wisp_id | NULL |
| depends_on_external | NULL |
| id | dc36e825-0149-5e11-aac4-d2d8f03dd64c |
| issue_id | ah-xuc.10 |
| type | blocks |
| created_at | 2026-07-13T08:16:53Z |
| created_by | Eugene Blikh |
| metadata | �{} |
| thread_id | |
| depends_on_issue_id | ah-xuc.9 |
| depends_on_wisp_id | NULL |
| depends_on_external | NULL |
| id | 019f59e7-6c40-7cb2-92fa-a802d0ab18d0 |
| issue_id | ah-xuc.9 |
| event_type | created |
| actor | Eugene Blikh |
| old_value | |
| new_value | |
| comment | NULL |
| created_at | 2026-07-13T08:16:06Z |
| id | 019f59ea-4114-7f0f-9c0f-7c69d020c13a |
| issue_id | ah-xuc.9 |
| event_type | updated |
| actor | Eugene Blikh |
| old_value | {"id":"ah-xuc.9","title":"reconcile: publish review branch, watchdog on stale events, Telegram notifications","description":"Finalize-path integration of Stage 2. Starts only after the claim-path bead is committed (same package).\n\nPublish: in finalize, on the success path with moveCard set, call runner.Publish before posting the In Review comment. Zero PublishInfo = not configured, plain comment. Success adds a review link line (WebURL, falling back to RemoteURL plus branch) and appends event published. Failure degrades: the comment still posts with a push-failed line carrying the error, event publish_failed (deduped). A refinalize repeats the push — pushing an up-to-date branch is idempotent and fine.\n\nWatchdog: in the check() running arm, when cfg.StallTimeout \u003e 0 and now minus max(st.LastEvent, run.StartedAt) exceeds StallTimeout, the run is stalled: kill and finalize with OutcomeStalled, exit -1 (share the timeoutKill shape). The neither-state arm stays deadline-only — no events are observable there. failureComment renders the stalled outcome distinctly (agent went silent, not merely slow).\n\nNotifications: Notify best-effort — log on error, never gate the flow, guard the nil notifier — after a successful move plus comment: finalize with moveCard (success and failure including timeout and stalled) and the spec bounce. Text: outcome emoji, task id and title, outcome word, cost when known, and the human task link built from vikunja web_url.\n\nTests with fakes: the In Review comment contains the review link; publish failure still posts the comment; the stall kill fires just past the boundary and not before; a run with events flowing but past run.Timeout still dies by deadline; notify recorded after move and comment in that order; nil notifier safe; a notify failure does not fail finalize.","acceptance_criteria":"go test ./internal/reconcile/... green, go vet clean; ordering asserted move then comment then notify; stalled and timeout outcomes distinguishable in comments, events, and notifications","status":"open","priority":2,"issue_type":"feature","owner":"bigbes@gmail.com","created_at":"2026-07-13T05:16:07Z","created_by":"Eugene Blikh","updated_at":"2026-07-13T05:16:07Z"} |
| new_value | {"notes":"Coordinator refinement: publishing arrives via a new optional reconcile Deps field of type ports.Publisher (nil-guarded like Notifier); finalize publishes only when the field is non-nil. cmd wires the runner into it in ah-xuc.10."} |
| comment | NULL |
| created_at | 2026-07-13T08:19:12Z |
| id | 019f5a44-70df-70e2-8e61-bd0f63c34013 |
| issue_id | ah-xuc.9 |
| event_type | claimed |
| actor | Eugene Blikh |
| old_value | {"id":"ah-xuc.9","title":"reconcile: publish review branch, watchdog on stale events, Telegram notifications","description":"Finalize-path integration of Stage 2. Starts only after the claim-path bead is committed (same package).\n\nPublish: in finalize, on the success path with moveCard set, call runner.Publish before posting the In Review comment. Zero PublishInfo = not configured, plain comment. Success adds a review link line (WebURL, falling back to RemoteURL plus branch) and appends event published. Failure degrades: the comment still posts with a push-failed line carrying the error, event publish_failed (deduped). A refinalize repeats the push — pushing an up-to-date branch is idempotent and fine.\n\nWatchdog: in the check() running arm, when cfg.StallTimeout \u003e 0 and now minus max(st.LastEvent, run.StartedAt) exceeds StallTimeout, the run is stalled: kill and finalize with OutcomeStalled, exit -1 (share the timeoutKill shape). The neither-state arm stays deadline-only — no events are observable there. failureComment renders the stalled outcome distinctly (agent went silent, not merely slow).\n\nNotifications: Notify best-effort — log on error, never gate the flow, guard the nil notifier — after a successful move plus comment: finalize with moveCard (success and failure including timeout and stalled) and the spec bounce. Text: outcome emoji, task id and title, outcome word, cost when known, and the human task link built from vikunja web_url.\n\nTests with fakes: the In Review comment contains the review link; publish failure still posts the comment; the stall kill fires just past the boundary and not before; a run with events flowing but past run.Timeout still dies by deadline; notify recorded after move and comment in that order; nil notifier safe; a notify failure does not fail finalize.","acceptance_criteria":"go test ./internal/reconcile/... green, go vet clean; ordering asserted move then comment then notify; stalled and timeout outcomes distinguishable in comments, events, and notifications","notes":"Coordinator refinement: publishing arrives via a new optional reconcile Deps field of type ports.Publisher (nil-guarded like Notifier); finalize publishes only when the field is non-nil. cmd wires the runner into it in ah-xuc.10.","status":"open","priority":2,"issue_type":"feature","owner":"bigbes@gmail.com","created_at":"2026-07-13T05:16:07Z","created_by":"Eugene Blikh","updated_at":"2026-07-13T05:19:12Z"} |
| new_value | {"assignee":"Eugene Blikh","status":"in_progress"} |
| comment | NULL |
| created_at | 2026-07-13T09:57:42Z |
| id | 019f5a66-e2bb-700b-b967-5640052f29ff |
| issue_id | ah-xuc.9 |
| event_type | closed |
| actor | Eugene Blikh |
| old_value | |
| new_value | d5d1efc + 64a7216 (review fix: bounded publish ctx via publish_timeout knob, zero-delta recorder covers publish/notify); reviewer merge-ready after fix, validator 10/10 with all 24 subtests by name |
| comment | NULL |
| created_at | 2026-07-13T10:35:19Z |
| id | 019f7cda-9350-70cb-9a18-7474bbec562c |
| issue_id | ah-xuc.9 |
| event_type | label_added |
| actor | Eugene Blikh |
| old_value | NULL |
| new_value | NULL |
| comment | Added label: milestone:stage-2 |
| created_at | 2026-07-20T03:08:47Z |
| id | 019f7cdc-174d-756e-8c70-46b0565c47eb |
| issue_id | ah-xuc.9 |
| event_type | label_removed |
| actor | Eugene Blikh |
| old_value | NULL |
| new_value | NULL |
| comment | Removed label: milestone:stage-2 |
| created_at | 2026-07-20T03:10:26Z |
No comments.
Close reason