diff --git a/test/docsync-lifecycle-interface.test.ts b/test/docsync-lifecycle-interface.test.ts index 995d5f672..9ca4c99a1 100644 --- a/test/docsync-lifecycle-interface.test.ts +++ b/test/docsync-lifecycle-interface.test.ts @@ -122,7 +122,8 @@ test('Git guidance uses the existing working directory; --git-dir and --work-tre describe('stored docsync observer commands', () => { const stored = JSON.parse(fs.readFileSync(path.join(import.meta.dir, 'fixtures/docsync-observer-commands.json'), 'utf8')) as { known_good: string[]; known_bad: string[] }; - const fill = (command: string) => command.replaceAll('{repo}', fixture.repo).replaceAll('{other}', path.dirname(fixture.repo)); + const fill = (command: string) => command.replaceAll('{repo}', fixture.repo).replaceAll('{other}', path.dirname(fixture.repo)) + .replaceAll('{home}', fixture.home); test.each(stored.known_good)('harmless read form is accepted: %s', command => { expect(docsCommandAllowed(fill(command), fixture)).toBe(true); }); diff --git a/test/fixtures/docsync-observer-commands.json b/test/fixtures/docsync-observer-commands.json index b44548ef3..9a228b1a9 100644 --- a/test/fixtures/docsync-observer-commands.json +++ b/test/fixtures/docsync-observer-commands.json @@ -1,5 +1,5 @@ { - "_comment": "Bash commands from docsync E2E runs and their mutations. {repo} is the fixture repo, {other} a directory outside it. known_good: read-only forms the observer must accept. known_bad: forms it must keep rejecting.", + "_comment": "Bash commands from docsync E2E runs and their mutations. {repo} is the fixture repo, {other} a directory outside it, {home} the fixture home. known_good: read-only forms the observer must accept. known_bad: forms it must keep rejecting. known_bad also keeps genuine model misses from PR gate runs as negative controls: the Bash grep of ship-docsync-missing-asset 38983306684 (bash#13) and the composed cat; cat of ship-docsync-failure 38984977679 (bash#12).", "known_good": [ "git status", "git -C {repo} status", @@ -30,6 +30,8 @@ "cat actor-state.json 2>/dev/null", "bun arbitrary.ts 2>/dev/null", "git status $EXTRA", - "git status\ntrue" + "git status\ntrue", + "grep -n -i \"14.5\\|documentation\\|Step 15\\|Step 16\" {home}/.claude/skills/gstack/ship/SKILL.md", + "cat {other}/bash-placeholder 2>/dev/null; cat {home}/state/config.yaml" ] }