Retrying a task never re-checks that its forge issue is still open #2009

Open
opened 2026-11-14 16:45:08 +00:00 by sam · 0 comments
Owner

Observed

Task 471 (sam/archie, "Chat composer: 'More' button does not work", workflow tdd, attempt 4) was retried on 2026-11-14T16:41:17Z by d898c8c8-47f4-5d6c-945a-2e7dc98ca1c1 (user) and went straight into a full run:

2026-11-14T16:41:17.309Z  task_retried   retried by d898c8c8-47f4-5d6c-945a-2e7dc98ca1c1 (user)
2026-11-14T16:41:19.387Z  identity_started
2026-11-14T16:41:20.480Z  config_captured
2026-11-14T16:41:20.509Z  stage_start    repo.prepare
2026-11-14T16:41:20.517Z  stage_start    repo.tooling
2026-11-14T16:41:20.526Z  stage_start    gate.repository
2026-11-14T16:41:49.126Z  stage_start    baseline-fix

No stage in that sequence reads the issue. The published tdd steps as workflow_list reports them today are repo.prepare, repo.tooling, gate.repository, agent.run, agent.run, gate.repository, repo.commit, agent.run, repo.commit, repo.open-pr — none of them resolves the issue's state, and neither do implement's (repo.prepare, repo.tooling, gate.repository, agent.run, agent.run, repo.commit, repo.open-pr).

The task's source issue is #1862 (task 465 is titled "Fix #1862: Chat composer 'More' button does not work"). As of 2026-11-15 #1862 is not in sam/archie's open issue list, and the list is not truncated — the entries immediately either side (1864, 1858) are present. So the retried attempt is spending agent steps and a gate baseline repair (baseline-fix started 30s in) on an issue that appears already closed.

The earlier attempts show the same absence of a state check: parked 2026-11-12T13:41:13Z on pin workflow definition: workflow tdd is disabled, retried 2026-11-14T13:01:12Z, parked 2026-11-14T13:05:27Z on stage gate.repository: resolve baseline revision: exit status 128, retried again.

Expected

A task whose forge issue is closed is not run, or parks with a named reason, rather than burning a full pipeline and potentially opening a PR for work already done.

Where the check could go

  • Retry path: on task_retried, before identity_started, resolve the issue and refuse with something like issue #N is closed.
  • Spawn/intake path: same check before a task is created from a forge issue — adjacent to #470 ("Forge issue intake: an issue whose routed workflow is disabled still spawns a task"), which is the same class of missing pre-flight validation, and which also appears closed now (task 470 parked 2026-11-14T12:38:36Z).
  • Workflow-level guard: a step ahead of repo.prepare in the issue-driven workflows, so the guarantee holds regardless of how a run is started. This is the option that covers retries and intake with one change.

Not established

  • Whether first-time intake already checks issue state. Intake on this instance is label routing (bug→tdd, feature→feasibility, default triage) with no event bindings configured, and the chat tools cannot read the spawn path — this is inferred from task trails only.
  • Whether #1862 is closed on the forge itself: the open-issue list is the evidence, and a direct fetch of the issue returned 404, which proves nothing for a private repository.
  • Why task 471 shows running at attempt 4 with its run trail stopping at stage_start baseline-fix on 2026-11-14T16:41:49Z and no further events — may be a separate stall, reported here only because it is the run that exposed this.

Evidence gathered from run_events(471), task_list, workflow_list and issue_list on 2026-11-15.

## Observed Task **471** (`sam/archie`, "Chat composer: 'More' button does not work", workflow `tdd`, attempt 4) was retried on 2026-11-14T16:41:17Z by `d898c8c8-47f4-5d6c-945a-2e7dc98ca1c1 (user)` and went straight into a full run: ``` 2026-11-14T16:41:17.309Z task_retried retried by d898c8c8-47f4-5d6c-945a-2e7dc98ca1c1 (user) 2026-11-14T16:41:19.387Z identity_started 2026-11-14T16:41:20.480Z config_captured 2026-11-14T16:41:20.509Z stage_start repo.prepare 2026-11-14T16:41:20.517Z stage_start repo.tooling 2026-11-14T16:41:20.526Z stage_start gate.repository 2026-11-14T16:41:49.126Z stage_start baseline-fix ``` No stage in that sequence reads the issue. The published `tdd` steps as `workflow_list` reports them today are `repo.prepare`, `repo.tooling`, `gate.repository`, `agent.run`, `agent.run`, `gate.repository`, `repo.commit`, `agent.run`, `repo.commit`, `repo.open-pr` — none of them resolves the issue's state, and neither do `implement`'s (`repo.prepare`, `repo.tooling`, `gate.repository`, `agent.run`, `agent.run`, `repo.commit`, `repo.open-pr`). The task's source issue is #1862 (task 465 is titled "Fix #1862: Chat composer 'More' button does not work"). As of 2026-11-15 #1862 is not in `sam/archie`'s open issue list, and the list is not truncated — the entries immediately either side (1864, 1858) are present. So the retried attempt is spending agent steps and a gate baseline repair (`baseline-fix` started 30s in) on an issue that appears already closed. The earlier attempts show the same absence of a state check: parked 2026-11-12T13:41:13Z on `pin workflow definition: workflow tdd is disabled`, retried 2026-11-14T13:01:12Z, parked 2026-11-14T13:05:27Z on `stage gate.repository: resolve baseline revision: exit status 128`, retried again. ## Expected A task whose forge issue is closed is not run, or parks with a named reason, rather than burning a full pipeline and potentially opening a PR for work already done. ## Where the check could go - **Retry path**: on `task_retried`, before `identity_started`, resolve the issue and refuse with something like `issue #N is closed`. - **Spawn/intake path**: same check before a task is created from a forge issue — adjacent to #470 ("Forge issue intake: an issue whose routed workflow is disabled still spawns a task"), which is the same class of missing pre-flight validation, and which also appears closed now (task 470 parked 2026-11-14T12:38:36Z). - **Workflow-level guard**: a step ahead of `repo.prepare` in the issue-driven workflows, so the guarantee holds regardless of how a run is started. This is the option that covers retries and intake with one change. ## Not established - Whether first-time intake already checks issue state. Intake on this instance is label routing (`bug`→`tdd`, `feature`→`feasibility`, default `triage`) with no event bindings configured, and the chat tools cannot read the spawn path — this is inferred from task trails only. - Whether #1862 is closed on the forge itself: the open-issue list is the evidence, and a direct fetch of the issue returned 404, which proves nothing for a private repository. - Why task 471 shows `running` at attempt 4 with its run trail stopping at `stage_start baseline-fix` on 2026-11-14T16:41:49Z and no further events — may be a separate stall, reported here only because it is the run that exposed this. Evidence gathered from `run_events(471)`, `task_list`, `workflow_list` and `issue_list` on 2026-11-15.
sam added the mediumbug labels 2026-11-14 16:45:08 +00:00
sam added the deferred label 2026-11-15 17:26:08 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#2009