mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-01 14:34:42 +01:00
test(docsync): keep the two docsync model misses as negative controls (W3-3)
The Bash grep of ship-docsync-missing-asset (PR gate run 38983306684,
bash#13) and the composed cat; cat of ship-docsync-failure (38984977679,
bash#12) were correct rejections. They join the stored known_bad commands
(with a {home} placeholder for the fixture home); no detector change.
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
2b125f1bcf
commit
fcfba0ec91
2 files changed
+6
-3
No files matched your search
@@ -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);
|
||||
});
|
||||
|
||||
+4
-2
@@ -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"
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user