Skip to content

fix: the audit reads the refusals it is given - #116

Merged
ShocOne merged 1 commit into
mainfrom
fix/the-audit-reads-the-refusals-it-is-given
Aug 25, 2026
Merged

fix: the audit reads the refusals it is given#116
ShocOne merged 1 commit into
mainfrom
fix/the-audit-reads-the-refusals-it-is-given

Conversation

@ShocOne

@ShocOne ShocOne commented Aug 25, 2026

Copy link
Copy Markdown
Member

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

  • Listed complaints are read first, in string and object form, before the summary keys. An entry that names its field separately is spelled back into the <field>: <complaint> shape the grammar reads.
  • Two grammars for prose-wrapped refusals: a field named mid-sentence before its complaint (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.
  • A dotted path reduces to its last segment — the name the request body spells, since applyAdjustment refuses a field containing a dot.
  • Parent re-creation 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, per run:

before after
adjustments 1 4
requiredByAPI observations 78 81

The new adjustments are role.roleName, user.loginAccountGroup, and alerts_rule.roundsViolatingRequired.

No vendor name appears in non-test source; the grammars are generic validation English.

🤖 Generated with Claude Code

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>
@ShocOne
ShocOne merged commit 4b45555 into main Aug 25, 2026
2 checks passed
@ShocOne
ShocOne deleted the fix/the-audit-reads-the-refusals-it-is-given branch August 25, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant