~bigbes/agents-dev · parade

main · last commit 13 days ago · 7g0stsfu

← Back to the parade

ah-xuc.9 reconcile: publish review branch, watchdog on stale events, Telegram notifications Past Stand

status: closed P2 feature @Eugene Blikh
bd reopen ah-xuc.9
Created byEugene Blikh
Ownerbigbes@gmail.com
Created2026-07-13T05:16:07Z
Started2026-07-13T06:57:43Z
Updated2026-07-13T07:35:20Z
Closed2026-07-13T07:35:20Z
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.
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.

Depends on

  • ah-xuc.8 — reconcile: spec-driven claim, Triage bounce, parked buckets, per-run timeout blocks closed
  • ah-xuc — Stage 2: webhooks, Task Spec, full buckets, Telegram, srht push, watchdog parent-child closed

Depended on by

  • ah-xuc.12 — docs: sync SPEC with Stage 2 behavior blocks
  • ah-xuc.10 — cmd/agenthubd: wire webhook secret and Telegram notifier blocks

Prerequisite chain — everything this waits on, transitively

  • 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

Unblocks — everything waiting on this, transitively

  • ah-xuc.12 — docs: sync SPEC with Stage 2 behavior blocks closed
  • ah-xuc.10 — cmd/agenthubd: wire webhook secret and Telegram notifier blocks closed
  • ah-xuc.11 — e2e: Stage 2 flows — webhook poke, Triage bounce, skills, publish, watchdog, Telegram blocks closed

No comments.

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
  • Eugene Blikh added under epic ah-xuc · 2026-07-13T08:16:06Z
  • Eugene Blikh created the issue · 2026-07-13T08:16:06Z
  • Eugene Blikh added dependency on ah-xuc.8 · 2026-07-13T08:16:52Z
  • Eugene Blikh ah-xuc.10 now depends on this · 2026-07-13T08:16:53Z
  • Eugene Blikh ah-xuc.12 now depends on this · 2026-07-13T08:16:55Z
  • Eugene Blikh updated notes to 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. · 2026-07-13T08:19:12Z
  • Eugene Blikh claimed · 2026-07-13T09:57:42Z
  • Eugene Blikh closed the issue · 2026-07-13T10:35:19Z
    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
  • Eugene Blikh added label milestone:stage-2 · 2026-07-20T03:08:47Z
  • Eugene Blikh removed label milestone:stage-2 · 2026-07-20T03:10:26Z
Stored rows — what this pane was built from, as read
issues 1 row
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
dependencies 4 rows
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
events 6 rows
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