feat(extension): bound native messaging host authority - #82
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthrough네이티브 메시징 권한 평가와 프레임 인코딩·디코딩·스트림 읽기 API를 추가했습니다. 방향별 페이로드 상한, UTF-8 검증, 잘린 프레임과 잔여 데이터 거부를 구현했습니다. 권한, 프레이밍, Chromium 호환성 근거를 테스트와 문서에 반영했습니다. Changes네이티브 메시징 경계
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: 🟡 Moderate · up to The PR adds bounded native-messaging identities, grants, and framing without directly granting Agent authority, but merge readiness is not established while a required exact-head gate is failing. In addition, the reference-integrity test should validate the complete pinned Chromium path and blob so documentation drift cannot pass unnoticed. Sequence Diagram(s)sequenceDiagram
participant NativeMessagingStream as 네이티브 메시징 스트림
participant PayloadReader as read_native_messaging_payload
participant FrameCodec as encode_native_messaging_frame
participant TextDecoder as decode_native_messaging_text_frame
NativeMessagingStream->>PayloadReader: 길이 접두사와 페이로드 읽기
PayloadReader-->>FrameCodec: 상한 내 페이로드 전달
FrameCodec-->>TextDecoder: 완전한 프레임 전달
TextDecoder-->>NativeMessagingStream: UTF-8 텍스트 반환
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 62 functions across 8 files. (3 skipped: 3 unsupported.) ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 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 |
|
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. |
There was a problem hiding this comment.
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
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore 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 headc639cd78e3acad235be4cbbfdef67b84ce7ddbfa. -
Head SHA:
c639cd78e3acad235be4cbbfdef67b84ce7ddbfa -
Workflow run: 32132787181
-
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 (5 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (5 files)"]
R1 --> V1["required checks"]
OpenCode Review Overview
Pull request overviewOpenCode cannot approve yet because required coverage evidence did not pass. Review outcome1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
Coverage evidenceCoverage Decision
Changed-File Evidence Mapflowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (5 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (5 files)"]
R1 --> V1["required checks"]
|
There was a problem hiding this comment.
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
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore 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 headc639cd78e3acad235be4cbbfdef67b84ce7ddbfa. -
Head SHA:
c639cd78e3acad235be4cbbfdef67b84ce7ddbfa -
Workflow run: 32139252038
-
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 (5 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (5 files)"]
R1 --> V1["required checks"]
# Conflicts: # CHANGELOG.md # crates/originweave-core/src/root.rs
|
Verified against exact current head 79d8c85: the alleged missing CHANGELOG entry is already present at CHANGELOG.md:19, documenting bounded native-messaging host identity and explicit extension-to-host grants. The finding is stale/invalid; no source change is warranted. |
Merge exact-head native messaging framing boundary into the native-host authority stack.
|
@cwl-noema-review review exact head |
Partial implementation of #27.
Buyer/security gap
Issue #27 requires native messaging only behind explicit host-managed authority and bounded transport. Chrome's
nativeMessagingpermission, a manifest host-name string, or bytes received from a native process must never become OriginWeave Agent authority by implication.Current implementation
The exact branch provides:
ControlRequest/ControlReplyframing helpers and deterministic frame/I/O errors; andThe reader grows only from delivered bytes under the direction limit; an advertised frame length does not cause an unbounded/pre-sized allocation.
Documentation/provenance repair
The branch strengthens
tests/test_doctoring_reference_contract.pysodocs/doctoring.mdanddocs/doctoring/mv3-compatibility.mdretain the immutable Chromium revision/source-path evidence for the native-messaging compatibility claims instead of accepting a movingrefs/heads/mainreference. This does not change production authority or protocol semantics.Fresh protected-main adoption
Protected
mainis exactc789b802fc98a8d7fd8c09d9327f36828054d2a1. The old PR base542ca1e9c0a863595b8b6697790005d2471f5413is two commits behind, and GitHub compare reports no file delta between those protected-main revisions.Commit
cec5992c0bdf32bd9b33c3edf475b95d312bab70therefore adopts current protected main as a second parent while preserving predecessor head90c4e9a8f31eb94eb46243343160d3f6c96921ef's product tree exactly. The branch moved by normal non-force fast-forward; no destructive rebase or force-push was used.Fresh compare against current protected main is 31 ahead / 0 behind, merge base exactly
c789b802fc98a8d7fd8c09d9327f36828054d2a1, with 16 semantic paths: the extension bounded-context crate and its tests, Cargo workspace membership/lock state, CHANGELOG, immutable Chromium doctoring, and repository/documentation contracts. No.github/**, ruleset, provider/model, browser policy, secret, or coverage-denominator change is present.Exact-current evidence
Current exact contributor head is
cec5992c0bdf32bd9b33c3edf475b95d312bab70; GitHub reports the PR open, Draft, content-mergeable, and based on current protected main.Predecessor exact
90c4e9a8...had repository-native CI, Manifest V3, SAST, Security Scan, and coverage success, but also central Strix/Noema/OpenCode control-plane failures or incompleteness. None of that transfers to the new head.Fresh workflows for
cec5992c...have materialized and are non-terminal:33776057802: queued;33776057734: queued;33776057765: queued;33776057846: queued;33776059260: queued;33776057738: queued; andMaterialize Rust nightly refresh once33776057891: completed as skipped and is not product evidence.No exact-current GREEN or independent approval is claimed. Keep Draft until the unchanged head obtains repository contracts, strict Rust checks/rustdoc, exact 100% owned-production function/line/region/branch coverage, pinned-Chromium/MV3 evidence, applicable security/review verdicts, and live governance acceptance.
Truth boundary
This branch does not validate installed native-host manifests or OS registration ownership, launch/sandbox/supervise a native host process, trust arbitrary native-process JSON, authenticate the native peer, resolve secrets, persist authority, or grant arbitrary Agent capabilities.
ControlRequest/ControlReplyremain bounded framing/control contracts only.Protected-main
AGENTS.mdand live governance remain authoritative. This scheduled writer does not merge, self-approve, bypass, force-push, destructively rebase, alter workflows/rulesets/secrets, weaken checks, tag, release, or publish.