test(phase3-C): end-to-end acceptance — unattended UI resolution cycle (#33) - #38
Merged
Merged
Conversation
#33) The cohesive Phase-3 acceptance proof, closing deliverable C now that A (#35) and B (#32) have landed. Drives the three real cores wired exactly as Claude Code runs them — PostToolUse `flag_ui_change.flag` -> `verify_result.write_result` (the `cyclaudes verify` writer) -> Stop `stop_gate.decide` — against a temp project with synthetic hook payloads (no live Claude Code runtime needed for the deterministic contract). Scenarios (one per PHASE_3.md success criterion): - Happy unattended cycle: UI edit -> flag records pending-ui -> Stop blocks (nothing verified) -> pass covering the touched file -> Stop allows. Zero human input (criterion 1). - Self-correct loop: fail -> Stop blocks WITH the expected-vs-actual diff -> agent fixes -> re-verify pass -> allow; the break is caught, never reclassified as a pass (criterion 3). - Non-UI change: does not flag and the Stop gate does not block on it — the cheap relevance guard (criterion 4). - Abstain escalates, never thrashes (the load-bearing rule, criterion 2): an abstain makes Stop ALLOW + escalate; 12 re-entries stay block_count == 0 and it is tallied once, proving it can't consume the block budget toward the 8-consecutive-block cap and false-pass there. - Fail bounded retry: blocks with the diff up to CYCLAUDES_RETRY_CAP, then escalates (allow + "after N attempts") instead of blocking forever. - Wiring honesty: the exit-code -> outcome mapping can't silently reclassify a real failure as pass/abstain, and the writer rejects an out-of-contract outcome. Deterministic/fake-driven; green under default `python -m pytest` (239 passed, 6 deselected). TODO + PLAN_MAIN Phase-3 status updated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CameronCrow
force-pushed
the
phase3-c-acceptance-test
branch
from
July 23, 2026 15:11
e3a4883 to
b6c0641
Compare
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.
Resolves #33 — Phase 3 deliverable C, the end-to-end acceptance proof of the
unattended UI-resolution cycle, deferred until A (#35) and B (#32) landed (both now on
main).What this adds
tests/test_acceptance_phase3.py— the cohesive Phase-3 acceptance test. It drives the threereal cores wired exactly as Claude Code runs them, against a
tmp_pathproject with synthetichook payloads (no live Claude Code runtime is needed to exercise the deterministic contract):
Scenarios (one per
planning/PHASE_3.mdsuccess criterion)passcovering the file → Stop allows. Zero human input.fail→ Stop blocks with the expected-vs-actual diff → agent fixes → re-verifypass→ allow. The break is caught, never reclassified as a pass.abstainmakes Stop allow + escalate; 12 re-entries stayblock_count == 0and it is tallied once — proving it cannot consume the block budget toward Claude Code's 8-consecutive-block cap and false-pass there. A blocking abstain is the exact failure the phase exists to prevent.CYCLAUDES_RETRY_CAP, then escalates (allow + "after N attempts") rather than blocking forever.Deterministic / fake-driven; green under the default
python -m pytest(no desktop, no live runtime).Test run
python -m pytest -q→ 239 passed, 6 deselected (the 6 are-m livedesktop checks).Docs
Checked the Phase-3 success-criterion line in
planning/TODO.mdand noted C landed inplanning/PLAN_MAIN.md. No other phases' TODO lines touched.🤖 Generated with Claude Code