Repository navigation
fix(goal): name acceptance literals cut by the judged evidence tail - #1577
Merged
Merged
Conversation
The acceptance gate validates only the last 4000 bytes of a turn's
completion text: `executor::execute_turn` stores `tail(text, 4000)` as
`RunRecord.evidence`, so a literal written earlier in the reply is
invisible to the gate and the refusal says only `(missing: [...])`. On
the measured goal 5 of 6 acceptance rejections were exactly that — the
worker had written the token, the window cut it, and the next attempt
rewrote its prose instead of moving the acceptance line.
- completion: `truncated_acceptance_rejection` tells the two cases apart
(full text passes, judged tail does not), names each literal with the
byte offset it was written at, and states the resubmit requirement.
`truncated_before_acceptance` + `outside_tail` carry the same fact as
fields. The verdict is unchanged: a rejected tail is still rejected,
and a text that also fails on the full completion still says `missing`.
- executor: apply that diagnostic where the record is built, after the
existing `check_record`.
- turn_envelope: an acceptance rejection reaches the worker whole — the
200-char cap cut a four-token list down to `(missing: [dispatches_…`
(runaway narration errors are still capped) — and the acceptance line
now states the judged window up front ("must land inside the last
4000 bytes"), so the common first-attempt miss is prevented, not just
explained.
- `completion::EVIDENCE_TAIL_BYTES` is the single constant for the
executor's window, the diagnostic and the envelope text.
Revert: delete the `truncated_acceptance_rejection` block at the end of
`executor::execute_turn`, restore `truncate(err, GOAL_MEMORY_ERROR_CHARS)`
in place of `failure_cause_text`, and drop the envelope sentence; nothing
else reads them.
Red on revert:
`completion_contract::a_literal_outside_the_judged_tail_is_reported_as_truncation_not_as_missing`
(5648-byte completion, literal at byte 1547 — asserts the refusal names
the truncation and never says `(missing:`) and
`turn_envelope::tests::acceptance_rejection_arrives_whole_and_the_tail_window_is_stated_up_front`
for the whole list and the up-front window.
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.
What
The goal acceptance gate validates only the last 4000 bytes of a turn's completion text (
executor::execute_turnstorestail(text, 4000)asRunRecord.evidence). A literal written earlier in the reply was invisible to the gate and the refusal said only(missing: [...]), so on the measured goal 5 of 6 acceptance rejections were exactly that: the worker had written the token, the window cut it, and the next attempt rewrote its prose instead of moving the acceptance line.This branch makes that case name itself, and states the judged window before the first attempt instead of after it.
Commits
Verification
Run in the main worktree at
6ae7e2f48, Rust pinned to 1.99.1 (the PATHrustcis Homebrew 1.96.0),ulimit -n 8192:cargo fmt --all -- --check→ cleancargo clippy -p future-goal --all-targets -- -D warnings→ cleancargo test -p future-goal→ all suites passed, 0 failed (unit, integration and doc targets)cargo test -p future-goal --test completion_contract→ 4 passed, 0 failedUser-visible changes
missing. Revert552c1e9e9.(missing: [dispatches_…. Runaway-narration errors are still capped. Revert552c1e9e9.Notes
completion::EVIDENCE_TAIL_BYTESis now the single constant behind the executor's window, the diagnostic and the envelope text, so the three cannot drift apart again.