Repository navigation
Assert page check's markup findings by code and field - #2692
Merged
Merged
Conversation
Tests that matched `page check`'s words for a markup finding now read `page check --json` through `check_findings` and select records by code, element and values. They pin the facts a finding carries, such as the reserved markers each element wears, the lines of a pane's split bodies, the sample a child's error was read in, and the threads activation would move. The checks that still match words read words that are not yet records: a registry contract's `RegistryError`, capture's `ArtifactError`, a sample history's event refusal, and refusals at the thread commands' CLI. No user-visible behaviour changed. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
reviewed
Oct 12, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The two delivery-asset cases now accept an unrelated capture failure. The inline suggestion restores the specific refusals these cases protect.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 12, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 13, 2026
Every gate at the event log's append door now refuses on a `Finding` record (#2662, #2686, #2692 built the type) instead of a sentence. Each refusal has a stable code and the values the gate read: the refused event's `kind`, the identity or field it concerns, and, where a value was refused, what was offered and what would have been admitted. The words for each code are written once, in `findings._TEXT`. - **Gates** in `event_contracts`, `events.UndoReading`, `tasks.task_error`, `work.widget_seat_error`, `read_state` and `layer` return `Finding | None`. `EventRefused` and `AttemptConflict` carry that one finding. A schema refusal (`invalid-event`, `invalid-detail`) names the JSON pointer of its `field` and the schema `rule` it breaks (`registry.schema.schema_complaint`). - **Layer refusals**: `layer.incompatible_layer` and `incompatible_revision` return findings too (`foreign-layer`, `retired-layer`, `foreign-revision`, `retired-revision`), so serving, admission and `page check --json` report the same record. `page check --json` reports the layer's own code where it used `invalid-registry`. - **User words**: `refusals.Refusal`, the string that carried separate words for the browser, is gone. The two codes that have their own user words (`stale-move`, `stale-edit`) get them from `findings._USER`, through `Rejected.user`. - **Transports**: the event door's 400/409 answer carries `findings` beside `error`, which is still the text the browser shows. `Refused.json()` is the one JSON shape of a refusal. A failed thread title records the refusal's code. - **Hook weight**: `findings` imports `registry.schema` only when it writes words. The event log raises findings, and the Codex tool hook reads a quiet page without importing jsonschema (`test_codex_tool_hook_reads_a_quiet_page_without_the_page_model`). No user-visible behaviour changed: every refusal reads as it did, in the browser and on the command line. Tests that matched admission refusal text in-process, or in the door's answer, now read the code and fields through `refused_on`. A heuristic count of test assertions that match the original refusal words fell from 63 to 31. Most of the 31 match the CLI's printed output, and a follow-up PR moves them to a `--json` refusal shape. The rest assert the user-facing words or text that does not come from the append door. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#2686 made the markup checks report records. This PR switches the tests that matched
page check's words for those findings to read the records.interact_support.check_findingsrunspage check --jsonin process and returns the exit status and the findings.foundselects them by code, by element, and by values.The assertions now pin facts that the words only suggested:
(note);That last one now includes the reaction mark that follows its subject. The text assertion it replaced never excluded it.
Some assertions still match words, because what they read is not a record yet:
RegistryError(theinvalid-registryfinding'serror);ArtifactError(capture-failed);sample-history);page checkrefuses before it checks anything;threadandcommentcommands, which have no--json.No user-visible behaviour changed.
I ran the model files
test_interact_contract,test_interact_document,test_interact_anchorsandtest_interact_productin full. I ran each changed journeys test by node ID, injourneys/test_interact_document.py,test_interact_contract.pyandtest_interact_anchors.py.