mirror of
https://github.com/garrytan/gstack.git
synced 2026-10-31 14:06:50 +01:00
fix(docsync): install lib/ beside bin/ in the fixture so the declared cap gate can load (2524ec4 rerun: module error, not a verdict)
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
85cb9aa6b2
commit
0230fc29a5
2 files changed
+12
No files matched your search
@@ -543,4 +543,10 @@ test('Step 14.5 housekeeping commands and the docs record are declared exactly a
|
||||
expect(docsToolFailures(write(path.join(fixture.repo, '.gstack/tmp/review-loop.json')), fixture, [], false)).toEqual(['non-document product write attempt', 'write outside docs fixture authority']);
|
||||
expect(docsToolFailures(write(path.join(fixture.repo, '.gstack/ship-policy.json')), fixture, [], false)).toEqual(['non-document product write attempt', 'write outside docs fixture authority']);
|
||||
expect(gitAt(fixture.repo, 'rev-parse', '--verify', 'origin/main')).toBe(gitAt(fixture.repo, 'rev-parse', '--verify', 'main'));
|
||||
// The declared gate must run from the fixture install: bin/gstack-ship-receipt imports ../lib/*, so the install carries lib/ too.
|
||||
const gate = spawnSync('bun', ['--no-env-file', '--config=/dev/null', path.join(fixture.skills, 'bin/gstack-ship-receipt'), 'docs-caps', '--base', 'main'],
|
||||
{ cwd: fixture.repo, encoding: 'utf8', env: { ...process.env, ...fixture.env, HOME: fixture.home }, timeout: 60_000 });
|
||||
expect(gate.stderr).toBe('');
|
||||
expect(gate.stdout.trim()).toBe('DOCS_CAP: none declared');
|
||||
expect(gate.status).toBe(0);
|
||||
});
|
||||
@@ -78,6 +78,12 @@ export function fixtureDocs(scenario: DocsScenario, generatedRoot = process.env.
|
||||
recursive: true,
|
||||
filter: source => !fs.statSync(source).isFile() || fs.statSync(source).size < 5_000_000,
|
||||
});
|
||||
// Step 14.5's cap gate (bin/gstack-ship-receipt docs-caps) imports ../lib/*; an install without lib/ fails the gate
|
||||
// with a module error instead of a DOCS_CAP verdict (gate at 2524ec4: both lifecycle cases blocked on it).
|
||||
fs.cpSync(path.join(DOCSYNC_ROOT, 'lib'), path.join(skills, 'lib'), {
|
||||
recursive: true,
|
||||
filter: source => !fs.statSync(source).isFile() || (/\.(?:ts|json)$/.test(source) && fs.statSync(source).size < 5_000_000),
|
||||
});
|
||||
const state = path.join(home, 'state');
|
||||
fs.mkdirSync(state);
|
||||
fs.writeFileSync(path.join(state, 'config.yaml'), 'update_check: false\n');
|
||||
|
||||
Reference in new issue
Block a user