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 <noreply@anthropic.com>
This commit is contained in:
Paul Bakaus
2026-07-24 17:28:12 -07:00
co-authored by Claude Fable 5
parent af2a14c12c
commit 73819ff573
+5 -4
View File
@@ -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')));