Repository navigation
Conversation
…ly on a person's grant gui.attestations plans every checkbox and switch on a screen: a field binding's, an attestation to tick, a box the pack leaves alone, or a stop. An undeclared box, a changed statement, a missing grant, an attestation bound to a field or a box ticked before the run touched it all stop the run before anything is ticked. Grants are their own type, so no intake value or derived fact can tick one. judge_attestations settles the planned boxes against a fresh read and is a registered verdict site.
…d the fail-closed list
Independent adversarial review: APPROVEFrom: Gemini Gemini run on 580d532 (model BlockersNone. Non-blockingNone. |
Independent adversarial review: APPROVEFrom: Gemini Gemini run on 95d0e65 (model BlockersNone. Non-blocking
|
…n every one One grant covers one box. A loose spec naming two identical boxes used to plan a tick for both on one grant; now each is a stop and nothing is ticked. From Gemini's non-blocking note on #2501.
Independent adversarial review: APPROVEFrom: Gemini Gemini delta review on 77e7103 (model BlockersNone. Non-blockingNone. |
What this adds
In the Set 4 v2 held-out run (#2464), attestation boxes were bound to intake facts, such as
confirm_details: trueor a derivedflow.confirm_declarations. The run therefore ticked statements nobody had made for that case. Those boxes were also left out of the read-back as not checked. This change makes attestations general and fail-closed.AttestationSpec(pack data). It names one checkbox or switch and the SHA-256 of its statement. By default the statement is the box's label. Withstatement_from="container", it is the text of the innermost container instead, for a box labelled "I agree" that sits under a paragraph.AttestationGrant. It is handed to the run by the person who attests, for one statement digest. It is its own type: a bool, an intake value, a mapping or any derived fact passed as a grant raisesTypeError.check_pack. It refuses a pack whose field bindings name a declared attestation.plan_checkboxes. It decides every checkbox and switch on the screen before anything is ticked:apply_attestationsrefuses a plan that has any stop.learn_attestations. It suggests candidates from a demonstration: boxes the demo ticked that no binding covers, and boxes it never touched. They are suggestions only and never written into a pack.judge_attestations(@verdict_site). It settles the planned boxes against a fresh read. Each box must show the planned state, and its statement must still hash to the planned digest. A box the plan never saw is unexpected, an unread state is not checked, and an empty plan never passes.The engine has no "I agree" word list. A box is an attestation only because the pack says so.
Tests
tests/gui/test_gui_attestations.pyhas 11 tests:check_pack, and the plan stops on it. With a grant, it is ticked inside the dialog and read back.The fail-open harness runs its generic mutations on
judge_attestations. A hand-made fail-open copy that usesall()over ticks, ignores statements and ignores unplanned boxes fails M3, M5, M7, M8, M10, M15 and P0. While writing the spec, the harness found a real problem: a refuted box with a conflicting second read dropped to not checked. The fix keeps any refutation on top. The fold ratchet is unchanged.Everything is synthetic, headless Chromium on the Mac, single-process.
The browser adapter now names ARIA checkbox, switch and radio widgets from their content, and keeps up to 2,000 characters of container text, so a whole statement can be pinned.
Base
The base is #2499 (links as steps), which sits on #2476. The
form_txreconciler is not wired up here. To adopt this, the form layer would drop itsconfirm_*fact bindings in favour ofAttestationSpecplus grants on the run request, and callplan_checkboxesbefore each screen's commit.