check-orientation: the pin leg passed on REVERSED doctrine — it read a string, not a polarity - #651
Conversation
…a string, not a polarity Closes #316's live half. Measured on origin/main 2026-09-08, both attacks that issue names: ATTACK A delete ONE endorsed pin form, keep the other -> exit 0 ✅ ALREADY FIXED ATTACK B rewrite BOTH endorsed lines as "⛔ DEPRECATED — NEVER do this: <the form> … ✅ markers emit" -> exit 0 ⛔ STILL LIVE and the leg printed `ok an ✅-marked pin form (either endorsed one)` ⇒ THE DOCTRINE FULLY REVERSED AND THE REQUIRED GATE GREEN. #316 said it in one line: "it is not measuring the doctrine; it is measuring the presence of one string." ⛔ AND THE PREDICATE'S OWN DOCSTRING CLAIMED THIS WAS HANDLED. It said a line reading "⛔ Never use: git archive …" had passed a previous version and now would not — but the test was `"✅" in line`, and a counter-example carries BOTH glyphs. The fix was written against a weaker attack than the one filed. FIXED — the negation is read POSITIONALLY, in the text BEFORE the matched form, because that is what reverses it. ⚠ A ⛔ AFTER the command is commentary on something else and must not disqualify a genuine endorsement; that is a control, not a nicety. THREE STATES, all exercised: ✅ doctrine intact -> exit 0 ⛔ ATTACK B, both lines reversed -> exit 1, `GONE an ✅-marked pin form` ✅ ATTACK A, one form deleted -> exit 0 (no regression on the earlier fix) SELF-TEST — three new asserts, and the predicate is HOISTED to module scope to make them possible. It was nested inside check_pin_doctrine(), so the first version of these controls raised NameError and returned rc 1 whether the code was broken or not. ⚠ I read that as "the control fires" until I looked: broken rc 1, restored rc 1 — a uniform result is not a measurement, and this file's own subject is exactly that. ⛔ the control DISCRIMINATES: replacing the positional test with a bare `if m:` gives `KNOWN-NEGATIVE FAILED (#316 ATTACK B): a NEGATED form must not count`, rc 1. ✅ `python3 -O` -> rc 2, never 0. ⚠ NOT ADDRESSED HERE: #316 §2, "why it landed anyway" — a refutation posted with `gh issue comment` on a PR creates a COMMENT, not a REVIEW, so `reviews=0` and the merge decision could not see it. That is a channel finding about a person's action, not a defect in this file. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Warning Review limit reachedNext included review available in 31 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: Advanced 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 |
🛡️ Sentinel PR review1 file(s) changed · 0 introduced by this diff (secrets+SAST) · dependencies unchanged — SCA/CVE not re-scanned. Advisory — the fail-closed gate is the post-merge pentest. Findings — ranked by criticalityNo issues found on the changed surface. Scan summary
|
Closes #316's live half. Found in the 47-issue stale backlog; measured on
origin/main2026-09-08. TEAMLEAD (session15b69750).Both attacks #316 names, run
⇒ The doctrine fully reversed and the required gate green. #316 said it in one line: "it is not measuring the doctrine; it is measuring the presence of one string."
⛔ And the predicate's own docstring claimed this was handled
It said a line reading
⛔ Never use: git archive …had passed a previous version and now would not — but the test was"✅" in line, and a counter-example carries both glyphs. ⇒ The fix was written against a weaker attack than the one filed.Fixed — position, not presence
The negation is read in the text before the matched form, because that is what reverses it.
⚠ A
⛔after the command is commentary on something else and must not disqualify a genuine endorsement. That is a control, not a nicety, and it is asserted.Three states, all exercised
⚠ The self-test needed a hoist, and my first control was a NameError
_endorsed_pin_linewas nested insidecheck_pin_doctrine(), so the first version of these asserts raisedNameErrorand returned rc 1 whether the code was broken or not.I read that as "the control fires" until I looked at the output: broken rc 1, restored rc 1. A uniform result is not a measurement — which is this file's own subject.
⛔ Now it discriminates: replacing the positional test with a bare
if m:gives✅
python3 -O→ rc 2, never 0.Not addressed here
#316 §2, "why it landed anyway" — a refutation posted with
gh issue commenton a PR creates a comment, not a review, soreviews=0and the merge decision could not see it. That is a channel finding about a person's action, not a defect in this file. ⚠ It is also the finding my ownmerge-guardleg 3 advisory now makes visible on every unreviewed merge.🤖 Generated with Claude Code