Public: anyone can read this; the crew can change it.

Sentinel: Crew runs in trevato/deal-clock keep failing at the push or the sandbox #18076

opened this

Merged 8h 12m ago, live in production

The sentinel no longer counts a run the provider cut short as a push failure, so this issue's three example runs would not be filed again.

Notes

opened this

The sentinel no longer counts a run the provider cut short as a push failure, so this issue's three example runs would not be filed again. I ran only the two sentinel test files (they pass) and bun x tsc --noEmit; the full suite and the dead-code, module-state and timed-job checks were not run here and are left to the forge's check on this push.

Cause. The summary on those runs reads interrupted: provider limit, resumes 05:10 UTC — no changes pushed: API Error: 402 …. The push finder in src/crew/sentinel.ts matches on the word "push", and "no changes pushed" contains it. Nothing failed at the push in those runs: the provider was out of credit and the clock resumes them.

Change.

  • isInterruptedSummary in src/crew/interrupted.ts checks for the interrupted: prefix that interruptedSummary writes.
  • The push finder in src/crew/sentinel.ts now skips such runs.
  • A real push failed: … summary, including one that names a network error, still counts.
  • New test test/sentinel-interrupted.test.ts plants five interrupted runs and sees no push: finding. It then plants five real push failures and sees the finding. I did not run it against the old code to confirm it fails there.

Not done.

  • The 402 itself ("fewer max_tokens … can only afford 4000"). The runs resume once credit returns, and src/runs/end_why.ts already words a spent credit for people. Fixing credit or token limits is a separate issue.
  • Terminal and how-to doors. This changes the sentinel's filing logic only, with no page, action, API route or MCP tool, so no src/tui/ or docs/features/ change.

I reused no existing function. The gate notes my test's plant helper looks like the one in test/sentinel.test.ts; I left it separate because that one is private to its file.

To try it, run bun test test/sentinel-interrupted.test.ts test/sentinel-private.test.ts.

🤖 Generated with Claude Code

Closes #18068

commented

The sentinel no longer counts a run the provider cut short as a push failure, so this issue's three example runs would not be filed again. I ran only the two sentinel test files (they pass) and bun x tsc --noEmit; the full suite and the dead-code, module-state and timed-job checks were not run here and are left to the forge's check on this push.

Cause. The summary on those runs reads interrupted: provider limit, resumes 05:10 UTC — no changes pushed: API Error: 402 …. The push finder in src/crew/sentinel.ts matches on the word "push", and "no changes pushed" contains it. Nothing failed at the push in those runs: the provider was out of credit and the clock resumes them.

Change.

  • isInterruptedSummary in src/crew/interrupted.ts checks for the interrupted: prefix that interruptedSummary writes.
  • The push finder in src/crew/sentinel.ts now skips such runs.
  • A real push failed: … summary, including one that names a network error, still counts.
  • New test test/sentinel-interrupted.test.ts plants five interrupted runs and sees no push: finding. It then plants five real push failures and sees the finding. I did not run it against the old code to confirm it fails there.

Not done.

  • The 402 itself ("fewer max_tokens … can only afford 4000"). The runs resume once credit returns, and src/runs/end_why.ts already words a spent credit for people. Fixing credit or token limits is a separate issue.
  • Terminal and how-to doors. This changes the sentinel's filing logic only, with no page, action, API route or MCP tool, so no src/tui/ or docs/features/ change.

I reused no existing function. The gate notes my test's plant helper looks like the one in test/sentinel.test.ts; I left it separate because that one is private to its file.

To try it, run bun test test/sentinel-interrupted.test.ts test/sentinel-private.test.ts.

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs