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.
34 lines
1.5 KiB
JavaScript
34 lines
1.5 KiB
JavaScript
// Which repository paths the Cursor build owns.
|
|
//
|
|
// `writeCursorDistribution` (scripts/cursor/render.ts) writes exactly two roots:
|
|
// the `axiom-cursor/` plugin tree and `.cursor-plugin/marketplace.json`. Kept in
|
|
// one place so the two sites that must agree cannot drift:
|
|
// - set-version.js — the --tag preflight, which now runs build-cursor 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-cursor-notes.md`.
|
|
//
|
|
// `axiom-codex/` is NOT this module's business, but it is no longer "unrelated"
|
|
// either: since 2026-09-05 set-version also runs build-codex, so the preflight
|
|
// composes this predicate with `isCodexGeneratedPath` from `codex-output.js`.
|
|
|
|
const CURSOR_MARKETPLACE_PATH = '.cursor-plugin/marketplace.json';
|
|
const CURSOR_PLUGIN_ROOT = 'axiom-cursor/';
|
|
|
|
/**
|
|
* True when `relativePath` is regenerated by `npm run build:cursor`.
|
|
*
|
|
* @param {string} relativePath repository-relative path, either separator style
|
|
* @returns {boolean}
|
|
*/
|
|
export function isCursorGeneratedPath(relativePath) {
|
|
if (typeof relativePath !== 'string' || relativePath === '') return false;
|
|
const normalized = relativePath.replaceAll('\\', '/');
|
|
return normalized === CURSOR_MARKETPLACE_PATH || normalized.startsWith(CURSOR_PLUGIN_ROOT);
|
|
}
|
|
|
|
export { CURSOR_MARKETPLACE_PATH, CURSOR_PLUGIN_ROOT };
|