daintree-control: give it an argument surface, so its control can be shown to have run - #606
Merged
Conversation
…shown to have run
It read NO argv at all — argparse 0, sys.argv 0 — so a bare run, `--self-test`
and `--zzz-not-a-flag` were the SAME RUN, all exiting 0. The gate said exactly
why that is not a control:
⚠ daintree-control.py UNVERIFIABLE — it accepts `--zzz-not-a-flag` and exits 0.
⛔ So `--self-test` exiting 0 establishes NOTHING: the flag may never have
been recognised.
⇒ A control whose invocation cannot be shown to have happened is not a control.
BEFORE 41 passed · 3 UNESTABLISHED · 6 UNVERIFIABLE
AFTER 41 passed · 3 UNESTABLISHED · 5 UNVERIFIABLE
daintree-control.py has NO self-test, declared in-file: controlled by
tools/test_daintree_control.py
⛔ THE TWO REFUSALS MUST DIFFER, AND THAT IS THE WHOLE DESIGN. Refusing every
argument with one message would make `--self-test` and garbage BYTE-IDENTICAL,
which the gate reads as "the flag was never DISPATCHED" — trading UNVERIFIABLE
for UNESTABLISHED and establishing nothing either way. I checked that branch
before writing, not after:
--self-test -> 2, and NAMES where the control lives
--zzz-not-a-flag -> 2, and says there is no flag to pass
bare -> 0, unchanged
⚠ WHY THERE IS NO IN-PROCESS `--self-test`, stated in the file rather than left
implicit: main() opens a live MCP session on its FIRST statement. A hermetic
control has to stand a server up around the whole process — which is exactly
what tools/test_daintree_control.py already does (make_handler / run_against,
9 controls, gated by the CI glob and passing).
⇒ So the declaration is true: the control exists, it is gated, and it is not
reachable from inside this process.
⚠ NOT TOUCHED, and one deliberately:
· pretooluse-guard.py is a LIVE PreToolUse hook. Its own header says an
addition "changes a running mechanism rather than" adding a check. Harness
configuration is the operator's, not TEAMLEAD's to alter.
· fleet-identity, discriminates, pane-census, pipe-exit-scan remain
UNVERIFIABLE. Same two shapes, and this commit is the template.
gate --self-test 0 · exit-code-gate 0 · check-tools-index 0 ·
test_daintree_control 0 (run because main()'s entry moved).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DTMf4EvaTEnDKXY47efRZZ
|
Warning Review limit reachedNext included review available in 3 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
daintree-control.pyread no argv at all —argparse0,sys.argv0 — so a bare run,--self-test, and--zzz-not-a-flagwere the same run, all exiting 0. The gate said exactly whythat is not a control:
⇒ A control whose invocation cannot be shown to have happened is not a control.
⛔ The two refusals must DIFFER — that is the whole design
Refusing every argument with one message would make
--self-testand garbage byte-identical,which the gate reads as "the flag was never DISPATCHED" — trading UNVERIFIABLE for UNESTABLISHED
and establishing nothing either way. I read that branch before writing the fix, not after:
⚠ Why there is no in-process
--self-testStated in the file rather than left implicit:
main()opens a live MCP session on its firststatement. A hermetic control has to stand a server up around the whole process — which is
exactly what
tools/test_daintree_control.pyalready does (make_handler/run_against, 9controls, gated by the CI glob, passing).
⇒ So the declaration is true: the control exists, it is gated, and it is not reachable from
inside this process.
⚠ Not touched — and one deliberately
pretooluse-guard.pyis a livePreToolUsehook. Its own header says an addition "changesa running mechanism rather than" adding a check. Harness configuration is the operator's, not
TEAMLEAD's to alter. It stays UNVERIFIABLE by choice, and that should be recorded rather than
fixed by me.
fleet-identity,discriminates,pane-census,pipe-exit-scanremain. Same two shapes; thiscommit is the template — an argv surface where the recognised flag answers truthfully and the
unrecognised one is refused differently.
Verification
gate-selftests.sh --self-testscripts/exit-code-gate.sh tools 'test_*.py'scripts/check-tools-index.pytest_daintree_control.pymain()'s entry moved🤖 Generated with Claude Code
https://claude.ai/code/session_01DTMf4EvaTEnDKXY47efRZZ