Skip to content

feat(extension): bound native messaging framing - #154

Draft
seonghobae wants to merge 15 commits into
feat/native-messaging-host-authorityfrom
feat/native-messaging-framing-boundary
Draft

feat(extension): bound native messaging framing#154
seonghobae wants to merge 15 commits into
feat/native-messaging-host-authorityfrom
feat/native-messaging-framing-boundary

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Partial implementation of #27, stacked on live PR #82 (feat/native-messaging-host-authority).

Buyer/security gap

PR #82 establishes exact extension-to-native-host authority but intentionally leaves native-messaging stdio framing and process integration unimplemented. A hostile or buggy host must not be able to make OriginWeave accept an unbounded, truncated, overlong, directionally oversized, or invalid-text native-messaging frame before a later adapter parses JSON or treats payload bytes as untrusted observation data.

Current dependency / stack state

The independently resolved live prerequisite is exact #82 head 427d2f32431139dc7ed59e60df00fd9d0c4eeba0. Current exact #154 head is d2e1ae8d654703b76897db202980fec82d26babc.

The prerequisite moved after this Draft was opened by adding public native-host/request identity getters and their tests. The previous #154 head 5a66d3687092aedcd83bb04ae06b0051087e2892 had not incorporated those production getters while its inherited/native-messaging tests expected them. Exact CI run 31906244904, Rust contracts job 95064418409, therefore failed first at the locked workspace check with four E0599 missing-method errors for extension_id / host_name.

The current head non-destructively merges the live prerequisite as a second parent while preserving this PR's framing delta. Fresh ancestry comparison reports #154 ahead of #82 with behind_by=0 and merge base exactly 427d2f32431139dc7ed59e60df00fd9d0c4eeba0. No prerequisite check, review, status, mergeability result, or synthetic merge result is transferred.

Keep Draft while #82 remains active.

RED -> RCA -> GREEN

  1. Test-first head cdf290eed42e3d2cf1d3c8f9532f7f97452c6509 established the missing framing contract. CI run 31797616110 reached cargo check --locked --workspace --all-targets and failed because the framing API did not yet exist.
  2. Production added only the bounded framing primitive: direction-specific 1 MiB host-to-browser and 64 MiB browser-to-host payload ceilings, a native-endian 32-bit payload-length prefix, rejection of oversized payloads before encoder allocation, rejection of oversized advertised lengths before decoder slicing, exact total-frame-length equality, UTF-8 validation for text frames, and standard source-free error integration.
  3. Implementation head b5ec0ae0abe00b3d051f0a868e57f883eb13829c exposed canonical rustfmt differences; 9e0bdb05bfbb023f9739e41f5c877776eae7cb14 applied them and was exact-green against its then-current base.
  4. Later feat(extension): bound native messaging host authority #82 movement exposed the stack-drift compile failure described above. Current head d2e1ae8d654703b76897db202980fec82d26babc repairs the dependency topology without force-push, destructive rebase, or semantic broadening.

Current exact-head evidence

On unchanged exact head d2e1ae8d654703b76897db202980fec82d26babc against exact live prerequisite 427d2f32431139dc7ed59e60df00fd9d0c4eeba0:

  • CI run 31908472261: success;
  • Rust contracts job 95069845044: repository contracts, canonical formatting, locked workspace/all-target check, full tests, strict Clippy, and rustdoc success;
  • Production coverage job 95069845104: exact owned-production function/line/region/branch measurement and enforcement success;
  • Manifest V3 Compatibility run 31908472054: success;
  • formal reviews: none currently returned;
  • inline review threads: none currently returned; and
  • GitHub reports the PR open, mergeable, and Draft.

Security/SAST workflows not generated for this stacked Draft base are absent and are not represented as passing evidence. Skipped diagnostic-upload steps are likewise not promoted as passing gates. No predecessor-head, prerequisite-head, queued, pending, skipped, cancelled, absent, stale, status-only, model-only, or synthetic evidence is promoted as current proof.

Truth boundary

This slice is framing/resource-boundary work only. It does not spawn or sandbox a native host, validate an installed host manifest or operating-system registration owner, parse or trust JSON, authenticate message provenance, authorize Agent actions, expose secrets, persist authority, or claim complete Chromium native-messaging integration. A later trusted process adapter must compose exact host authority, registered-host/process ownership, bounded binary stdio, JSON parsing, and untrusted-message classification without turning Chrome nativeMessaging permission into Agent authority.

@coderabbitai

coderabbitai Bot commented Aug 14, 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: 3bb80e3d-6f02-4255-bd70-77d926985e26

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