Skip to content

feat(core): admit locateNodes only after QueryNodes proof - #172

Closed
cursor[bot] wants to merge 33 commits into
test/browser-context-origin-epoch-protocol-dispatchfrom
cursor/bc-9f7d0371-8631-4a99-b948-382ae43f4d76-75c0
Closed

feat(core): admit locateNodes only after QueryNodes proof#172
cursor[bot] wants to merge 33 commits into
test/browser-context-origin-epoch-protocol-dispatchfrom
cursor/bc-9f7d0371-8631-4a99-b948-382ae43f4d76-75c0

Conversation

@cursor

@cursor cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown

Successor to #171 on exact prerequisite #127 head 65f51937ff2af64d9c157666e7c3b7df89cbb89a.

Buyer/security gap

#171 can translate an untrusted locateNodes result into ObservedNodeHandle values after current session/context/origin/epoch checks, but a caller can still invoke bind_current_nodes without proving QueryNodes / SemanticObservation. Navigation-only or TypedInput-only adapters must not mint observation handles. The same locator and identifier gates also still admitted Unicode format and bidirectional-override characters that are neither char::is_control nor ordinary whitespace.

TDD sequence

  1. Test-only 2533394 established the missing-production RED for admit_query_nodes.
  2. 4186437 consumes a non-cloneable QueryNodes protocol-use proof, then calls bind_current_nodes. Navigation-only and TypedInput-only descriptors fail closed. Control-bearing and omitted sharedId values fail as locateNodes admission errors after the protocol proof succeeds.
  3. 87e1e71 records the QueryNodes admission boundary in CHANGELOG, doctoring, API, architecture, ADR 0010, and the roadmap.
  4. Test-only 685d517 established the missing-production RED for zero-width and bidi-override format characters.
  5. 816fa1f rejects the reviewed Unicode format-character set in roles, names, sharedId, and registry external identifiers. Ordinary U+0020 spaces in accessible names remain valid.
  6. ef4a3b7 cites UTS test(mv3): require repeated compatibility evidence #39 Revision 32, UAX [Product Gap] Bound HTTP/1.1 semantics over the authenticated TLS stream #9, and the superseded UTR docs: reconcile product documentation baseline onto current main #36 report.

Exact-current proof

On unchanged exact head ef4a3b7bc5e4ee509aaf857b880945eff4bba5d7 in this workspace:

  • cargo test --locked -p originweave-core --all-targets succeeded;
  • cargo clippy --locked -p originweave-core --all-targets -- -D warnings succeeded;
  • RUSTDOCFLAGS='-D warnings' cargo doc --locked -p originweave-core --no-deps succeeded;
  • cargo fmt --all --check succeeded;
  • product-documentation and documentation-fitness Python contracts succeeded.

This does not transfer #171, #138, or #127 check, review, coverage, or merge evidence. Keep Draft while #127 and its prerequisite stack remain active. Workspace verification is not GitHub CI, production-coverage, or independent approval evidence.

Truth boundary

This still does not serialize a BiDi command, authenticate Chromium, observe a live accessibility tree, authorize typed input, or prove a post-condition. A later adapter must sample the query result from a trusted transport and revalidate the returned handles immediately before action.

Prefer this branch over #171 for QueryNodes admission and format-character rejection. Do not merge this Draft.

seonghobae and others added 30 commits August 13, 2026 08:32
Close the locateNodes result-item gap by requiring the exact node remote
type and a usable sharedId within the registry identifier budget before
an untrusted adapter value can be retained as a later handle.

Co-authored-by: Seongho Bae <[email protected]>
Require fail-closed rejection of whitespace and control injection in
accessibility roles, accessible names, BiDi sharedIds, and registry
external identifiers before production support exists.

Co-authored-by: Seongho Bae <[email protected]>
Fail closed on whitespace or control characters in exact accessibility
roles, accessible-name locators, BiDi sharedIds, and registry external
identifiers so untrusted protocol text cannot become a later handle.

Co-authored-by: Seongho Bae <[email protected]>
Require a fail-closed composition that revalidates the exact current
session/context/origin/document epoch, rejects over-budget or non-node
items, and translates admitted sharedIds into ObservedNodeHandle values
before production support exists.

Co-authored-by: Seongho Bae <[email protected]>
Correct a missing comma so the intended missing-production compile
failure is not hidden by a test-harness syntax error.

Co-authored-by: Seongho Bae <[email protected]>
Revalidate the exact current session, context, origin, and document
epoch, admit every untrusted result item first, then translate shared
node identities through the registry into ObservedNodeHandle values.

