fix: thread fixes_count_only through cycle verifiers (#0139)#167
Merged
Conversation
…e-reject (#139) Claude cycles returning count-only payloads (fixes_committed/fixes_applied instead of fixes[]) were false-rejected as "structured output implies 0" because the count landed only in prose notes and all three verifier functions read fixes==[]. Adds fixes_count_only: int to CycleResult; _as_cycle_result sets it; expected_fix_commits, allowed_total_cycle_commits, and expected_cycle_commits fall back to it. 18 regression tests reproduce the eval #15 payload shape and verify no violations fire.
fazxes
added a commit
that referenced
this pull request
Apr 8, 2026
…clear Two-cycle test run against Phractal confirms the three merged PRs fixed the scored failures from eval #15. Both cycles accepted (no false rejections), shift log persisted, counters positive. Score 86/100 exceeds the BUILD EVAL GATE threshold of >= 80. - Guard rails: 4 -> 9 (PR #167 count-only payload fix working) - Shift log: 0 -> 9 (durable artifact written and co-committed) - Fix quality: 3 -> 8 (full metadata in accepted cycles) - Discovery: 5 -> 8 (structured output preserved faithfully)
This was referenced Apr 8, 2026
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.
Summary
fixes_count_only: inttoCycleResultTypedDict, set by_as_cycle_resultwhen agent returnsfixes_committed/fixes_appliedcount-only payload instead of structuredfixes[]expected_fix_commits,allowed_total_cycle_commits, andexpected_cycle_commitsto fall back tofixes_count_onlywhenfixes == []nightshift/__init__.pyRoot cause
Claude cycles returning
{"fixes_committed": 1, "summary": "..."}instead of{"fixes": [...]}were false-rejected as "structured output implies 0" — the count landed only in prose notes and all three verifier functions readfixes == []. This blocked the eval gate at 53/100.Test plan
make checkpasses (1079 tests)TestAsCycleResultCountOnlyPayload::test_eval_0015_single_fix_cycle_no_longer_produces_violation— end-to-end reproduction confirms no violations fireTestAllowedTotalCycleCommits::test_count_only_one_fix_gives_range_1_to_3— confirms range is (1,3) not (0,1)TestExpectedFixCommits::test_returns_count_only_fallback_when_fixes_empty— confirms fallback returns 1 not 0