Skip to content

test(policy): separate extension proposal grant from action policy - #74

Open
seonghobae wants to merge 8 commits into
mainfrom
test/extension-mutation-authority-main
Open

test(policy): separate extension proposal grant from action policy#74
seonghobae wants to merge 8 commits into
mainfrom
test/extension-mutation-authority-main

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Partial implementation of #27.

Buyer/security gap

OriginWeave has an extension-access decision for ExtensionAgentCapability::ProposeTypedAction and a separate core action-policy evaluator, but no production adapter currently converts an extension proposal into an ActionRequest. This test lane therefore proves the two implemented boundaries independently without implying a nonexistent composition path.

Exact scope and live topology

The current exact protected-main base is 0841d2ab3d8b5e60a03c0a8e818cf438e2716829. The current exact branch head is 9ce259834095cef91052db1e826f283689fb688f.

Fresh exact comparison reports ahead 8 / behind 0, with merge base exactly equal to the current protected-main base. No predecessor-head evidence is transferred.

The tests keep the evaluators separate:

  • evaluate_extension_access proves only that the exact extension/session/context grant permits ProposeTypedAction;
  • independently created user-sourced requests remain fail-closed for cross-origin mutation, missing target write authority, crawler mutation, mode/purpose mismatch, robots states, forbidden legal consent, and Human-mode control; and
  • no extension proposal adapter, action-source transformation, execution API, or new authority is added.

Review correction

CodeRabbit's predecessor-head COMMENTED review correctly found that earlier naming implied a composition path that does not exist. The current test names and module-level explanation distinguish extension proposal permission from ordinary action-policy evaluation. That predecessor review is not an approval and is not transferred to the moved head. Current inline review threads returned by GitHub: none.

Current exact-head evidence

At unchanged exact head 9ce259834095cef91052db1e826f283689fb688f:

  • CI run 31976695423: success;
  • Security Scan run 31976695399: success;
  • SAST Semgrep run 31976695489: success;
  • GitHub status context CodeRabbit: success, which is status-only evidence and not independent approval;
  • formal reviews returned by GitHub: one historical CodeRabbit COMMENTED review on a predecessor head, not approval; and
  • inline review threads: none.

A current-head Manifest V3 workflow run was not returned for this test-only head, so Manifest V3 evidence is absent rather than passing. Central OpenCode/Noema/Strix evidence not returned for this exact head is likewise absent rather than inferred from predecessor or status-only evidence. No predecessor, skipped, queued, cancelled, absent, synthetic-merge, status-only, or model-only evidence is promoted as current proof.

GitHub reports the PR open and Ready for review. Passing automation is not independent approval, and this scheduled actor does not merge or self-approve.

Truth boundary

A Chrome/extension permission remains extension-access permission only. This test-only PR does not prove a real extension proposal flows through OriginWeave action policy, because that adapter does not yet exist. A future composed adapter requires a separate integration regression and authority review.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

확장 프로그램에 ProposeTypedAction 권한이 있어도 정책 격리 규칙을 우회할 수 없음을 검증하는 테스트를 추가했다. 출처, 실행 모드, 로봇 정책, 위험 동작, 인간 모드 제어 경계를 확인한다.

Changes

확장 프로그램 변경 격리

