Skip to content

POC: shorter notes on a task that ends for good - #3626

Closed
cursor[bot] wants to merge 3 commits into
fix/FIX-2080from
poc/shorter-ends-for-good
Closed

cursor[bot] wants to merge 3 commits into
fix/FIX-2080from
poc/shorter-ends-for-good

Conversation

@cursor

@cursor cursor Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

This PR does not merge. It is a smaller shape of #3623 (a3474adb6). Fold 128e7e0cc onto that head. Do not reset onto this branch.

What this subtracts

Net −35 (12 insertions, 47 deletions). Comments that restated the recorder, plus an unused cause option.

  • TaskEndsForGoodError's class note is four lines: the next attempt would end the same way, the recorder ends the row under the worker's claim, and ending defaults to errored. The field note that repeated the union is gone. cause is gone; nothing passed it.
  • The two-line note above forGood is gone. It restated the class.
  • resolveTarget's noRetry note is one clause on the existing paragraph: terminal in both backings, whatever attempts are left.
  • HarnessRunRefused keeps what a refusal is. The recorder sentences that repeated refusalEnding are gone.
  • refusalEnding is one line: a cancel on a claim board reaches nobody, so that board ends errored; the fixed board stays cancelled.
  • The unwind note is one line and points at HarnessRunRefused.
  • The recorder test header is one line. The dependent-test comment that repeated the test name is gone.

What still passes

record-error-ends-for-good.test.ts: 3 passed. The only executable edit is super(message) with no cause. Default ending is still errored. Red check: defaulting it to cancelled failed the first test (status cancelled, expected errored). Restored. The harness files are comments only, so that suite was not re-run.

Left as recorded

The fixed board stays cancelled. The ending is chosen at the throw, in refusalEnding. The marker stays a general export. The constructor still requires the ending. The cancel arm, noRetry in resolveTarget, the docs, the changeset, and the assertions stay.

Tried and left: one recorded binding for the two return ternaries. It adds a line.

Close this PR unmerged after #3623 lands.

Open in Web View Automation 

claude and others added 3 commits October 21, 2026 20:04
…recorder

A refused harness run failed (claim board) or cancelled (fixed board) its own
row from the manager's error handler, a worker writing an ending outside the
claim gate and the drain (ER-1). The FIX-2087 closure sweep flags it at
manager.ts:2600.

The worker now says the failure is final instead of writing it: orchestration
exports TaskEndsForGoodError, and the error recorder ends the row on that
attempt under the worker's claim (fail with noRetry, or cancel when asked).
HarnessRunRefused extends it with the ending its board needs, so outcomes are
unchanged: errored on a board read from the claim, cancelled on the fixed board.

Diagnosis: the issue's symptom (cascades, debts and notices skipped) does not
reproduce on FIX-2080's branch. The collection's own fail/cancel already
reached endingOf there, and a probe showed the refused row's dependent
cancelled. What remained was the ER-1 violation itself, which the sweep is the
check for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaN4uTiYqiabCbsFLWM52A
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaN4uTiYqiabCbsFLWM52A
Comments that restated the recorder are one line or gone. TaskEndsForGoodError
no longer takes an unused cause. This branch does not merge.

Co-authored-by: Jake Hoffner <jhoffner@users.noreply.github.com>
@vercel

vercel Bot commented Oct 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated
flow-state-dev-docs Ignored Ignored Oct 21, 2026 8:24pm UTC
flow-state-dev-kitchen-sink Ignored Ignored Oct 21, 2026 8:24pm UTC
flow-state-dev-ui Ignored Ignored Oct 21, 2026 8:24pm UTC

Request Review

jhoffner pushed a commit that referenced this pull request Oct 21, 2026
…el arm

Review fixes on #3623:
- TaskEndsForGoodError carries the taskId its thrower holds, and the error
  recorder acts on it only for that row. A board nested inside a worker
  rethrows its worker's error on onError "fail"; the inner row's verdict no
  longer ends the outer row on its first attempt.
- The cancel arm goes through a new advisoryCancel, so a store that throws on
  a declined transition is contained as it is on fail. The fixed board's
  cancelled ending is kept.
- releaseRow passes noRetry for a for-good row; observe skips the retry-budget
  scan on a noRetry fail; attribute takes FailOptions (no cast).
- Changeset bumps swapped: harness-manager minor, orchestration patch.
- Comments trimmed along the lines of POC #3626; the unused cause option goes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaN4uTiYqiabCbsFLWM52A
@jhoffner jhoffner closed this Oct 21, 2026
jhoffner pushed a commit that referenced this pull request Oct 21, 2026
…el arm

Review fixes on #3623:
- TaskEndsForGoodError carries the taskId its thrower holds, and the error
  recorder acts on it only for that row. A board nested inside a worker
  rethrows its worker's error on onError "fail"; the inner row's verdict no
  longer ends the outer row on its first attempt.
- The cancel arm goes through a new advisoryCancel, so a store that throws on
  a declined transition is contained as it is on fail. The fixed board's
  cancelled ending is kept.
- releaseRow passes noRetry for a for-good row; observe skips the retry-budget
  scan on a noRetry fail; attribute takes FailOptions (no cast).
- Changeset bumps swapped: harness-manager minor, orchestration patch.
- Comments trimmed along the lines of POC #3626; the unused cause option goes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VaN4uTiYqiabCbsFLWM52A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants