From c74c3df07354977d1a2f26887a0e3d3962e06d7d Mon Sep 17 00:00:00 2001 From: garrytan Date: Sun, 4 Oct 2026 19:23:45 +0000 Subject: [PATCH] E6: a block that reads a SKILL.md is not a missing install The first live codex-multiblock-live run passed its real check (the /learn block found the install and printed the seeded learning) but the oracle flagged a sed of the learn SKILL.md, whose prelude source quotes the 'gstack: no install found (tried $_r)' text. Only an emitted line that starts with the message and names a real root counts now; free replay negative added. --- test/codex-multiblock.test.ts | 5 +++++ test/helpers/codex-multiblock.ts | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/test/codex-multiblock.test.ts b/test/codex-multiblock.test.ts index c96ca181b..42c46aed5 100644 --- a/test/codex-multiblock.test.ts +++ b/test/codex-multiblock.test.ts @@ -29,6 +29,11 @@ describe('multiblockProblems', () => { expect(problems[0]).toStartWith('a block could not find the install'); }); + test('a block that reads a SKILL.md quoting the prelude is not a missing install (live run 2026-10-04)', () => { + const read = command("sed -n '1,120p' \"$CODEX_HOME/skills/gstack-learn/SKILL.md\"", `---\nname: learn\n---\n\n\`\`\`bash\n${PRELUDE}\n\`\`\`\n`, 0); + expect(multiblockProblems(run(preamble, read, command(SHOW_RECENT, LISTING, 0)))).toEqual([]); + }); + test('the pre-prelude symptom (an empty root, /bin/gstack-slug) fails', () => { const problems = multiblockProblems(run(command('SLUG=$($GSTACK_ROOT/bin/gstack-slug --get SLUG)\n$GSTACK_ROOT/bin/gstack-learnings-search', 'bash: line 1: /bin/gstack-slug: No such file or directory\nbash: line 2: /bin/gstack-learnings-search: No such file or directory\n', 127))); diff --git a/test/helpers/codex-multiblock.ts b/test/helpers/codex-multiblock.ts index eaef4edf9..e2cb180e7 100644 --- a/test/helpers/codex-multiblock.ts +++ b/test/helpers/codex-multiblock.ts @@ -35,7 +35,10 @@ export function multiblockProblems(rawLines: readonly string[], sentinel = MULTI const commands = completedCommands(rawLines); const problems: string[] = []; for (const { command, output } of commands) { - if (output.includes('gstack: no install found')) problems.push(`a block could not find the install: ${output.trim().slice(0, 200)}`); + // The emitted line names the root it tried; the prelude's source text + // (a block that reads a SKILL.md) quotes it mid-line with `$_r`. + const missing = /^gstack: no install found \(tried (?!\$)[^\n]*/m.exec(output); + if (missing) problems.push(`a block could not find the install: ${missing[0].slice(0, 200)}`); const unresolved = /\S*\/bin\/gstack-[\w-]+: (?:No such file or directory|command not found|not found)/.exec(output); if (unresolved) problems.push(`a gstack helper path did not resolve: ${unresolved[0]} (in: ${command.slice(0, 120)})`); }