fix: a replayed configuration takes back the name it invented - #121
Merged
ShocOne merged 2 commits intoAug 26, 2026
Merged
Conversation
A recorded create carries the values the API accepted, and for most properties that is exactly what a configuration wants. A name is the exception: an API that requires one to be unique accepted the document's example once and refuses it for good afterwards, so the value that proves the shape is the one value a configuration cannot reuse. The invented name carries NamePrefix, which is what WithRunSuffix needs to make it unique per run and what the audit's cleanup contract matches a live object by. Without it a replayed fixture emitted the random_string block and referenced it nowhere. Only name-bearing entries are restored; every other property keeps the value the API took. A field whose document declares a format has no invented name to put back, so a URL, an email or a uuid is never rewritten. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The artifact records the create request bodies an API accepted, and calling it "bodies" left it ambiguous with the response bodies a mock answers with and the collection responses the inference reads. Names it for the half a configuration has to reproduce. Renames the type, its constants and its accessors, the committed path audit/request_bodies/<entity>.request_bodies.json, and the loader's map of components.requestBodies. ListBodies keeps its name: those are responses. Also clears two lint findings the branch carried: an unused parameter on reduceMaximal and a negated conjunction in the program-order test. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ShocOne
deleted the
fix/a-replayed-configuration-takes-back-the-name-it-invented
branch
August 26, 2026 13:21
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.
What this changes
A recorded create carries the values the API accepted, and for most properties that is exactly what a configuration wants. A name is the exception: an API that requires one to be unique accepted the document's example once and refuses it for good afterwards, so the value that proves the shape is the one value a configuration cannot reuse.
FromAcceptedRequestBodynow puts back the invented name of every name-bearing entry a declared example displaced. The invented name carriesNamePrefix, which is whatWithRunSuffixneeds to make it unique per run and what the audit's cleanup contract matches a live object by.Only name-bearing entries are restored; every other property keeps the value the API took. A field whose document declares a format has no invented name to put back —
scalarForkeeps none — so a URL, an email or a uuid is never rewritten.Why it was needed
suffixedEntriessuffixes only strings starting withNamePrefix(tfpfgen-test-). A replayed body carries either a document example or an audit token beginningtfpfgen-<runid>-, so the run suffix fired on none of the replayed fixtures — all four emitted therandom_stringblock and referenced it nowhere. Every run replayed the same constant name and the API refused it.Measured
Against the ThousandEyes pilot, benchmark
sh tf_acceptance_tests.sh:credentialCreate failed (HTTP 400)at step 1Delete failed (HTTP 406)dashboardCreate failed (HTTP 400)at step 1default_timespan,layout)connectors_generictagThe suite total is unchanged at 1 passed — both entities got past the wall this fixes and stopped at different ones behind it. Those two are tracked separately.
Also in this PR
The recorded artifact is renamed for the request bodies it holds:
audit/request_bodies/<entity>.request_bodies.json, with the type, constants and accessors to match, and the loader's map ofcomponents.requestBodies.ListBodieskeeps its name — those are responses. Recorded indocs/glossary.md.Two lint findings the branch carried are cleared: an unused parameter on
reduceMaximal, and a negated conjunction in the program-order test.Verification
make check(90.7% total, all packages above the per-package gate) andgolangci-lint run(0 issues). The pilot tree regenerates andpostcheckpasses.🤖 Generated with Claude Code