test(tmproto): pin unknown-type and unknown-method wantErr substrings#204
Draft
bokelley wants to merge 1 commit into
Draft
test(tmproto): pin unknown-type and unknown-method wantErr substrings#204bokelley wants to merge 1 commit into
bokelley wants to merge 1 commit into
Conversation
Tighten two overly-broad wantErr assertions in robustness_test.go: - ArtifactRef "unknown type": "type" → "not a known ArtifactRefType" - AssetAccess "unknown method": "method" → "not a known AssetAccessMethod" The old substrings matched any error containing the field name prefix, making wrong-error regressions invisible. The new substrings pin the exact discriminating phrases already emitted by validate_ladder.go, so a regression to a different error class still fails while preserving the no-caller-bytes invariant (wantNot guards unchanged). Closes #200. https://claude.ai/code/session_01MjgZzyRVRrXju1ozznUSLT
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 #200.
Tightens two overly-broad
wantErrsubstrings intmproto/robustness_test.gothat were too generic to catch wrong-error regressions:TestArtifactRef_Validate"unknown type":"type"→"not a known ArtifactRefType"TestAssetAccess_Validate"unknown method":"method"→"not a known AssetAccessMethod"The old substrings matched any error containing the field-name prefix (
artifact_ref.type,asset_access.method), so a regression that returned a different error class (e.g.,"required"instead of"not a known …") would still pass. The new substrings pin the exact discriminating phrases already emitted byvalidate_ladder.go, making wrong-error regressions visible while keeping the no-caller-bytes invariant intact (wantNotguards are unchanged). No production code touched.What tested
go build ./...— cleango vet ./tmproto/...— cleango test ./tmproto/... ok 0.035s— all 195 tests pass including the two tightened casesgo test ./... ok— full root-module suite passesPre-PR review
Session: https://claude.ai/code/session_01MjgZzyRVRrXju1ozznUSLT
Generated by Claude Code