Repository navigation
test(ledgergate): keep violation messages as goldens (RIG-8124) - #101
Merged
rigel-nemo[bot] merged 1 commit intoNov 22, 2026
Merged
rigel-nemo[bot] merged 1 commit into
rigel-nemo[bot] merged 1 commit into
Conversation
Add 18 goldens under go/internal/ledgergate/testdata/ts-golden, one per violation message the TypeScript gate prints. Each golden is the stderr that production TypeScript printed at 9bc4735. A MANIFEST.json records that revision for every golden. The goldens are frozen. They are not regenerated and no golden file is edited after capture. The capture tool (tools/golden/capture.ts) is not part of this commit. It retires with the TypeScript gate, and its sources exist only in git history. Goldens list the duplicate-decision-id locus from runOnce's sorted read order (ui before server). The TypeScript test asserts the locus from the evaluate input order (server), so the golden does not pin that assertion. The case where a record is parsed but its decision link does not resolve is not in the Go set. Production readText and readRecord both call resolve(root, path) on the same path, and recordPath is normalized in decision-files.ts, so a listed record always resolves. Refs RIG-8124 Co-authored-by: Matt Wilkinson <matt@rigel.build>
Contributor
Author
|
All-clear at 3151a9b |
|
Checks read:
|
rigel-nemo
Bot
deleted the
go-migration/rig-8124-keep-violation-messages-as-goldens
branch
November 22, 2026 22:43
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 does this do
Adds 18 frozen goldens under
go/internal/ledgergate/testdata/ts-golden/, one per violation message the TypeScript ledger gate prints. Adds twogolden_test.gofiles that compare the Go output to those bytes.Why do we need it
The Go ledger gate must print the same violation messages as the TypeScript gate. The TypeScript gate retires with meissa #100, so its output has to be pinned now.
Summary
MANIFEST.json, captured from the TypeScript gate at revision 9bc4735.tools/.Verification
CGO_ENABLED=0 go vet ./go/...passes.CGO_ENABLED=0 go test ./go/internal/ledgergate/... ./go/cmd/design-ledger-gate/...passes, includingTestGoldenViolationMessagesandTestGoldenConfigLegacyExemptKey.gofmt -lreports no files.Risks
Low. The change adds test data and tests only. Because the goldens are frozen, changing a violation message means a deliberate decision to edit a frozen golden. Nothing regenerates them.
Spec-impact: none
Refs RIG-8124
Co-authored-by: Matt Wilkinson matt@rigel.build