feat: bind observed nodes to exact browser authority - #17
Conversation
|
Warning Review limit reached
Next review available in: 33 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthrough문서 epoch과 canonical origin에 결합된 노드 핸들 계약을 추가했습니다. 핸들은 현재 문서 컨텍스트와 일치할 때만 유효합니다. 식별자 검증, 오류 동작, 관련 변경 이력을 테스트와 문서에 반영했습니다. Changes문서 노드 권한
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@crates/originweave-core/src/lib.rs`:
- Around line 257-315: Update ObservedNodeHandle to store a BrowsingContextId
and expose it through an accessor, extending new and validate_current to accept
and compare the context alongside origin and document epoch. Add
InvalidBrowsingContextId validation for construction and BrowsingContextMismatch
to NodeHandleError, preserving the existing origin and epoch checks and matching
the required public API.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 181d54ef-3157-4c7c-ae57-cb0c984eb463
📒 Files selected for processing (4)
CHANGELOG.mdcrates/originweave-core/src/lib.rscrates/originweave-core/tests/document_epoch.rsdocs/product-roadmap.md
Buyer-visible gap
Prevent an agent from acting on a node handle that belongs to another browser automation session, tab or frame, origin, navigation, or replaced document. Adapter-local node identifiers can collide across those boundaries, so the handle itself must retain the authority that made the observation meaningful.
Implementation
BrowserSessionId,BrowsingContextId, andDocumentEpochidentities;ObservedNodeHandleto the exact browser session, browsing context, canonical origin, document epoch, and nonzero adapter-local node identifier;originweave-corewithout Chromium, WebDriver, selectors, arbitrary script execution, network, storage, secrets, or model dependencies;TDD evidence
The regression was intentionally split into two independently observed production boundaries.
337f63912acf31a7c7da42550622429cd4bb5708is the formatting-clean test head.31301446454, Rust contracts job93214774032, reachedcargo check --locked --workspace --all-targetsand failed becauseBrowsingContextId, its errors, and the context-aware constructor/validator did not exist.141a25b3d060b8738996b86f57fd88084cc4598eimplemented the context-bound API.787bc764e54d53a940e2c1d34008baa750c83485is the formatting-clean test head.31301938793, Rust contracts job93216018381, reached the same production compile boundary and failed becauseBrowserSessionId, its errors, and the session-aware constructor/validator did not exist.c161c01a729b6d5460de492c34ccaa660080bdbaimplemented the session-bound API.On exact current head
c0c08772942bc8ae7d4106b1f8375f25e7aa7542:31302337557completed successfully;93217061762passed repository contracts, formatting, locked workspace checks, all Rust tests, strict Clippy, and rustdoc;93217061732passed exact function, line, region, and branch enforcement;31302337555and SAST Semgrep31302337574completed successfully;Authority boundary
The numeric identities are OriginWeave-internal opaque registry values, not raw WebDriver, WebDriver BiDi, CDP, renderer, process, frame-tree, or DOM identifiers. A future adapter must translate external identifiers through a session-scoped registry, allocate collision-free internal identities, rotate the document epoch whenever the actionable document lifetime changes, and validate the exact session, context, origin, and epoch immediately before acting.
A valid node handle proves observation authority only. It does not grant a browser capability, origin permission, destination or transport authority, sensitive-data disclosure, merge approval, or successful action post-condition.
Ready for independent review. Merge remains subject to an exact-current-head qualifying non-author formal
APPROVEDreview and a final unchanged-head gate and writer-lease revalidation.