diff --git a/AGENTS.md b/AGENTS.md index e4b33cd1f..89d095611 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -61,6 +61,7 @@ The organization currently documents a **solo-maintainer** governance condition. - Map browser presentation capabilities only when the protocol proves the complete canonical surface: width and height do not prove screen color depth, and one locale does not prove ordered languages. - Keep browser command planning distinct from execution evidence: a typed command intent bound to a validated context has not been sent, acknowledged, or observed by a page. - A reusable presentation planner must accept only the explicitly restorable fields, never a complete `PresentationProfile` whose omitted surfaces could be mistaken for applied. +- When a protocol capability remains discoverable but its unsafe reusable command is removed, update every source-contract assertion to require capability presence and command absence together. - Marking a draft Ready can enqueue a new exact-head run; do not merge from an earlier green result until that new run is terminal and re-fetched. - Do not assume browser/session teardown removed presentation overrides; model explicit cleanup for every override a presentation plan emits and require post-cleanup observation before reusing a browser boundary. - Pin protocol provenance to the immutable dated W3C TR URI; a mutable latest page or lagging index must not silently redefine the capability contract. diff --git a/CLAUDE.md b/CLAUDE.md index 380a6d9ed..ec1e50548 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -13,5 +13,6 @@ Additional constraints: - Do not add hostname reconnect, proxy-environment inheritance, dangerous certificate-verifier hooks, Common Name fallback, TLS 0-RTT, key logging, or secret extraction to a production TLS path. - Keep changes bounded to one product gap and preserve modular crate boundaries. - For partial browser-emulation plans, require only the named restorable fields; do not accept a complete profile unless every requested surface has an explicit application witness. +- A discoverable protocol capability does not justify exposing an unsafe reusable command; contract tests must assert both facts. - A Ready transition can replace an earlier green with a queued exact-head run; wait for its terminal result before merge. - Never claim a test, benchmark, browser integration, TLS identity, GPU execution, release, or merge succeeded without current exact-head evidence. diff --git a/tests/test_webdriver_bidi_presentation_adapter_contract.py b/tests/test_webdriver_bidi_presentation_adapter_contract.py index 9642ebeeb..61d1ad9c2 100644 --- a/tests/test_webdriver_bidi_presentation_adapter_contract.py +++ b/tests/test_webdriver_bidi_presentation_adapter_contract.py @@ -54,7 +54,8 @@ def test_2026_09_03_bidi_capabilities_fail_closed_for_complete_profile(self) -> self.assertIn("ResetViewport", text) self.assertIn("SetTimezone", text) self.assertIn("ResetTimezone", text) - self.assertIn("SetReducedMotion", text) + self.assertIn("PresentationSurface::ReducedMotion", text) + self.assertNotIn("SetReducedMotion", text) def test_presentation_documentation_tracks_published_wd_and_cleanup_symmetry(self) -> None: """Architecture, changelog, and doctoring must describe the same pinned adapter contract.""" @@ -82,7 +83,8 @@ def test_reusable_apply_and_cleanup_do_not_mutate_unrestorable_media_state(self) self.assertNotIn("plan_exclusive_presentation_media_cleanup", text) self.assertIn("plan_standard_presentation_commands", text) self.assertIn("plan_standard_presentation_cleanup", text) - self.assertIn("SetReducedMotion", text) + self.assertIn("PresentationSurface::ReducedMotion", text) + self.assertNotIn("SetReducedMotion", text) standard_apply = text.split("pub fn plan_standard_presentation_commands", maxsplit=1)[1] standard_apply = standard_apply.split(