Skip to content

Continue on non-fatal reactor errors and skip empty checkpoints - #892

Merged
TheGreatAxios merged 3 commits into
mainfrom
cl-7641-fatal-checkpoint
Sep 11, 2026
Merged

Continue on non-fatal reactor errors and skip empty checkpoints#892
TheGreatAxios merged 3 commits into
mainfrom
cl-7641-fatal-checkpoint

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Non-fatal reactor.error (fatal: false) keeps the turn running: turnStateFromEvent does not set status: "failed", the run sink does not sticky-fail, and the TUI paints the error without idling.
  • Empty managed cycle checkpoints skip the git commit instead of creating a new empty commit or staging session junk such as partial.jsonl.

Verification

  • bun run lint passes (exit 0)
  • bun run typecheck passes (exit 0)
  • bun run build passes (exit 0)
  • Targeted tests for non-fatal reactor errors and empty checkpoint skip pass (exit 0)
  • bun run check exits 1 on four tests that also fail on origin/main (torn-base heal write, compact-commit hook, two assembleChatAgent mocks)

Fixes CL-7641

@linear-code

linear-code Bot commented Sep 11, 2026

Copy link
Copy Markdown

CL-7641

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review · Comment

Non-fatal reactor.error continues the run and empty checkpoints skip; the TUI mapper still clears hadTextDelta on that path.

Findings

  • src/tui/stream-event-map.ts:578 — continue branch still sets hadTextDelta = false, then returns an error event. After streamed text deltas, a later connector.reply can paint a second full assistant row. Preserve hadTextDelta on the non-fatal path.

Notes

  • Fail-closed fatal: false gate is correct. Empty-checkpoint skip is load-bearing because isomorphic-git still mints a new oid on an unchanged tree.

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critic · Comment

isReactorErrorFatal is fail-closed; unique commit matches the title.

Findings

  • src/tui/stream-event-map.ts:578 — non-fatal mapper clears hadTextDelta. Sequence: text deltas → { fatal: false } after checkpoint → connector.reply treated as unpainted. Tests only assert “error without idle.”

Notes

  • stagedRewriteliveTurnRefs copies the success path; skip test with junk partial.jsonl does not prove hash equality.

@TheGreatAxios
TheGreatAxios force-pushed the cl-7641-fatal-checkpoint branch 2 times, most recently from 1bbf919 to 45b18f1 Compare September 11, 2026 03:11
reactor.error with fatal:false is a recoverable stream signal; treating it
as terminal idle/failed the TUI and run sink while the reactor kept going.
Empty managed checkpoints were also creating new commits and risking
session junk like partial.jsonl riding along — skip when no allowlisted
path differs from HEAD.
@TheGreatAxios
TheGreatAxios force-pushed the cl-7641-fatal-checkpoint branch from 45b18f1 to 8af755b Compare September 11, 2026 03:23
Empty managed checkpoints skip the git commit when no allowlisted
path differs from HEAD. A staged rewrite is still unpublished on
disk at that check, so skipping would publish it in memory without
writing or committing. Only skip when nothing is staged to land.
@TheGreatAxios
TheGreatAxios merged commit e68d109 into main Sep 11, 2026
9 checks passed
@TheGreatAxios
TheGreatAxios deleted the cl-7641-fatal-checkpoint branch September 11, 2026 03:33
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.

1 participant