Handbook
Task `pw_selector_harden` v1
Rank selector strings by robustness for an authorized ingest page given inventories/snippets and constraints (roles, generated-class avoidance, root scope). LCDL does not execute DOM queries.
Task pw_selector_harden v1
Summary
Rank selector strings by robustness for an authorized ingest page given inventories/snippets and constraints (roles, generated-class avoidance, root scope). LCDL does not execute DOM queries.
Inputs
| Field | Type | Required | Notes |
|---|---|---|---|
selector_candidates |
array | yes | Candidate strings (may be []). |
element_inventory |
object | yes | Compact inventory from runtime (may be {}). |
html_snippets |
array | yes | Short HTML excerpts only (may be []). |
constraints |
object | yes | e.g. prefer_roles, avoid_generated_classes, must_be_within_root. |
temperature |
number | no | Default 0.05. |
timeout_sec |
int | no | Default profile.timeout_sec. |
Output
| Field | Type | Notes |
|---|---|---|
ranked_selectors |
array of object | Each: purpose (string), selector (string), confidence (number → [0,1]), reason (string). |
rejected_selectors |
array of object | Each: selector (string), reason (string). |
Policy
- Single JSON object only; no executable payloads.
Changelog
- v1 — Initial selector hardening.