feat(policy): revalidate semantic-node authority at dispatch boundary - #96
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 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 #28, stacked on PR #95.
Buyer/security gap
PR #95 makes deterministic policy allow a typed prerequisite, but callers could still call
validate_currentand perform adapter dispatch later as two independent operations. The first real Chromium vertical slice needs a narrow same-call boundary that revalidates exact browser session/context/origin/document epoch immediately before handing the already policy-authorized binding to adapter dispatch logic.Dependency
This Draft is stacked on unchanged exact PR #95 head
e26a2d07ae731ff35271299036fa1f43c8550039, transitively on #93/#58/#57/#52/#40. Keep Draft while prerequisites remain active. No prerequisite check, review, status, or mergeability result is transferred.TDD / RCA sequence
bad2a3d83a85cb95e7d364221a5bc9bc90489093introduced the same-call dispatch-revalidation contract. CI run31545503148did not yet establish the intended production RED because canonical formatting failed first; no later workspace/test result from that head is promoted.PolicyAuthorizedSemanticNodeAction::dispatch_if_current: current browser session/context/origin/document epoch are revalidated, and only then is one caller-supplied dispatch callback invoked with the exact policy-authorized binding. Adapter callback return values remain separate from browser-authority validation.a897cd19f3f5e2d7c8669af39d8c4c958c4c6d94passed repository contracts, formatting, workspace tests, strict Clippy and rustdoc in CI run31545914486, but exact production coverage failed at4266/4267lines and5569/5570regions. The uploaded exact-coverage artifact localized the miss to one genericdispatch_if_currentmonomorphization: the stale-authority callback type exercised the?error path but never the post-validation dispatch region.c93b90a316b83a160cf80008cc25c78aa32302f9repairs only that coverage evidence. The stale-authority regression now drives both current and stale document epochs through one shared callback call site, so the same generic instantiation exercises both the successful dispatch region and the fail-before-dispatch path without weakening production code or the coverage gate.Implemented boundary
PolicyAuthorizedSemanticNodeAction::dispatch_if_currentnow:SemanticNodeActionBindingfrom feat(policy): gate semantic-node actions on deterministic policy #95;NodeHandleErrorauthority failure.The focused tests prove exact-current callback execution, stale-document fail-before-dispatch behavior, and independent adapter failure propagation.
Exact-head proof
On unchanged exact head
c93b90a316b83a160cf80008cc25c78aa32302f9against unchanged exact prerequisite #95 heade26a2d07ae731ff35271299036fa1f43c8550039:31549013124: success;93967418886: success, including repository contracts, canonical formatting, locked workspace/all-target check, full tests, strict Clippy and rustdoc;93967418865: success, including exact owned production function/line/region/branch enforcement;No predecessor-head result, prerequisite result, synthetic merge result, or skipped job is transferred to this exact head.
Truth boundary
This slice does not authenticate a browser adapter, execute Chromium input by itself, infer business
ActionKindfromNodeActionKind, authorize destination/network/TLS/HTTP, mint approval, resolve secrets, prove a post-condition, or claim #28 complete. The callback boundary is useful only when its current browser-authority inputs come directly from the trusted adapter immediately before the side effect. Keep this PR Draft while #95/#93/#58/#57/#52/#40 remain active.