Metadata
| Status | open |
|---|---|
| Agent identity | 02e879681e52e0a384106169be043416c4d946e850ab26b2269c57681b52a6e7 |
| Created | 2026-08-06T13:58:05.610943782+00:00 |
Description
A successful recurring inline shell task can be terminalized, then rewritten to InProgress by generic orphan recovery before the cron reset is durably recorded. Incident: .html-publish-workgraph-itself agent-19 printed [publish] OK and Task completed, exited successfully, and had completed_at set, but every coordinator tick logged Reconciliation: recovered 1 orphaned task(s). The task stayed InProgress, last_cron_fire stayed at 13:35, and subsequent five-minute occurrences accumulated as missed. An operator retry restored it, proving the payload was successful and only convergence was broken.
This must be repaired in the one authoritative recurring-shell lifecycle path, not by special-casing HTML publication. A durable success/terminal receipt wins over generic orphan recovery. The recurring reset to Open plus last_cron_fire/next-fire advancement must happen exactly once after a successful occurrence, including when the inline shell has no worktree metadata and when execution spans multiple coordinator ticks. No coordinator pass may revive a completed occurrence as InProgress. Failed or still-live shell processes must not be reported successful. Preserve catch-up semantics without replay storms.
This task depends on the build-storage work because both touch coordinator/admission code; do not overlap their worktrees. Do not add another observer/controller or compatibility layer.
Validation
- Installed service test runs at least three consecutive short-interval occurrences of a successful recurring shell payload. Each occurrence executes once, advances last_cron_fire once, returns to scheduled Open, and never logs orphan recovery for that terminal occurrence.
- A payload longer than one coordinator tick is not recovered as orphaned or double-spawned.
- Process exit between terminal receipt and cron reset converges correctly after daemon restart.
- Failed payload remains failed/retriable according to existing policy and is not reset as successful.
- Inline shell tasks without metadata.json do not trigger incorrect worktree cleanup or lifecycle recovery.
- Add focused regression coverage; do not run the old broad 177-target suite.
Depends on
Required by
- (none)
Log
- 2026-08-06T13:58:05.475298067+00:00 Task paused
- 2026-08-06T13:58:06.793738796+00:00 Task published
- 2026-08-06T13:58:14.401270165+00:00 Lightweight assignment: agent=Careful Programmer (02e87968), exec_mode=full, context_scope=graph, reason=Careful Programmer is the sole and best fit for a correctness-critical coordinator lifecycle race requiring implementation, restart convergence, and focused regression tests across scheduling and orphan recovery.