You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a2cca12
Browse filesBrowse the repository at this point in the historyBrowse files
test: every error variant's code is checked without a hand-kept list of codes
Each of stack-profile, stack-auth, stack-kms and stack-encrypt carried a
public ERROR_CODES list that only its own tests read: a test built every
variant, required its code to be listed, and required every listed code
to be produced. Adding or renaming a code meant editing the list too, and
the list still could not catch a variant missing from the test's rows.
The lists are gone. Each crate's test builds one of every variant and
checks its code is in the crate's namespace and snake_case, or, for a
variant that wraps another crate's error, in that crate's. The rows are
written `pattern => value` through a small test macro whose patterns are
the arms of a match with no wildcard, so a variant without a row fails to
compile, and each row must build the variant its pattern names. That
found two StackKmsBuilderError variants, Auth and InvalidConfig, the old
test never built.
AuthError::ERROR_CODES, the frozen list the TypeScript bindings and the
Go auth guest read, is unchanged. A renamed code now shows only as the
changed #[diagnostic(code(...))] line in review.
Refs #1099
Claude-Session: https://claude.ai/code/session_01URtfKsTToFUCRwq3g7gCUf
0 commit comments