Skip to content

feat: add privacy-preserving presentation identity kernel - #229

Open
seonghobae wants to merge 98 commits into
mainfrom
feat/privacy-presentation-identity
Open

feat: add privacy-preserving presentation identity kernel#229
seonghobae wants to merge 98 commits into
mainfrom
feat/privacy-presentation-identity

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Buyer-visible boundary

This PR adds a pure Rust presentation-identity bounded context for explicit, internally consistent browser-visible profiles and credential-free replay digests. The active delta includes bounded presentation surfaces, fail-closed required-surface admission, bounded User-Agent Client Hints values including control-safe mobile model metadata, and privacy-oriented Canvas/WebGL/WebAudio/WebRTC normalization contracts.

This remains control-plane metadata. It does not inspect the host, patch Chromium, apply a profile to a browser, choose an evidence-free default identity, bypass CAPTCHA/bot-management/access controls, or prove that a page observes the requested values. A pinned real-Chromium adapter plus cross-surface pre-script/post-observation evidence remains required before browser-presentation compatibility can be claimed.

Current protected-main lineage

Protected main is exact 87c4daa1830bac5a5228b6036752ad5633232085 through #286. Exact current head is 024f63690cf05cfe6f0d4a430f0e18ea8fd2c4d6, open, Ready, and mergeable. Fresh compare is 39 ahead / 0 behind with merge base exactly current protected main. The effective delta contains 29 product/docs/test paths and no .github/**, provider/model, secret, browser-launch, network-authority, ruleset, or coverage-denominator mutation.

Current 024f636... is a non-destructive parent-adoption/reconciliation generation. The conflict was limited to tests/test_presentation_identity_documentation_contract.py; the resolution preserves the earlier causal repair that checks exactly one stable presentation-identity changelog entry while separately pinning the truthful boundary that Chromium application and page-observed effectiveness remain future adapter/browser-E2E work.

Hosted repository-contract RED and causal repair

Exact predecessor 7aa30c57a4af724eb4e601c52c1eaf68f27d1712 received hosted CI 33890032169: Production coverage succeeded while Rust contracts failed in Python repository contracts before formatting/Rust/Clippy/rustdoc. The failing contract had frozen an older complete CHANGELOG sentence and rejected a valid newer product fact. Commit 3772d6eddfd556b24397afc80780ef3cc980791e made the narrow repair: require exactly one presentation-identity entry by stable feature prefix and independently require the exact non-shipment suffix. The browser-application boundary therefore cannot silently disappear when the product description gains a truthful new fact.

Exact-current hosted evidence

The first CI emitted by the Ready transition on this exact head, 33930571288, completed skipped under the #286 lifecycle behavior and remains diagnostic evidence only. A subsequent ordinary synchronize on the unchanged Ready head materialized terminal current-head evidence:

  • CI 33930580462: success;
  • Security Scan 33930571275: success;
  • SAST Semgrep 33930571261: success;
  • CodeQL PR 33930571229: failure.

The CodeQL failure is the same organization central-dispatch/verdict control-plane pattern seen on #50 and #37, not an observed presentation-identity source finding. Detect-languages job 101208143940 succeeded. Javascript-typescript 101241595259, actions 101241595274, and python 101241595306 each successfully requested current-head scan dispatch and then failed at Release runner or enforce current-head CodeQL verdict. The exact recurrence is handed to canonical organization issue ContextualWisdomLab/.github#712 in comment 5555411125. Keep the repository leaf fail-closed and do not substitute the skipped Ready-transition run, duplicate central scanning, or blind-rerun the unchanged head.

All currently returned inline review threads are resolved. Exact-current eligible independent approval and live ruleset satisfaction remain separate; no predecessor, skipped, absent, model-only, author-only, or status-only result is promoted to passing acceptance.

Product truth and next slice

The presentation-identity kernel is active-PR evidence, not protected-main shipment and not proof of Chromium/page-observed behavior. The next buyer-visible boundary remains a real Chromium adapter that deterministically applies an admitted profile before page script execution, observes the declared surfaces from the page, verifies the post-condition rather than treating protocol acknowledgement as success, and proves crash/cleanup/security behavior on a pinned Chromium generation. No separate open PR currently owns that adapter slice, but it should not be rushed ahead of the governed browser/runtime prerequisites or used to duplicate Chromium/policy authority already owned elsewhere in OriginWeave.

