Skip to content

feat(policy): gate semantic-node actions on deterministic policy - #95

Draft
seonghobae wants to merge 4 commits into
feat/semantic-node-action-bindingfrom
feat/semantic-node-policy-authorization
Draft

feat(policy): gate semantic-node actions on deterministic policy#95
seonghobae wants to merge 4 commits into
feat/semantic-node-action-bindingfrom
feat/semantic-node-policy-authorization

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Partial implementation of #28, stacked on PR #93.

Buyer/security gap

PR #93 binds exact semantic-node authority to the business ActionRequest, but deliberately does not authorize that request. A later browser adapter needs a type-level boundary that makes Decision::Allow materially different from Deny and RequireApproval; otherwise a caller can retain a valid node binding and accidentally dispatch after inspecting policy without proving that policy actually allowed the same bound request.

Dependency

This Draft is stacked on unchanged exact PR #93 head c150e2daa0c890c8e2797ebb4c88a6220be13019, transitively on #58/#57/#52/#40. Keep Draft while those prerequisites remain active. No prerequisite check, review, status, or mergeability result is transferred.

TDD / RCA sequence

  1. Test-only head 3dfab9eeeee2e7dbc280bc69b2c8f04451df9dbf introduced the policy-authorization contract, but CI run 31543271705 stopped first at canonical rustfmt. That setup failure is not counted as the intended RED.
  2. Formatting-only test head 6c26e5d84e274f74d252ce70695ff2c2535ef57f reached the intended missing-production boundary. CI run 31543469473, Rust contracts job 93950819527, passed repository contracts and canonical formatting, then cargo check --locked --workspace --all-targets failed E0432 because public PolicyAuthorizedSemanticNodeAction and SemanticNodePolicyAuthorizationError did not exist. This is the valid RED.
  3. Production head daf94aebc657658a93fb99a84e61b22db9ac67a1 added the narrow typed authorization boundary. Exact production coverage was already successful, but CI run 31543863426 exposed one canonical rustfmt-only tuple layout in the new test. No production behavior was changed for that formatting failure.
  4. Current exact head e26a2d07ae731ff35271299036fa1f43c8550039 applies only that canonical formatting delta.

Implemented boundary

PolicyAuthorizedSemanticNodeAction now:

  • can be constructed only when the existing deterministic action policy evaluates the exact SemanticNodeActionBinding::request() to Decision::Allow;
  • preserves Decision::Deny as typed SemanticNodePolicyAuthorizationError::Denied;
  • preserves Decision::RequireApproval as typed ApprovalRequired rather than treating approval-required as authorization;
  • retains the exact semantic-node target and business request together through the existing binding;
  • exposes immediate-use browser session/context/origin/document-epoch revalidation before later dispatch; and
  • emits bounded credential-free error text for every current deterministic denial reason.

The tests exercise allow, approval-required, untrusted-instruction denial, stale-document revalidation, and every current denial-error rendering branch.

Exact-head proof

On unchanged exact current head e26a2d07ae731ff35271299036fa1f43c8550039 against unchanged exact prerequisite #93 head c150e2daa0c890c8e2797ebb4c88a6220be13019:

  • CI run 31544103569: success;
  • Rust contracts check 93952783400: success;
  • Production coverage check 93952783458: success, including exact owned production function/line/region/branch enforcement;
  • exact-head CodeRabbit commit status: success;
  • GitHub reports the Draft mergeable against its unchanged prerequisite base; and
  • no formal reviews or inline review threads are currently returned for this exact head.

No predecessor-head check, review, status, or mergeability result is transferred.

Truth boundary

This slice proves only deterministic policy authorization of an already source-origin-bound semantic-node/business-action pair. It does not map NodeActionKind to business ActionKind, authenticate the browser adapter, execute browser input, authorize destination/DNS/TCP/TLS/HTTP, resolve or disclose secrets, mint approval, prove a post-condition, establish trusted telemetry/provenance, or claim the real Chromium vertical slice complete. Policy allow does not replace the required immediate browser-authority revalidation or any later execution boundary.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5f92580f-3ba8-4212-b431-4308799d4b80

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant