C1 F1/F2 — Snapshot trusted state before hostile reads - #43
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe authorization evaluators now snapshot trusted merge targets and jobs before reading untrusted candidate or request properties. Tests cover stale values and hostile getters that mutate live authorization state during evaluation. ChangesAuthorization Snapshot Ordering
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The PR makes a localized ordering fix with no reported merge-blocking risk remaining after the stated validation checks. Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
|
@codex review |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Purpose
This stacked validation PR repairs the trusted-before-hostile ordering invariant on protected parent PR #14.
Parent PR:
#14 — Cockpit C1 — Repair Job Authority Envelope & Merge BarrierExact protected-parent SHA:
dd1bdd494f37d0cf42ea79fd7a9eb41d04a17bbeRepair head:
f8eb259664fd2ae15eb1792daedd41665e63ced7Findings
F1 — CURRENT / P1 / BLOCKING
authorizeJobOperationread hostile request-controlled state before capturing trusted repair-job authorization state.A hostile request getter could mutate the still-live job before snapshot capture and change an expected denial into:
ALLOW_ONCE / WITHIN_JOB_ENVELOPEwith a non-null permit.
Repair:
capture/freeze trusted job authorization state before any hostile request read.
F2 — CURRENT / P2
operatorMergeAuthorizesread candidate-controlled state before capturing the supplied merge target.A hostile candidate getter could mutate the still-live target before target capture and change:
false → trueRepair:
capture target fields before any candidate-controlled read.
F1 and F2 are one trusted-before-hostile invariant family.
Scope
Exactly four files:
src/domain/execution-permit.tssrc/domain/job-authorization.tstests/domain/execution-permit.test.tstests/domain/job-authorization-invariants.test.tsNo documentation changes.
No F3–F8 work.
No exported API change.
No authority expansion.
Validation
Fresh independent validation:
PASS
Focused F1/F2 tests:
115 passedFull suite:
885 passedTypecheck:
PASS
Lint:
PASS
Build:
PASS
git diff --check:clean
Validated patch identity:
SHA-256:
3BD4918F2A6C812D4DB2C5048D965560A6F33967802930C7B792CB92CB9F2C89Bytes:
7638Committed patch identity:
exact match.
Quarantine
This PR must remain DRAFT until exact-head CI and independent GitHub review gates pass.
Do not merge directly.
Do not enable auto-merge.
Do not modify protected parent PR #14 directly.
If this repair fails validation, reject/quarantine this child and leave PR #14 untouched.
Summary by CodeRabbit
Bug Fixes
Tests