Layer / File(s) Summary
테스트 컨텍스트 및 제안 권한 설정
crates/originweave-policy/tests/extension_mutation_isolation.rs
정책 타입과 식별자를 가져온다. 유효한 확장 프로그램 권한 부여와 제안 허용 여부를 검증하는 공통 헬퍼를 추가한다.
출처 및 실행 모드 격리
crates/originweave-policy/tests/extension_mutation_isolation.rs
제안 권한이 있어도 교차 출처 변경을 CrossOriginMutation으로 거부한다. 쓰기 불가 출처 변경을 OriginNotWritable로 거부한다. 크롤러 모드와 모드·실행 목적 불일치도 각각 CrawlerMutationModePurposeMismatch로 거부한다.
로봇 정책 및 제어 경계
crates/originweave-policy/tests/extension_mutation_isolation.rs
Disallowed, Unknown, NotApplicable 로봇 정책을 각각 해당 DenialReason으로 거부한다. LegalConsent 동작을 ForbiddenRisk로 거부한다. 인간 모드의 Navigate 요청을 HumanModeNotAgentControlled로 거부한다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning 확장 권한 격리 테스트는 충족하지만, 이슈 #27의 Chromium 호환성, 운영 코드 집행, 문서화 및 릴리스 게이트 요구사항은 충족하지 않습니다. MV3 Chromium fixture suite, 운영 코드의 권한 격리, 지원 capability matrix, 전용 ADR 및 회귀 릴리스 게이트를 추가해야 합니다.
✅ Passed checks (4 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed 변경 사항은 이슈 #27의 확장 권한 격리와 권한 확대 거부를 검증하는 테스트에 한정되며, 관련 없는 코드 변경은 없습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 확장 프로그램의 제안 권한과 일반 작업 정책을 분리하는 회귀 테스트 추가라는 주요 변경 사항을 정확히 요약합니다.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/extension-mutation-authority-main

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.

@seonghobae
seonghobae marked this pull request as ready for review August 11, 2026 04:32

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
crates/originweave-policy/tests/extension_mutation_isolation.rs (1)

122-145: 🔒 Security & Privacy | 🔵 Trivial | 🏗️ Heavy lift

확장 제안 테스트를 실제 경계와 일치시키십시오.

evaluate_extension_accessExtensionAgentGrant만 평가하며 ActionRequest를 생성하지 않습니다. 현재 확장 제안 어댑터도 없습니다. 따라서 assert_extension_can_propose(&grant)InstructionSource::User 요청은 서로 독립적입니다. 실제 어댑터가 추가되면 해당 경로로 정책 결과를 검증하고, 그렇지 않으면 테스트 이름과 설명을 독립된 권한 및 정책 테스트에 맞게 수정하십시오.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/originweave-policy/tests/extension_mutation_isolation.rs` around lines
122 - 145, Update the test around assert_extension_can_propose and the
InstructionSource::User ActionRequest so it matches the implemented boundary:
evaluate_extension_access only evaluates ExtensionAgentGrant and no extension
proposal adapter creates ActionRequest values. Until such an adapter exists,
separate or rename the assertions to represent independent grant authorization
and policy evaluation; if an adapter is introduced, verify the policy result
through that adapter instead.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@crates/originweave-policy/tests/extension_mutation_isolation.rs`:
- Around line 122-145: Update the test around assert_extension_can_propose and
the InstructionSource::User ActionRequest so it matches the implemented
boundary: evaluate_extension_access only evaluates ExtensionAgentGrant and no
extension proposal adapter creates ActionRequest values. Until such an adapter
exists, separate or rename the assertions to represent independent grant
authorization and policy evaluation; if an adapter is introduced, verify the
policy result through that adapter instead.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6096f5d0-719c-4310-81fb-6cfe34f5b117

📥 Commits

Reviewing files that changed from the base of the PR and between 2403344 and ac8b27e.

📒 Files selected for processing (1)
  • crates/originweave-policy/tests/extension_mutation_isolation.rs

@seonghobae seonghobae changed the title test(policy): prove extension grants cannot widen mutation authority test(policy): separate extension proposal grant from action policy Aug 11, 2026
@cursor

cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 9ce259834095cef91052db1e826f283689fb688f.

  • Head SHA: 9ce259834095cef91052db1e826f283689fb688f

  • Workflow run: 32132782350

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file: extension_mutation_isolation.rs"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file: extension_mutation_isolation.rs"]
  R1 --> V1["required checks"]
Loading

@opencode-agent

opencode-agent Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 9ce259834095cef91052db1e826f283689fb688f
  • Workflow run: 32139246118
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 9ce259834095cef91052db1e826f283689fb688f.

  • Head SHA: 9ce259834095cef91052db1e826f283689fb688f

  • Workflow run: 32139246118

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file: extension_mutation_isolation.rs"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file: extension_mutation_isolation.rs"]
  R1 --> V1["required checks"]
Loading

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 9ce259834095cef91052db1e826f283689fb688f.

  • Head SHA: 9ce259834095cef91052db1e826f283689fb688f

  • Workflow run: 32139246118

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file: extension_mutation_isolation.rs"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file: extension_mutation_isolation.rs"]
  R1 --> V1["required checks"]
Loading

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