Skip to content

feat(core): add typed semantic node query contract - #57

Draft
seonghobae wants to merge 7 commits into
feat/semantic-node-observationfrom
feat/semantic-node-query
Draft

feat(core): add typed semantic node query contract#57
seonghobae wants to merge 7 commits into
feat/semantic-node-observationfrom
feat/semantic-node-query

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Partial implementation of #28.

Buyer-visible gap

The active semantic-observation lane provides bounded authority-scoped node evidence, but the first real Chromium vertical slice also needs a typed node-query primitive. Without one, later adapters would be tempted to expose arbitrary selector strings, raw DOM search, or model-generated script as the ordinary query contract.

Exact TDD evidence

This Draft remains stacked on exact PR #52 head 94fd284fe41746eeba9edc05d9753903b1c41ebf.

The test-only head d0cd133f5be62fff99612d5b08aa4cf08ce2f29f established the intended RED in CI run 31429065905: repository contracts and formatting passed, while the locked workspace check failed on the deliberately absent public SemanticNodeQuery and SemanticNodeQueryError imports.

The narrow production implementation now provides a public SemanticNodeQuery that:

  • requires at least one explicit typed selector;
  • supports exact semantic-role, exact accessible-name, and required typed-action selection;
  • bounds attacker-controlled role/name text using the same reviewed limits as semantic observations;
  • matches only already-bounded SemanticNodeObservation values rather than raw DOM/protocol identifiers; and
  • returns stable credential-free typed validation errors.

A predecessor implementation head then exposed strict-Clippy collapsible_if failures. Current exact head b4fa49953cbbb21c879a3340e264a6e132e41634 replaces those nested conditions with equivalent bounded Option::is_some_and checks rather than weakening lint policy.

Exact-head acceptance

On exact head b4fa49953cbbb21c879a3340e264a6e132e41634:

  • CI run 31429995885: success;
    • repository contracts: success;
    • rustfmt: success;
    • locked workspace check: success;
    • all workspace tests: success;
    • strict Clippy: success;
    • rustdoc: success;
    • exact owned production function/line/region/branch coverage: success;
  • Manifest V3 Compatibility run 31429997851: success;
  • CodeRabbit exact-head status: success;
  • unresolved review threads: none.

No predecessor-head result is transferred to this exact head.

Scope boundary

This lane adds no browser I/O, CSS/XPath selector language, raw DOM selector surface, arbitrary JavaScript, fuzzy/embedding/model search, action execution, capability grant, persistence, secrets, network authority, workflow mutation or release claim. Query success is descriptive matching only; it cannot authorize or execute an action.

Keep Draft while prerequisite #52/#40 remain active. Canonical whole-product documentation remains owned by PR #44 and tracks this lane only as active/non-shipped evidence.

@coderabbitai

coderabbitai Bot commented Aug 10, 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: ab388e5b-6d77-4bfa-9b0e-eafa33e15825

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