Repository navigation
Trim shape-only tests in the tool packages (CL-7475) - #666
Merged
Merged
Conversation
Deleted the bundle-shape assertions (declared tool list, approval-flag literals, required env keys) and the pure client-wrapper pass-through tests that only reasserted a request shape or the fixture body already handed to the fetch stub. Kept the cases that test something ours and not obviously correct: input validation before ever calling fetch, a grant/list round-trip, and the two client cases proving a 403/404 from the hub is parsed into the right typed error rather than trusted.
Deleted the two 'bundle's shape' describe blocks (declared tool list, approval flags, required env keys, and the schema-vocabulary check), which only reasserted literals already fixed by the tool definitions themselves. Kept every case that exercises real logic: the read-only tools' validation and formatting behaviour, and each write tool's happy path, unknown-name refusal, and 403 handling.
TheGreatAxios
force-pushed
the
cl-7475-trim-tests
branch
from
September 6, 2026 17:37
f0d7c9a to
dff7777
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.
Part of CL-7475. Owner ruling: test only logic that is ours and not obviously correct; never build tests for coverage. This trims the main-side tool packages accordingly; the e2e/sandbox-sidecar half follows on the #632 branch.
packages/access-tools/src/tool.test.ts
Removed:
Kept: input-validation-before-fetch, the 403-surfaces-as-tool-error case, and the grant/list round trip — these exercise our own logic, not the bundle's static shape.
packages/access-tools/src/client.test.ts
Removed:
All four were pure client-wrapper pass-through tests (assert the request we just built matches the request we just sent). Kept the two cases that prove an untrusted hub response (403/404) is parsed into the right typed error (
AccessForbiddenError/AccessNotFoundError) rather than trusted.packages/catalog-tools/src/tool.test.ts
Removed:
Kept everything else: the read tools' validation/formatting behaviour (pick_models, estimate_run_cost, list_model_concepts) and, per write tool, the happy path plus unknown-canonical-name and 403 refusal cases.
packages/access-tools/test/routes.test.ts, packages/catalog-tools/src/routes.test.ts, packages/tool-registry-publish/src/pack.test.ts
No changes — already limited to 401/403/ceiling/happy-path authz-ceiling coverage (routes) or a genuine packing/import round-trip guard (pack.test.ts), not shape/pin/native-@intX assertions.
Verify
bun test packages/access-tools packages/catalog-tools packages/tool-registry-publish— green (DB-gated routes suite skips locally as expected)bun run typecheck— clean