Skip to content

fix: the maximal create runs once the minimal object is gone - #120

Merged
ShocOne merged 3 commits into
mainfrom
fix/the-recipe-replays-the-body-that-worked
Aug 26, 2026
Merged

fix: the maximal create runs once the minimal object is gone#120
ShocOne merged 3 commits into
mainfrom
fix/the-recipe-replays-the-body-that-worked

Conversation

@ShocOne

@ShocOne ShocOne commented Aug 26, 2026

Copy link
Copy Markdown
Member

No entity ever recorded a maximal body, so every acceptance configuration fell back to values derived from the document — the thing #119 exists to stop.

The cause

The strategy program created the widest valid body while the object the minimal create had just made was still live, and both bodies are synthesised from the same document. An API that keys an object on any field they share answers the second create with a conflict:

attempt 0  400  "Invalid icon value: tfpfgen-test-icon"  -> drop icon
attempt 1  409  conflict
attempt 2  409  conflict
...                                                       -> to the allowance, then give up

The reduction was working the whole time. It dropped what the API named, and then had nothing left to learn from — a conflict says nothing about how wide a valid body is. buildProgram put the teardown last, unlike the non-strategy plan in plan/steps.go, which deletes before the maximal create.

runCreateMaximal makes a second object and deletes it again, so it belongs after the delete rather than before it.

The result

Maximal bodies are recorded, and the maximal configuration is now genuinely wider than the minimal one — and excludes what the API accepts without ever returning:

resource "thousandeyes_tag" "test" {
  access_type = "all"
  color       = "#FF0000"
  description = "To tag assets in San Francisco"
  key         = "branch"
  object_type = "test"
  type        = "static"
  value       = "sfo"
  # match_type skipped: the API accepted this property and did not return it, so terraform cannot hold it in state
  # filters skipped: the API accepted this property and did not return it, so terraform cannot hold it in state
}

TestUnit_Strategy_TheMaximalCreateFollowsTheDelete pins the ordering.

Also here

NamesRefusedFieldInProse on the quirkserver, with an exhibit. It could only model the unhealable refusal shape — a bare field name in detail beside a generic title — so no test could exercise a create the adjustment loop heals. Real APIs write both forms; now so does the quirkserver.

The recipe learns the body that worked rather than keeping the plan's document-derived guess. Everything downstream replays it. No test here demonstrates a changed outcome — each of those paths heals again on its own, so the guess survives being replayed — and the commit says so. It is still the wrong thing to carry.

handoff.md rewritten. The previous version opened by saying no audit had ever run against any pilot. It now carries the full test-harness reference: which script is the benchmark, what the loop script does, where the credential lives, which files each generated resource carries and which are replayed rather than derived, where the audit writes what it learned, and the ranked next steps.

Measured

sh tf_acceptance_tests.sh1 passed, 34 failed, from 0/35 at the start of this work. 33 of the 34 fail at step 1, because only four entities have a recorded body; the rest still have document-derived configs. Getting more entities through the probe is the next lever and is the top item in the handoff.

make check green at 90.7%.

🤖 Generated with Claude Code

ShocOne and others added 3 commits August 26, 2026 13:00
An API refuses a create two ways. It can leave the bare field name in a
detail beside a generic title, which is deliberately unhealable — a name
alone could be about anything, and the adjustment loop must not guess. Or it
can spell the field into a sentence, which is the form the loop reads.

The quirkserver could only do the first, so no test could exercise a create
the loop heals and a later step then replays. NamesRefusedFieldInProse gives
it the second, with an exhibit asserting both forms.

The recipe also learns the body that worked. Everything downstream replays it
— re-creating this entity as another's parent, narrowing a refused maximal,
cleaning up at the end — and the body the plan started from is the document's
guess, which is what needed healing. No test here demonstrates a changed
outcome: each of those paths heals again on its own, so the guess survives
being replayed. It is still the wrong thing to carry.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
No entity ever recorded a maximal body. The strategy program created the
widest valid body while the object the minimal create had just made was still
live, and both bodies are synthesised from the same document — so an API that
keys an object on any field they share answered the second create with a
conflict:

  attempt 0  400  invalid icon      -> drop icon
  attempt 1  409  conflict
  attempt 2  409  conflict          -> and so on, to the allowance

The reduction was working the whole time. It dropped what the API named and
then had nothing left to learn from, because a conflict says nothing about
how wide a valid body is. The maximal create makes a second object and
deletes it again, so it belongs after the delete rather than before it.

Recorded maximal bodies follow, and with them a maximal configuration that is
wider than the minimal one and excludes what the API accepts without ever
returning:

  color       = "#FF0000"
  description = "To tag assets in San Francisco"
  # match_type skipped: the API accepted this property and did not return it

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…tands

The previous version opened by saying no audit had ever run against any
pilot, which stopped being true some time ago. It described the coverage and
correctness split, and the job is now narrower than that: make the generated
acceptance tests pass, measured by the suite and by nothing else.

What a reader needs and could not find anywhere: which script is the
benchmark, what the loop script does, where the credential lives, which files
each generated resource carries and which of them are replayed rather than
derived, and where the audit writes what it learned.

The score and the failure split are here because they are the state, not a
measurement of the toolkit: counts of what the toolkit emits and refuses stay
in docs/emittance_tracker.md.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ShocOne
ShocOne merged commit 076941a into main Aug 26, 2026
1 of 2 checks passed
@ShocOne
ShocOne deleted the fix/the-recipe-replays-the-body-that-worked branch August 26, 2026 12:32
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