fix: add testing refs and swamp-extension-vault to BUNDLED_SKILLS#971
fix: add testing refs and swamp-extension-vault to BUNDLED_SKILLS#971
Conversation
Update all four skill testing references to document withMockedFetch, withMockedCommand, and local mock server patterns. Each skill doc now covers the appropriate mocking approach for its extension type: - Vault: withMockedCommand for CLI vaults (1password), local mock server + AWS_ENDPOINT_URL for AWS SDK vaults, withMockedFetch for REST API vaults - Datastore: local mock server for S3 verifier, mock client for lock testing, withMockedCommand for CLI-based datastores - Driver: withMockedFetch for HTTP drivers, withMockedCommand for subprocess drivers, local mock server for AWS SDK drivers - Report: withMockedFetch and withMockedCommand for reports that call external pricing APIs or CLI tools Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…KILLS The testing.md reference files for vault, datastore, driver, and report skills were not registered in BUNDLED_SKILLS, so they wouldn't be copied during `swamp repo init` or `swamp repo upgrade`. Also adds the entire swamp-extension-vault skill which was missing from the bundle (SKILL.md + api, examples, testing, troubleshooting refs). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
No blocking issues found. This is a clean, low-risk PR that adds missing skill bundle entries and improves testing documentation.
What was reviewed
- skill_assets.ts: New
BUNDLED_SKILLSentries follow the existing{ relativePath, name }pattern exactly. All referenced files verified to exist on disk. - testing.md updates: Four extension skill testing docs updated with
withMockedFetch,withMockedCommand, and local mock server patterns. Documentation is well-structured and consistent across all four skills. - No libswamp import boundary violations — changes are in the infrastructure layer and skill documentation only.
- No security concerns — static array additions and markdown documentation.
- AGPLv3 header present on
skill_assets.ts.
Suggestions
- The
swamp-extension-vaultentries inBUNDLED_SKILLScould be grouped closer to the otherswamp-vaultentries for readability, but they're already adjacent so this is minor.
LGTM — ship it.
There was a problem hiding this comment.
Adversarial Review
Critical / High
None.
Medium
None.
Low
-
.claude/skills/swamp-extension-datastore/references/testing.md:82-86 — The S3 mock server example setsAWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYas environment variables and deletes them infinally, butAWS_SECRET_ACCESS_KEYis not deleted in the finally block (onlyAWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYare deleted — wait, on re-read both are deleted, this is fine). No issue here actually. -
.claude/skills/swamp-extension-vault/references/testing.md:87 — The AWS mock server example'sfinallyblock deletesAWS_ENDPOINT_URLbut notAWS_ACCESS_KEY_IDorAWS_SECRET_ACCESS_KEY. Similarly, the datastore and driver testing docs have the same pattern in their AWS examples. Since these are documentation examples (not executable code), this is cosmetic, but users copying the pattern could leak test env vars to subsequent tests. Unlikely to cause real issues since these are fake creds in test contexts. -
Documentation-only concern — The vault testing doc removed the
createVaultTestContextusage example (the in-memory test double section) in favor of mock primitive docs. The function still exists and is exported from@systeminit/swamp-testing. Users looking for "how to create an in-memory vault for consumer tests" now have less guidance in this skill doc, though the README in the testing package still covers it. Minor discoverability regression.
Verdict
PASS — Straightforward data additions to BUNDLED_SKILLS (all referenced files verified to exist on disk) and documentation updates adding mock primitive guidance. No logic changes, no security concerns, no breaking changes.
Summary
testing.mdreferences for all extension skills (model, vault, datastore, driver, report) toBUNDLED_SKILLSso they're copied duringswamp repo initandswamp repo upgradeswamp-extension-vaultskill which was missing from the bundle (SKILL.md + api, examples, testing, troubleshooting refs)references/testing.mdwith mock primitive documentation (withMockedFetch,withMockedCommand, local mock server patterns)Without these entries, the testing docs wouldn't be shipped to user repos.
Test Plan
deno checkpasses on skill_assets.tsdeno lintpasses🤖 Generated with Claude Code