Protected-main AGENTS.md and live governance remain authoritative. Keep Ready but unmerged until central verdict/review/ruleset gates are satisfied. This scheduled product lane does not merge, self-approve, bypass, force-push, destructively rebase, alter workflows/rulesets/secrets, weaken checks, tag, release, or publish.

Summary by CodeRabbit

  • 새 기능

    • 브라우저 프레젠테이션 정보를 명시적으로 검증하고 일관성을 확인하는 기능을 추가했습니다.
    • 화면, 뷰포트, DPR, 시간대, 플랫폼, 언어 및 사용자 에이전트 힌트를 제한된 값으로 관리합니다.
    • 캔버스, WebGL, Web Audio, WebRTC 관련 표면에 대한 제한적 정규화 계약을 추가했습니다.
    • WebDriver BiDi에서 뷰포트·DPR·시간대 적용 및 정리 명령을 계획할 수 있습니다.
  • 문서

    • 브라우저 어댑터 범위, 개인정보 보호 정책 및 지원 제한을 문서화했습니다.
    • 실시간 WebDriver BiDi 전송은 아직 지원되지 않음을 명확히 했습니다.
  • 테스트

    • 입력 검증, 다이제스트 재생, 표면 완전성 및 정리 동작 검증을 추가했습니다.

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: e6066d1d-f526-4a87-81a2-c6be0b0c1db1

📥 Commits

Reviewing files that changed from the base of the PR and between fa13d8d and a517eb4.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (32)
  • AGENTS.md
  • ARCHITECTURE.md
  • CHANGELOG.md
  • CLAUDE.md
  • Cargo.toml
  • README.md
  • crates/originweave-bidi/Cargo.toml
  • crates/originweave-bidi/src/lib.rs
  • crates/originweave-bidi/src/presentation_capabilities.rs
  • crates/originweave-fingerprint/Cargo.toml
  • crates/originweave-fingerprint/src/lib.rs
  • crates/originweave-fingerprint/src/stealth.rs
  • crates/originweave-fingerprint/src/ua_hints.rs
  • crates/originweave-fingerprint/tests/kernel_contract.rs
  • crates/originweave-fingerprint/tests/presentation.rs
  • crates/originweave-fingerprint/tests/replay_digest.rs
  • crates/originweave-fingerprint/tests/stealth_noise_surface.rs
  • crates/originweave-fingerprint/tests/ua_client_hints_surface.rs
  • docs/README.md
  • docs/adr/0107-browser-protocol-adapter-strategy.md
  • docs/adr/0111-bounded-stealth-normalization-surfaces.md
  • docs/adr/0112-bounded-user-agent-client-hints.md
  • docs/adr/README.md
  • docs/doctoring.md
  • docs/product-roadmap.md
  • docs/product-technical-gap-baseline.md
  • tests/test_adr_index_provenance.py
  • tests/test_bidi_media_authority_contract.py
  • tests/test_fingerprint_dependency_pin_contract.py
  • tests/test_presentation_identity_documentation_contract.py
  • tests/test_repository_contract.py
  • tests/test_webdriver_bidi_presentation_adapter_contract.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/product-roadmap.md
  • docs/README.md

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

명시적 브라우저 프레젠테이션 프로필과 제한된 fingerprint 표면을 검증하는 Rust 커널을 추가했습니다. 버전 고정 WebDriver BiDi 명령 계획과 cleanup 경계를 추가했습니다. 관련 아키텍처, 정책, ADR, 제품 문서 및 계약 테스트를 갱신했습니다.

Changes

프레젠테이션 정체성 및 WebDriver BiDi 경계

