test(catalog): refresh the pinned catalog snapshot - #419
Closed
onel wants to merge 1 commit into
Closed
Conversation
Updates testdata/snapshot.json to a current copy of the published catalog. The wire guard checks that every field the catalog serves is one this box models, and this snapshot is what it checks against, so it is worth keeping close to what is actually served. The apps in the snapshot changed; the shape did not. The top-level keys are identical and no app key disappeared. One key is new to the file: external_costs, which wireApp already models but which no published app declared until now, so the guard had never actually exercised it. It does now. That also dates the comment on TestExternalCostsSurviveTheDigest, which said no published app declares a cost. Reworded: the test still builds its own snapshot, so the proof does not depend on which apps happen to be published, but it is no longer the only thing that covers the field.
Confidence Score: 5/5The PR appears safe to merge, with no concrete blocking or non-blocking defects identified. The changes are limited to a refreshed test fixture and an explanatory comment, and the fixture remains aligned with the digest-covered catalog wire model.
|
| Filename | Overview |
|---|---|
| internal/catalog/testdata/snapshot.json | Refreshes the catalog fixture and adds real-world coverage of the modeled external_costs wire field without introducing an identified schema or integrity defect. |
| internal/catalog/wire_test.go | Updates documentation around the existing constructed external-cost digest test; test behavior is unchanged. |
Reviews (1): Last reviewed commit: "test(catalog): refresh the pinned catalo..." | Re-trigger Greptile
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.
testdata/snapshot.jsonis a pinned copy of the published catalog, andTestNoUnmodeledFieldschecks it key by key so a field the catalog serves can never be one this box silently drops. That only works while the copy is close to what is actually served, and it had drifted.The shape did not change; the apps did. Top-level keys are identical, no app key disappeared, and the guard passes.
One key is new to the file:
external_costs.wireApphas modelled it since it landed (wire.go:112), but no published app declared one until now, so the pinned fixture never exercised it. It does now, which is the part of this refresh that actually buys coverage rather than just currency.That also dated the comment on
TestExternalCostsSurviveTheDigest, which stated no published app declares a cost. Reworded rather than removed: the test still constructs its own snapshot, so the byte-fidelity and field-ordering proof does not depend on which apps happen to be published — it is just no longer the only thing covering the field.No production code changes.