From 73819ff5736cf95270e6a3e6faf3f21e27d96f94 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Fri, 24 Jul 2026 17:27:44 -0700 Subject: [PATCH] Stop hook-build test from asserting an unbuilt dist artifact The "Codex project hooks reference hook.mjs in the .codex skill payload" test asserted dist/codex/.codex/skills/impeccable/{SKILL.md,hook.mjs} exist. dist/ is gitignored, and CI's test:core step runs before the Build step, so the fresh checkout has no dist/ when the assertion runs. It only passed locally against a stale dist/. This turned every sync-generated-output push on main red. The dist/codex bundle's self-consistency is already covered by build.test.js, which runs an actual build into a temp dir and verifies the codex payload lands at .codex/skills/. Drop the two dist assertions; the test keeps verifying the tracked outputs (the .codex/hooks.json path and the .agents/skills payload) that exist at test:core time. Co-Authored-By: Claude Fable 5 --- tests/hook-build.test.mjs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/hook-build.test.mjs b/tests/hook-build.test.mjs index b13d65796..937610775 100644 --- a/tests/hook-build.test.mjs +++ b/tests/hook-build.test.mjs @@ -231,11 +231,12 @@ describe('generated hook artifacts in repo', () => { expectCommand(handler.command, '.codex/skills/impeccable/scripts/hook.mjs'); assert.ok(!handler.command.includes('.agents/skills')); - // The self-consistent Codex bundle ships the payload the manifest targets. - assert.ok(fs.existsSync(path.join(REPO_ROOT, 'dist/codex/.codex/skills/impeccable/SKILL.md'))); - assert.ok(fs.existsSync(path.join(REPO_ROOT, 'dist/codex/.codex/skills/impeccable/scripts/hook.mjs'))); + // The self-consistent Codex bundle at `dist/codex/.codex/skills/` is a build + // artifact, not a tracked repo file; `bun run build` emits it and + // build.test.js verifies it there. This suite runs before the build (CI's + // `test:core` precedes the Build step), so it asserts only tracked outputs. - // The repo also ships the Codex skill payload at `.agents/skills` (the + // The repo ships the Codex skill payload at `.agents/skills` (the // layout CLI installs use, and where the rewritten command resolves). assert.ok(fs.existsSync(path.join(REPO_ROOT, '.agents/skills/impeccable/SKILL.md'))); assert.ok(fs.existsSync(path.join(REPO_ROOT, '.agents/skills/impeccable/scripts/hook.mjs')));