Repository navigation
Conversation
This branch was successfully deployed
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.
test(cli): cover install metadata read/write and schema guard
What changed
Added
packages/agentvouch-cli/test/metadata.test.ts, a previously-missing test file for the CLI install-metadata module (packages/agentvouch-cli/src/lib/metadata.ts). This module writes and reads the per-skillSKILL.md.agentvouch.jsonsidecar used byinstall/update, and itsisInstalledSkillMetadataguard is the gate that rejects stale, corrupt, or tampered metadata with an actionable reinstall error. The guard was untested.Coverage
getInstallMetadataPath: sidecar path construction.buildInstalledSkillMetadata: repo-backed, tree-format, and chain-source mappings, including defaults (defaultinstalled_versionof 1,historical_sol_price_base_unitsof 0).writeInstalledSkillMetadata: pretty JSON with trailing newline, returns the sidecar path.readInstalledSkillMetadata:nullwhen the sidecar file does not yet exist (ENOENT);CliErroron malformed JSON (not install metadata) vs the "not valid JSON" path;schema_versionor invalidsource(isInstalledSkillMetadata);price_lamportsalias in place ofhistorical_sol_price_base_units.Why
metadata.tsis the sole writer/reader of the install sidecar; a regression in the schema guard would let corrupt or old-format metadata be accepted (or valid metadata be rejected), breakingupdate. It had zero test coverage, unlike the surrounding CLI modules (fs, errors, output, http, install, update, vouch).What was verified
npm test --workspace @agentvouch/cli— 14 files, 87 tests passing (10 new).npx --prefix packages/agentvouch-cli tsc --noEmit -p packages/agentvouch-cli— no type errors.npm run format:check— clean (prettier reformatted the new file; no other files touched).Notes
install.test.ts).