Problem
Two new components introduced in #383 lack test coverage:
-
describe-change.sh — the core prefix-resolution script with hand-rolled YAML parsing, a three-level resolution fallback chain, a FOUND: sentinel, JSON escaping, and a format_prefix function handling multiple convention formats.
-
installScripts in install.ts — a new installer code path handling script copying, symlinking, chmod 0o755, drift detection, manifest tracking, and --force/--dry-run modes.
Context
These components were introduced in #383 (configurable change description prefixes). The review cycle identified the missing coverage as T-level findings deferred to keep the feature PR focused.
Solution
describe-change.sh — ShellSpec test suite
Add ShellSpec to the agents package and create content/scripts/__tests__/describe_change_test.sh. Source the script to test functions in isolation (parse_prefix, resolve_prefix, format_prefix, json_escape) and end-to-end for JSON output.
installScripts — Vitest additions
Add focused test cases to packages/agents/src/commands/__tests__/install.test.ts following existing patterns.
Acceptance criteria
describe-change.sh
installScripts
Problem
Two new components introduced in #383 lack test coverage:
describe-change.sh— the core prefix-resolution script with hand-rolled YAML parsing, a three-level resolution fallback chain, aFOUND:sentinel, JSON escaping, and aformat_prefixfunction handling multiple convention formats.installScriptsininstall.ts— a new installer code path handling script copying, symlinking,chmod 0o755, drift detection, manifest tracking, and--force/--dry-runmodes.Context
These components were introduced in #383 (configurable change description prefixes). The review cycle identified the missing coverage as T-level findings deferred to keep the feature PR focused.
Solution
describe-change.sh — ShellSpec test suite
Add ShellSpec to the agents package and create
content/scripts/__tests__/describe_change_test.sh. Source the script to test functions in isolation (parse_prefix,resolve_prefix,format_prefix,json_escape) and end-to-end for JSON output.installScripts — Vitest additions
Add focused test cases to
packages/agents/src/commands/__tests__/install.test.tsfollowing existing patterns.Acceptance criteria
describe-change.sh
type(scope),scope|type,type,'') with both scope and type provided{type}:''): all fields produce emptyFOUND:sentinel)|are parsed correctly (quoted strings)"and\in prefix valuesinstallScripts
Script files appear in
{platformHome}/scripts/after installInstalled script has executable permissions (mode
0o755)Script entries appear in the manifest with
sha256:hash andlinked: falsefor copy modeScript entries appear in the manifest with
linked: truefor link modeModified script is skipped on re-install without
--forceModified script is overwritten on re-install with
--forceDry-run mode does not create scripts directory or write script files
New/modified behavior in this change is covered by tests