fix: the audit reads the refusals it is given - #116
Merged
Conversation
Every entity blocked on its first create. The refusal reader took the first
string-valued key it recognised, so an envelope carrying both a summary
sentence and a list of per-field complaints yielded the summary:
{"detail":"There are invalid or missing fields",
"errors":[{"field":"testName","message":"must not be null"}]}
Nothing in the grammar matches "There are invalid or missing fields", so the
adjustment loop stopped with the one field it needed named in the part it
never read. The listed complaints are now read first, in string and object
form, and two grammars are added for the shapes a validation framework wraps
in prose: a field named mid-sentence before its complaint, and the bare
English that names only the field it wanted. A dotted path reduces to its
last segment, which is the name the request body spells.
Re-creating a parent so a child has something to address now heals like any
other create, and does so without recording: the fields a parent needs are
facts about the parent, and its own steps record them. Recorded here they
would be attributed to whichever child asked for it first.
Measured against the live document: adjustments per run rise from one to
four, and requiredByAPI observations from 78 to 81.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Every entity blocked on its first create. The refusal reader took the first string-valued key it recognised, so an envelope carrying both a summary sentence and a list of per-field complaints yielded the summary:
{"detail": "There are invalid or missing fields", "errors": [{"field": "testName", "message": "must not be null"}]}Nothing in the grammar matches
There are invalid or missing fields, so the adjustment loop stopped with the one field it needed named in the part it never read.What changed
<field>: <complaint>shape the grammar reads.Error in field roleName : must not be null), and the bare English that names only the field it wanted (The loginAccountGroup is required). Both gated on absence-words, so a complaint about the value that was sent is not "healed" by adding one.applyAdjustmentrefuses a field containing a dot.Measured
Against the live document, per run:
requiredByAPIobservationsThe new adjustments are
role.roleName,user.loginAccountGroup, andalerts_rule.roundsViolatingRequired.No vendor name appears in non-test source; the grammars are generic validation English.
🤖 Generated with Claude Code