test(sdk): gate the public API snapshot on secret-bearing exports - #471
Open
Hustler490 wants to merge 1 commit into
Open
Hustler490 wants to merge 1 commit into
Hustler490 wants to merge 1 commit into
Conversation
…und-commit-window
Hustler490
force-pushed
the
fix/412-public-api-snapshot-secret-gate
branch
from
October 4, 2026 15:58
fbe8a77 to
d37f923
Compare
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 #412
What
The public-API snapshot test could not be the gate the issue asks for: it compared a hardcoded name list only, and it could not even run because the SDK barrel was broken.
Changes
packages/sdk/src/errors.ts- restores the missingROUND_CONTRACT_ERRORSblock (RoundContractErrorCode,RoundContractErrorSpec,ContractErrorEntry, the frozen code map,ROUND_CONTRACT_ERRORS_BY_NAME,getRoundContractError,isRoundContractErrorRetryable,diffContractErrorMapping).index.tsre-exports these, so without them importing the SDK threw. Also includesEscrowNotConserved(feat(tlock): add auditor identity recovery cli (#29) #40) fromtypes.rs.packages/sdk/src/public-api.snapshot.json- the committed surface: the true 107 runtime exports plus a committedsecretMentionAllowlist(currently["SubRosaClientConfig"], the documented credential surface that carriessecretKey).packages/sdk/src/public-api-snapshot.test.ts- rewritten to:Acceptance criteria
Validation
node --import tsx --test src/public-api-snapshot.test.ts? 11/11 pass.Note on the repo state
mainalso has pre-existing, unrelated breakage that this PR does not introduce and does not attempt to fix:errors.test.tscannot pass becausecontracts/round/ERRORS.mdmaps code #40 toSealRoundTooEarlywhiletypes.rsmaps #40 toEscrowNotConserved(mutually exclusive), andpnpm typecheckalready reports errors inconservation.ts,network.test.ts,seal-fixture.ts, andtlock/src/seal.ts. The restored block is a strict improvement over the previously un-importable barrel.