mirror of
https://github.com/CharlesWiltgen/Axiom.git
synced 2026-09-20 19:58:20 +08:00
73bcab39b0
set-version.js regenerated the Cursor variant but never Codex, so axiom-codex/.codex-plugin/plugin.json kept the PREVIOUS version through a version bump — invisibly. Gate 12f compares skills/ and agents/ mtimes against that manifest and a pure version bump touches neither, while the version-parity gate (check 8) covered Cursor's manifest but not Codex's. Confirmed by reverting the manifest to the prior version and watching Phase 1 pass green. Root package.json had the identical hole: written by set-version.js, but read by pre-deploy only for the `pi` manifest block, never into the parity map. Also confirmed empirically. `pi install` resolves against that file. - set-version.js now runs build-cursor.ts AND build-codex.ts - --tag preflight absolves axiom-codex/ output via a new codex-output.js, mirroring cursor-output.js (regression the fix itself introduced: the preflight would have refused on ~350 files the same run had just written) - check 8 reads every version carrier from one table; parse wrapped in try/catch because build-codex rmSync's and rebuilds in place with no staging - version-parity.test.ts fails if a carrier is added without a matching read - methodology-leak.test.ts keeps behavioral-test methodology out of .claude/rules/skill-development.md, which the harness appends to every skill-file read and therefore reaches a test's GREEN arm but never its control Parity gate now reports 9 files, up from 7. Unit suite 488/488 (was 478). Reviewed with code-reviewer; the root package.json hole was its finding.
30 lines
1.2 KiB
JavaScript
30 lines
1.2 KiB
JavaScript
// Which repository paths the Codex build owns.
|
|
//
|
|
// `build-codex.ts` writes exactly one root: the `axiom-codex/` plugin tree. It
|
|
// does NOT touch `.agents/plugins/marketplace.json` (the Codex marketplace
|
|
// manifest is version-free and hand-maintained). Kept in one place so the two
|
|
// sites that must agree cannot drift:
|
|
// - set-version.js — the --tag preflight, which since 2026-09-05 runs
|
|
// build-codex and must not treat the output it just wrote as an unrelated
|
|
// dirty-tree change
|
|
// - this module's test, which pins the boundary
|
|
//
|
|
// Deliberately narrow. The preflight's job is refusing to tag a dirty tree, so
|
|
// this absolves only paths the script itself regenerates — never a stray sibling
|
|
// like `axiom-codex-notes.md`.
|
|
|
|
const CODEX_PLUGIN_ROOT = 'axiom-codex/';
|
|
|
|
/**
|
|
* True when `relativePath` is regenerated by `npm run build:codex`.
|
|
*
|
|
* @param {string} relativePath repository-relative path, either separator style
|
|
* @returns {boolean}
|
|
*/
|
|
export function isCodexGeneratedPath(relativePath) {
|
|
if (typeof relativePath !== 'string' || relativePath === '') return false;
|
|
return relativePath.replaceAll('\\', '/').startsWith(CODEX_PLUGIN_ROOT);
|
|
}
|
|
|
|
export { CODEX_PLUGIN_ROOT };
|