behavior-verifier gets a truncated code_changes brief fact and returns verdict:error, which fails the implementation; truncation must be disclosed and error must route to repair, not terminal #618
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#618
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
VERDICT: CREATE (ticket-skeptic) — real, well-scoped defect distinct from #613/#614/#617; presentable() silently truncates diffs and behavior-verifier verdict:error has no repair route, so a green implementation was killed and had to be hand-finished; root is DESIGN in brief_facts.rb/verdict routing, echoes unticketed #528 note.
Parent: #613
Context
This surfaced in implementation 5 of #613 (target os-sdlc, 7 production files, 62 insertions). The programmer dispatch 44 went green. The behavior-verifier dispatch 45 could not judge the diff and returned an error verdict, which the Runner treated as terminal.
Observed
The behavior-verifier handoff said: "code_changes is truncated mid-diff; three of six ticket tasks cannot be judged". It listed "MISSING: complete code_changes -- the diff ends mid-hunk in the header line for plugins/os-sdlc/lib/os_sdlc/pipeline/open_implementation.rb". It returned verdict: error.
The main loop verified the diff by hand, ran the suite green (1354 runs), and hand-finished the ticket. A green implementation failed because of a brief-side defect, not a code defect.
Two defects combine to cause this:
BriefFacts#presentabletruncates a diff without a visible marker or a fact stating the cap and the omitted files. The verifier has no way to ask for the rest.verdict: errorfrom behavior-verifier routes straight toimplementation_failed, with no repair or re-brief route. A brief-side defect kills a green implementation outright.This echoes an earlier note from #528: verifier error pre-empted the suite-check repair route (unticketed at the time).
Reproduce
Expected
presentableappends an explicit line, for example "TRUNCATED: N of M diff lines shown; files omitted: ...". The verifier charter instructs it to verify omitted files with Bash (git diffon the named paths) instead of returning error.verdict: errorfrom behavior-verifier routes to one bounded re-dispatch of behavior-verifier with the full diff, or escalates. It never routes straight toimplementation_failed.Origin
presentable) and the behavior-verifier verdict-routing map.presentable); behavior-verifier verdict handling in the map / routing.Decisions 2026-09-19
code_changesandtest_changes. A diff is bounded by the increment and is the verifier's only evidence.presentablegoes away.gate resultsandlint_offense_history, and append a visible marker line when the cap cuts.verdict: errorfrom behavior-verifier routes to one bounded re-dispatch of behavior-verifier, then escalates. It never routes straight toimplementation_failed.Slice
The verifier always sees the whole diff. Transcript facts that are cut say so. An error verdict from the verifier gets one retry before it can end the implementation.
Acceptance criteria
BriefFacts#code_changesandBriefFacts#test_changesreturn the full diff, or nil when empty.BriefFacts#presentableis removed.BriefFacts#truncate(used by gate results and lint_offense_history) appends a final lineTRUNCATED: showing 4000 of N charswhen it cuts, and returns the input unchanged otherwise.plugins/os-sdlc/maps/poodr-implementation.yaml, the behavior-verifiererroredge becomes{ to: behavior-verifier, bound: 1, note: "retry once with the same facts" }. When the bound is exhausted, the existing bound-exhausted escalation applies. The map validator accepts this shape.Non-goals
No change to the verifier charter beyond what the marker requires. No change to MAX_GATE_OUTPUT_CHARS.
Owner sketch
Cases
TRUNCATED: showing 4000 of N chars.Body updated 2026-09-19 with the design decisions (see ## Decisions 2026-09-19). Implementation via /os-sdlc:implement starts now.
Work started on branch ticket-618 via /os-sdlc:implement (session 33dcab60). ADR-0204 committed on the branch first.
Resolution
Done: BriefFacts#code_changes and #test_changes return the full diff or nil; presentable removed. truncate appends 'TRUNCATED: showing 4000 of N chars' for gate results and lint_offense_history. poodr-implementation.yaml behavior-verifier error edge is a bounded self-retry (bound 1) then bound-exhausted escalation. ADR-0204 amends 0137/0169/0173.
Evidence: Branch ticket-618 commits
757a8770(ADR) and HEAD; pipeline implementation 8, 17 dispatches; behavior-verifier pass x3, suite-check pass (dispatch 101), contract-auditor pass (102). Hand-finish: two map invariant tests in poodr_implementation_map_test.rb amended to allow the bounded error self-edge.Follow-ups: 1) poodr-ticket-implementation.yaml still routes behavior-verifier error to the terminal error node; the ticket named only poodr-implementation.yaml. Left as is; apply the same edge when that map is next edited. 2) LSP daemon tests lsp_integration_test and cli_resolves_root_from_subdirectory_test fail under full-suite order twice this session and pass in isolation; pre-existing, not captured here.
Flaky-test note: full-suite run of client_sends_absolute_root_test.rb failed once under a random seed while verifying this merge; passed in isolation and on 3 fixed-seed reruns (1363/1371/1376 executions, 0 failures). No defect in this ticket's work. Skeptic gate verdict: DROP — unconfirmed intermittent-test suspicion with no captured seed or assertion; provenance is a guess (IMPROVISATION-strength), not an observed, reproducible failure.