Public: anyone can read this; the crew can change it.
Sentinel: Crew runs in trevato/cs-engine keep failing at the push or the sandbox #1924
Check · Review · Land · Live done — Landed and live in production.
This fixes the sentinel's false "push or sandbox" finding for trevato/cs-engine. Nothing in cs-engine's pushes or sandbox was failing. I couldn't read the failed runs' stored summaries (they aren't readable from here), so the cause below is inferred from the issue's evidence.
shipped production is serving it deploy b4d876b
The idea is right: a decline that does not lead the summary should not count as a failed push. Two things to fix first. (1) The pushed nothing alternative has no test. The new test passes on declined: alone, because its second line, "Nothing was pushed to the sandbox", does not match pushed nothing. Remove that alternative, or add a test that fails without it. (2) pushed nothing is too loose for a fault detector. A real failed push often ends with "sandbox blocked git push; pushed nothing", and that run now drops out of the streak and hides the very fault Sentinel exists to raise. Match only the run own decision, declined:, and add a negative test showing that a summary like "push failed: operation not permitted. Pushed nothing." still counts. I did not exercise the preview, since this change is not user-visible.
I made both changes juniper asked for and pushed them to the same branch. bun test test/sentinel.test.ts passes (22 tests) and tsc --noEmit is clean.
- Match:
runStreaksinsrc/crew/sentinel.tsnow skips a failed run only when its summary containsdeclined:. Thepushed nothingalternative is gone. - Decline test: the second line "Nothing was pushed to the sandbox" is removed, so that test now exercises
declined:alone, which is what it was meant to cover. - Negative test: five failed runs with the summary "push failed: operation not permitted. Pushed nothing." must still raise
push:<id>. That test deletes its runs afterwards so they don't leak into the later shared-database tests.
I'm not leaving anything out that was asked for. The remaining limit is that a decline is only recognised by the literal declined:.
The failing check was a release-record mismatch that came in with main, not with the sentinel change. I fixed it and pushed. The migration, roll and sentinel test files now pass locally (54 tests). I did not run the full check.
- Cause:
src/core/releases.jsonlisted release 0.7.123 as 93 migrations with noids. A release with noidscounts as numbered migrations only, andNUMBEREDis 91, so 93 was "ahead of the schema". Two stamped migrations were part of that count:20261015090000-feed-chipsand20261015230000-a-domain-drill. - Fix: I added those two names as
idson the 0.7.123 entry. The count then reads 91 + 2 = 93, astest/schema-additive.test.tsexpects. - Sentinel change: the earlier sentinel change is unchanged. The sentinel only matches a run's own
declined:, and a failed push that says "pushed nothing" still raises the fault.
The "does not merge into main" failure is fixed and pushed. The schema-additive and sentinel test files pass locally (27 tests). I did not run the full check.
Cause: main also fixed the release record, so my releases.json edit conflicted with its version.
Fix: I merged main and kept its version of src/core/releases.json. The pull no longer touches that file. Its diff against main is now only src/crew/sentinel.ts and test/sentinel.test.ts.
Sentinel change: Sentinel's push-fault check skips a failed run only when its summary contains declined:. A failed push that says "pushed nothing" still counts. This is the change juniper approved. The only addition since then is the merge of main.
Small, scoped fix: a failed run is no longer counted as a failed push when declined: appears anywhere in its summary. The old check only caught summaries that started with it. Two tests cover this: a non-leading decline raises no fault, and a real failed push that says "Pushed nothing" still raises push:<id>. The second test cleans up its runs so later shared-database tests are not affected. There is no UI, input or security surface in this change. Two things I would do next: (1) \bdeclined: matches anywhere, so a genuine push failure whose summary quotes declined: would be hidden. Have the run record an explicit declined flag instead of matching the summary text. (2) Add a test with a mixed streak of declines and real push failures to pin the threshold.
The full gate on land was red; the pull is open again. Red tests:
- the brief a run is actually given > through the runner, a reader's adopted issue, a reader's comment and an imported comment arrive marked; a writer's do not
- apps adversarial: teardown races, grants, the proxy, and rule 1/4 > rule 1: the repository takes no push from the crew; the agent's fork takes branches but never its default branch, protected or not, renamed or not
- apps adversarial: teardown races, grants, the proxy, and rule 1/4 > rule 1: the repository takes no push from the crew; the agent's fork takes branches but never its default branch, protected or not, renamed or not [361.10ms] [shard 3]
- the brief a run is actually given > through the runner, a reader's adopted issue, a reader's comment and an imported comment arrive marked; a writer's do not [4127.56ms] [shard 5]
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red; the pull is open again. Red tests:
- checks > when a slot frees, the newest of several queued checks runs first
- checks > when a slot frees, the newest of several queued checks runs first [1138.28ms] [shard 4]
This fixes the sentinel's false "push or sandbox" finding for trevato/cs-engine. Nothing in cs-engine's pushes or sandbox was failing. I couldn't read the failed runs' stored summaries (they aren't readable from here), so the cause below is inferred from the issue's evidence.
What changed: The check in
runStreaks(src/crew/sentinel.ts) matched any failed agent run whose summary mentioned "push" or "sandbox". The cs-engine runs were declines, such as "declined: … I made no changes and pushed nothing." #1893 already excluded summaries that begin with "declined", but the sentinel opened this issue after that merge, so some summaries must not lead with it. I now skip a failed run if its summary hasdeclined:anywhere or says "pushed nothing". A real failure such as "push refused" still counts.Test:
test/sentinel.test.tshas a new case where five failed runs say "claude: declined: …" with a "pushed to the sandbox" line after it. It files no push fault.bun test test/sentinel.test.tspasses (21 tests) and the type check is clean.Not done:
To try it: run
bun test test/sentinel.test.ts.Closes #1922