Co-authored-by: Seongho Bae <[email protected]>
Add the failing contract that an untrusted locateNodes result cannot
become ObservedNodeHandle values unless the adapter proves
SemanticObservation on the exact current session, context, origin, and
document epoch.

Co-authored-by: Seongho Bae <[email protected]>
Consume a non-cloneable SemanticObservation protocol-use proof before
bind_current_nodes can translate untrusted sharedId values into current
ObservedNodeHandle values. Navigation-only and TypedInput-only adapters
fail closed.

Co-authored-by: Seongho Bae <[email protected]>
Keep CHANGELOG, doctoring, API, architecture, ADR 0010, and the roadmap
aligned with the same-call proof that observation handles require
QueryNodes capability and current document authority.

Co-authored-by: Seongho Bae <[email protected]>
@seonghobae
seonghobae changed the base branch from main to test/browser-context-origin-epoch-protocol-dispatch August 16, 2026 15:39
cursoragent and others added 3 commits August 16, 2026 15:39
Add the failing contract that zero-width and bidi-override format
characters cannot be admitted in accessibility roles, accessible names,
BiDi sharedId values, or registry external identifiers.

Co-authored-by: Seongho Bae <[email protected]>
Fail closed on reviewed Default_Ignorable and bidirectional format
characters in accessibility locators, BiDi sharedId values, and registry
external identifiers. Ordinary spaces in accessible names remain valid.

Co-authored-by: Seongho Bae <[email protected]>
Record the local fail-closed format-character policy and cite the
current Unicode security-mechanisms standard, the bidirectional
algorithm, and the superseded UTR 36 report.

Co-authored-by: Seongho Bae <[email protected]>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Do not merge this Draft. Same-automation identity cannot file REQUEST_CHANGES on this head; treat the following as a merge-blocking authority gap, not an approval.

The QueryNodes wrapper exists, but the minting path this PR says it closed is still public and ungated. admit_query_nodes proves SemanticObservation, then drops the non-cloneable ValidatedBrowserProtocolUse and calls public bind_current_nodes with no proof. webdriver_bidi_locate_nodes_admission.rs still mints ObservedNodeHandle values from a well-formed locateNodes list with no adapter, no QueryNodes, and no SemanticObservation. A Navigation-only or TypedInput-only caller uses that API and bypasses the gate.

Successor work on this run consumes the proof by value on bind_current_nodes and rejects any capability other than SemanticObservation. Prefer that successor over #172, #171, and #138. Keep Draft while #127 remains active. Do not treat in-progress checks as merge evidence.

Open in Web View Automation 

Sent by Cursor Automation: Fix Issues

/// This method performs no browser I/O, does not authenticate Chromium, and does not grant
/// policy, destination, or typed-input authority. A later action must still revalidate the
/// returned handles immediately before use.
pub fn bind_current_nodes(

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

bind_current_nodes is still a public ungated mint. It takes only a registry, a current-authority target, and untrusted (&str, Option<&str>) items. After session/context/origin/epoch checks it calls bind_node and returns ObservedNodeHandle values with no descriptor, capability, or ValidatedBrowserProtocolUse.

That is the #171 bypass this PR names. Integration tests lock the bypass in by calling this method with no protocol proof. Require the non-cloneable SemanticObservation proof by value and fail closed for Navigation and TypedInput proofs.

required_originweave_protocol_version,
runtime_metadata,
BrowserProtocolOperation::QueryNodes,
|_validated, _operation, _epoch| (),

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The dispatch callback is built to move ValidatedBrowserProtocolUse by ownership. This callback drops it (|_validated, …| ()), then bind_current_nodes runs as a second independent public call. The proof is advisory sequencing, not an authority transfer.

Return the proof from the callback and pass it into bind_current_nodes so node minting cannot proceed without consuming SemanticObservation.

Copy link
Copy Markdown
Contributor

Superseded by #174 after fresh exact ancestry verification. Current #174 head d83fec050a2e5dee53ae4137220140885ef443b4 has this exact head ef4a3b7bc5e4ee509aaf857b880945eff4bba5d7 as its merge base and is ahead 3 / behind 0. The complete QueryNodes admission and Unicode-format hardening remains preserved in #174, which adds the dependent SemanticObservation-proof consumption boundary. Closing this duplicate review vehicle transfers no checks/reviews/coverage/approval; #174 remains Draft behind #127 and must independently revalidate its exact head.

@seonghobae seonghobae closed this Aug 16, 2026
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.

2 participants