docs(idempotency): docs/packages/idempotency.md + tokens-to-ship benchmark variant (#176)#181
Merged
Conversation
…hmark variant (#176) Wraps the idempotency epic with the documentation + benchmark surfaces the rest of the project relies on: docs/packages/idempotency.md - Full reference matching the docs/packages/scaffold.md template: introduction (the why), installation, quick-start (spec block → scaffold → host wiring → curl-replay demo), storage adapter trade-off matrix, full behaviour matrix, round-trip semantics, what does not round-trip yet, testing recipes. - Mirrors the canonical example used in the benchmark prompt so the copy-paste path lands on a working pattern. src/Altair/Idempotency/README.md - Slim package README pointing at the docs page. Same shape as the rest of the sub-packages' READMEs. benchmarks/tokens-to-ship/task-idempotency.md + fixtures/posts-idempotent.openapi.yaml - Third variant in the tokens-to-ship benchmark (after task.md and task-import.md). Frozen prompt + acceptance suite + fixture measure the cost of delivering a *correctly idempotent* endpoint for each arm. - The Posts fixture extends the existing benchmark Posts shape with x-altair-idempotency on POST + PUT plus 400/409 responses for the required-mode + payload-mismatch paths. - Verified end-to-end: * openapi:import --scaffold --persistence=cycle → 5 specs + 38 files, idempotency: block correctly inserted on create.yaml and update.yaml. * openapi:roundtrip on the fixture reports clean (5 operations). Part of #171. Closes #176. Closes epic #171.
This was referenced May 31, 2026
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.
Closes #176. Closes epic #171.
Summary
Wraps the idempotency epic with the doc + benchmark surfaces the rest of the project relies on. With this merged, every consumer of
univeros/idempotencylands on a working pattern, and the framework's position vs. hand-rolled / third-party is measurable rather than rhetorical.What landed
docs/packages/idempotency.mdFull reference matching the
docs/packages/scaffold.mdtemplate:bin/altair spec:scaffold, host wiring, curl-replay demodocs/openapi/extensions.md+docs/openapi/roundtrip.mdsrc/Altair/Idempotency/README.mdSlim package README pointing at the docs page. Same shape as the rest of the sub-packages' READMEs.
benchmarks/tokens-to-ship/task-idempotency.md+ fixtureThird variant of the tokens-to-ship benchmark (after
task.mdandtask-import.md). Frozen prompt + acceptance suite + fixture measure the cost of delivering a correctly idempotent endpoint per arm \xe2\x80\x94 the canonical realistic mutating-API task in 2026.Acceptance delta vs.
task.md:POST /postswithIdempotency-Keytwice (same body) \xe2\x86\x92 both return201with the sameid; second hasIdempotency-Replayed: true.409.400.PUT /posts/{id}.Fixture:
benchmarks/tokens-to-ship/fixtures/posts-idempotent.openapi.yamlextends the existing Posts shape withx-altair-idempotencyon POST + PUT plus400/409response descriptions.Verified end-to-end
Produces 5 specs + 38 scaffolded files. The
idempotency:block is correctly inserted onapi/posts/create.yamlandapi/posts/update.yaml.Reports
clean: 5 operation(s) round-tripped without drift.Test plan
composer cs\xe2\x80\x94 greencomposer stan\xe2\x80\x94 greencomposer rector(full tree, no cache) \xe2\x80\x94 greencomposer test\xe2\x80\x94 6292 tests; no new tests (docs-only change), 0 new failuresbin/altair manifest:generate\xe2\x80\x94 cleanEpic close
#171 is fully delivered:
bbc50bf)3dae23e)idempotency:spec block + scaffolder (5a162af)x-altair-idempotencyround-trip activation (42c3720)