Repository navigation
fix: the served gate trusts only the runner's own marker, and a findings JSON must hold one value - #168
Merged
Conversation
…ngs JSON must hold one value
Root cause: drop_unacceptable_l1_cache decided a record was the runner's own from its keys (error or skipped with findings: []), which a worker can write as easily as the runner. A substituted model's {"error":"unreadable","findings":[]} skipped the served verdict and left its session untriaged. Separately, every findings check used jq -e, which judges only the last value in a file, so a forged object followed by a valid one passed and L2 read the first.
- The dispatcher writes .served = runner beside each record it writes itself (unreadable, noise gate, normalize failure, no engine, final-round stub). Under AUTODREAM_L1_REQUIRE_SERVED=1 that marker, plus empty findings, is the only exemption from the verdict. A runner record from before the marker is triaged once more.
- A no-engine record is still dropped by shape once its source resolves an engine; keeping one under the gate now takes the marker.
- One filter, L1_FINDINGS_OK under jq -s (exactly one value, an object, a findings array), replaces the five jq -e checks.
Closes #167
…und's result Root cause (Codex round 1 on PR 168): the worker rejected a cached file that failed L1_FINDINGS_OK but left it in place, and every later step treats a non-empty $output as a result. A chunk that kept failing then skipped the final-round stub and the rejected file reached L2. It now moves to <hash>.json.rejected, which no *.json glob reaches, before anything else runs. Also documents the limit the served markers share with the match verdict: a worker that rewrites another session's record and .served together is not caught by checks on files in the findings dir.
drycode
added a commit
to drycode/cc-autodream
that referenced
this pull request
Oct 29, 2026
STRML#165 was squash-merged upstream as 2875df0 after two review rounds, and STRML#168 (82fdd83) closed the last two cache-verdict holes on top of it. The fork's only content beyond the shared base was the three pre-review STRML#165 commits from PR #2, all superseded by the reviewed version, so every path takes upstream's: the tree is upstream's main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #167.
AUTODREAM_L1_REQUIRE_SERVED=1decided a cached record was the runner's own by reading its keys, which a worker can write too. And every findings check usedjq -e, which judges only the last value in a file.{"error":"unreadable","findings":[]}runnermarker, held to its verdict, retriaged{"no_engine":true,"error":"x","findings":[]}, source has no engine{"findings":[forged]}then{"skipped":true,"findings":[]}.servedreadingrunnerbeside each of its five records (unreadable, noise gate, normalize failure, no engine, final-round stub). That marker is the only exemption from the verdict.L1_FINDINGS_OKunderjq -s(one value, an object, afindingsarray) replaces the fivejq -e ".findings | arrays"checks. It is the rulemerge-chunks.sh --checkalready applied to chunk answers.Tests:
test_require_served_trusts_only_the_runners_own_markerandtest_a_findings_json_with_two_values_is_not_a_result, 13 assertions, all red on main. Full suite 3,097 passed. The 4 failures only happen inside the Claude Code sandbox (nops, no TTY) and are the same as on main. Both shellcheck gates are clean.