feat(sensitive): recheck tracked reservation before disclosure - #69
Draft
seonghobae wants to merge 5 commits into
Draft
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 was referenced Aug 11, 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.
Partial implementation of #10, stacked on PR #68.
Buyer/security gap
The active sensitive-handle stack can reserve and identity-bind one in-process use, then commit or compensate that exact reservation. A trusted broker still needs an immediate pre-disclosure recheck of the same outstanding reservation after reservation but before protected-value disclosure. Reusing
reserve_tracked_usewould consume another use or fail at the use limit, while checking only the aggregate outstanding count cannot prove that the supplied token is the reservation owned by this state.Dependency
This Draft is stacked on unchanged exact PR #68 head
aa46d982b2bf786fe297744ac99f88b6c4c5f4cfand must remain Draft while #68/#55/#53/#46 are active.TDD / RCA sequence
5a96d2931225e133768878c68d09e1a36b5ca0f6required a narrowrecheck_reservationboundary before production implemented it.02678764a1860c6847d1e9d882e0fb40e89ff88aimplemented the exact outstanding-reservation recheck. Rust contracts, formatting, full tests, strict Clippy and rustdoc succeeded, but CI run31452394593, Production coverage job93659204099, failed the repository's exact branch gate at508/512branches.recheck_reservation: malformed caller authority, malformed immutable state authority, malformed caller audience, and malformed immutable state audience.d6e5f180e87f7caa39a6a16d35a2de455a39a282added realistic malformed caller-authority and caller-audience recheck cases. Those inputs are reachable after a valid tracked reservation and must fail closed immediately before disclosure.c6845af11f71f96afce69169140aa9a7b78c75a4removed the two unreachable duplicate state-scope validation branches. An outstanding reservation can exist only afterreserve_tracked_usevalidated that immutable state scope's authority and audience; malformed state scope cannot manufacture an outstanding reservation through the public API. Exact coverage became green there, while Rust contracts exposed only canonical rustfmt line wrapping.de79d85e6be5131036db119efab767f0eb76a816applies exactly that rustfmt delta without changing behavior.Exact-head evidence
On unchanged exact head
de79d85e6be5131036db119efab767f0eb76a816against unchanged prerequisite #68 headaa46d982b2bf786fe297744ac99f88b6c4c5f4cf:31453149013: success;93661396310: repository Python contracts, canonical formatting, locked workspace/all-target check, full tests, strict Clippy and rustdoc all success;93661396348: success, including exact owned production function/line/region/branch enforcement;No predecessor-head check, review or mergeability result is transferred to the current head. Review/security workflows that require a non-Draft PR remain separate gates and are not inferred from CI or CodeRabbit status.
Implemented boundary
The branch now:
ReservationNotOutstanding;Truth boundary
This remains an in-process policy primitive. It will not authenticate a workload, resolve or disclose a protected value, prove that compensation is truthful, provide durable/cross-process transactionality, perform KMS/encryption, persist state, or create the complete trusted broker. A future broker must call the recheck inside its own transaction/locking boundary immediately before disclosure.