mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-01 06:24:41 +01:00
test(docsync): fixtureDocs installs the generated sections/preamble.md (hunk taken from #3472)
A generated skill that loads the shared preamble names sections/preamble.md
as a required asset before skill start, and a spawned document-release child
blocks on its absence, so docsync-spawned stayed red on every #3434 screen.
fixtureDocs now copies that file when the generated skill has it.
This single hunk is taken unchanged from gstack#3472 (head 2e3f7ba1,
GSTA-107), which trains ahead of #3434, so the train merge sees identical
lines. Nothing else from #3472 is included.
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
3858703ac9
commit
76e87ffb2f
1 file changed
+6
-2
@@ -60,9 +60,13 @@ export function fixtureDocs(scenario: DocsScenario, generatedRoot = process.env.
|
||||
write('personal-note.txt', 'Unrelated user content: KEEP THIS EXACTLY.\n');
|
||||
for (const skill of ['document-release', 'ship']) {
|
||||
fs.mkdirSync(path.join(skills, skill, 'sections'), { recursive: true });
|
||||
for (const relative of skill === 'ship'
|
||||
const required = skill === 'ship'
|
||||
? ['SKILL.md', 'sections/documentation.md', 'sections/pr-body.md']
|
||||
: ['SKILL.md', 'sections/audit-scope.md', 'sections/release-body.md']) {
|
||||
: ['SKILL.md', 'sections/audit-scope.md', 'sections/release-body.md'];
|
||||
// A generated skill that loads a shared preamble names sections/preamble.md as a
|
||||
// required asset before skill start; a spawned child blocks on its absence.
|
||||
const preamble = fs.existsSync(path.join(generatedRoot, skill, 'sections/preamble.md')) ? ['sections/preamble.md'] : [];
|
||||
for (const relative of [...required, ...preamble]) {
|
||||
const source = path.join(generatedRoot, skill, relative);
|
||||
if (!fs.existsSync(source)) throw new Error(`Generate the changed skill before live evaluation: ${source}`);
|
||||
fs.copyFileSync(source, path.join(skills, skill, relative));
|
||||
|
||||
Reference in new issue
Block a user