Layer / File(s) Summary
프레젠테이션 커널 및 다이제스트
Cargo.toml, crates/originweave-fingerprint/..., tests/test_fingerprint_dependency_pin_contract.py
PresentationProfile이 명시적 화면, viewport, DPR, 동시성, timezone, 플랫폼, 언어 및 reduced-motion 값을 검증합니다. canonical serialization과 SHA-256 다이제스트를 생성하며 replay에서 다이제스트 불일치를 거부합니다.
Stealth 및 UA Client Hints 표면
crates/originweave-fingerprint/src/stealth.rs, crates/originweave-fingerprint/src/ua_hints.rs, crates/originweave-fingerprint/tests/*surface.rs, docs/adr/0111-*, docs/adr/0112-*
Canvas, WebGL, WebAudio, WebRTC 및 UA Client Hints를 제한된 열거형과 입력 검증으로 모델링합니다. 필수 표면이 없으면 fail-closed 결과를 반환합니다.
버전 고정 WebDriver BiDi 명령 계획
crates/originweave-bidi/..., docs/adr/0107-*, README.md, docs/product-roadmap.md
2026-09-03 WebDriver BiDi 기준을 고정합니다. planner는 검증된 viewport, DPR, timezone에 대한 apply 및 cleanup 명령만 생성합니다. 완전한 프로필 승인은 MissingSurface(Screen)으로 실패합니다.
정책, 문서 및 저장소 계약
ARCHITECTURE.md, docs/PRD.md, docs/TRD.md, docs/adr/*, docs/doctoring.md, CHANGELOG.md, AGENTS.md, CLAUDE.md, tests/test_*contract.py
기본 프로필 선택, 브라우저 표면 적용, 우회 금지, BiDi transport와 실행 증거의 분리를 문서화합니다. ADR provenance, workspace 멤버, 의존성 고정 및 문서 상태 계약을 테스트합니다.

Priority: ⬇️ Low

Estimated code review effort: 5 (Critical) | ~120 minutes

Merge Risk: ⚪ Minimal · up to a517e

No actionable correctness, security, availability, or integration risk remains from the finalized findings.

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant PresentationProfile
  participant WebDriverBidiPlanner
  participant BrowserTransport
  Caller->>PresentationProfile: 명시적 프로필 값 검증
  PresentationProfile-->>Caller: validated presentation values
  Caller->>WebDriverBidiPlanner: viewport, DPR, timezone 전달
  WebDriverBidiPlanner-->>Caller: apply 및 cleanup 명령 계획 반환
  Caller->>BrowserTransport: 계획된 명령 전달
  BrowserTransport-->>Caller: transport 결과 및 page-observed 증거는 별도 처리
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목은 프라이버시 보호형 presentation identity kernel 추가라는 주요 변경 사항을 정확하고 간결하게 설명합니다.
Docstring Coverage ✅ Passed Docstring coverage is 90.21% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 143 functions across 20 files. (16 skipped:…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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 feat/privacy-presentation-identity

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.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Review follow-up on exact head eae6ccd: format_ratio now exhaustively matches DevicePixelRatio, and explicit replay accepts only the enumerated language classes. I did not add the suggested set_size == 0 return: returning index 0 would still panic when derive indexes the empty eligible vector, so it is not a valid fail-closed fix. The private derivation sets retain a regression that proves every screen admits at least one enumerated viewport width and height. Full workspace tests, strict Clippy, rustdoc, 144 documentation tests, and 100% production function/line/region/branch coverage pass locally.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

github-advanced-security[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

…9' into codex/bidi-application-completeness-20260909
…rmat-20260909

fix(bidi): restore canonical cleanup formatting
…-capabilities' into codex/bidi-application-completeness-20260909
…tract-repair-20260909

test(bidi): align media authority contract
…on-completeness-20260909

fix(bidi): make reusable application scope explicit
…presentation-capabilities

feat(browser): add versioned WebDriver BiDi presentation boundary

@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 reviewed the current-head product diff. Coverage is a separate gate.

Changed files

  • AGENTS.md — repository behavior
  • ARCHITECTURE.md — repository behavior
  • CHANGELOG.md — repository behavior
  • CLAUDE.md — repository behavior
  • Cargo.lock — Rust workspace or package manifest
  • Cargo.toml — Rust workspace or package manifest
  • README.md — repository behavior
  • crates/originweave-bidi/Cargo.toml — Rust workspace crate API and tests
  • crates/originweave-bidi/src/lib.rs — Rust workspace crate API and tests
  • crates/originweave-bidi/src/presentation_capabilities.rs — Rust workspace crate API and tests
  • crates/originweave-fingerprint/Cargo.toml — Rust workspace crate API and tests
  • crates/originweave-fingerprint/src/lib.rs — Rust workspace crate API and tests
  • crates/originweave-fingerprint/src/stealth.rs — Rust workspace crate API and tests
  • crates/originweave-fingerprint/src/ua_hints.rs — Rust workspace crate API and tests
  • crates/originweave-fingerprint/tests/kernel_contract.rs — Rust workspace crate API and tests
  • crates/originweave-fingerprint/tests/presentation.rs — Rust workspace crate API and tests
  • crates/originweave-fingerprint/tests/replay_digest.rs — Rust workspace crate API and tests
  • crates/originweave-fingerprint/tests/stealth_noise_surface.rs — Rust workspace crate API and tests
  • crates/originweave-fingerprint/tests/surface_admission.rs — Rust workspace crate API and tests
  • crates/originweave-fingerprint/tests/ua_client_hints_surface.rs — Rust workspace crate API and tests
  • docs/PRD.md — operator or user guidance
  • docs/README.md — operator or user guidance
  • docs/TRD.md — operator or user guidance
  • docs/adr/0107-browser-protocol-adapter-strategy.md — operator or user guidance
  • docs/adr/0108-crawler-policy.md — operator or user guidance
  • docs/adr/0110-privacy-preserving-presentation-identity.md — operator or user guidance
  • docs/adr/0111-bounded-stealth-normalization-surfaces.md — operator or user guidance
  • docs/adr/0112-bounded-user-agent-client-hints.md — operator or user guidance
  • docs/adr/README.md — operator or user guidance
  • docs/doctoring.md — operator or user guidance
  • docs/product-roadmap.md — operator or user guidance
  • docs/product-technical-gap-baseline.md — operator or user guidance
  • tests/test_adr_index_provenance.py — regression suite
  • tests/test_bidi_media_authority_contract.py — regression suite
  • tests/test_fingerprint_dependency_pin_contract.py — regression suite
  • tests/test_presentation_identity_documentation_contract.py — regression suite
  • tests/test_presentation_selection_contract.py — regression suite
  • tests/test_repository_contract.py — regression suite
  • tests/test_webdriver_bidi_presentation_adapter_contract.py — regression suite

Changed behavior

classDiagram
  class WebDriverBidiCommandError
  class WebDriverBidiBrowsingContext
  class new
  class as_str
  class WebDriverBidiPresentationCommand
  class plan_standard_presentation_commands
  class plan_standard_presentation_cleanup
  class require_complete_presentation_profile
Loading

Changed API

  • WebDriverBidiCommandError
  • WebDriverBidiBrowsingContext
  • new
  • as_str
  • WebDriverBidiPresentationCommand
  • plan_standard_presentation_commands
  • plan_standard_presentation_cleanup
  • require_complete_presentation_profile
  • PresentationError
  • PresentationSurface
  • require_presentation_surfaces
  • ScreenMetrics
  • ViewportBounds
  • DevicePixelRatio
  • from_ratio
  • PresentationPlatform
  • PresentationTimeZone
  • PresentationDigest
  • PresentationProfile
  • replay
  • languages
  • digest
  • StealthSurface
  • require_stealth_surfaces
  • StealthError
  • CanvasNoise
  • WebGlRendererToken
  • canonical
  • WebAudioRate
  • normalize
  • WebRtcInterface
  • exposes_candidates
  • ClientHintsError
  • UaBrand
  • name
  • version
  • HintsArchitecture
  • from_token
  • HintsBitness
  • HintsPlatform
  • UaClientHints
  • model
  • brands

Findings

No source-backed product finding is synthesized from the coverage gate. A coverage miss belongs in the status comment.

  • Head SHA: a517eb43082173817186624997c252f3ec0c061c
  • Workflow run: 34336163625
  • Workflow attempt: 1
  • Coverage gate: failure

Review outcome

Coverage is a gate, not the review. This body reviews the changed product files.

Changed-File Evidence Map

classDiagram
  class WebDriverBidiCommandError
  class WebDriverBidiBrowsingContext
  class new
  class as_str
  class WebDriverBidiPresentationCommand
  class plan_standard_presentation_commands
  class plan_standard_presentation_cleanup
  class require_complete_presentation_profile
Loading

@opencode-agent

opencode-agent Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

Coverage evidence did not pass, so approval is blocked. The formal pull-request review is the source-backed diff review, not this status comment.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants