Fission-AI/OpenSpec · error
dist/ is older than src/, so the hashes would be computed fr
Error message
dist/ is older than src/, so the hashes would be computed from a stale build and the parity test - which reads src/ - would reject them. Run `pnpm build` first.
What it means
Error "dist/ is older than src/, so the hashes would be computed from a stale build and the parity test - which reads src/ - would reject them. Run `pnpm build` first." thrown in Fission-AI/OpenSpec.
Source
Thrown at scripts/regen-parity-hashes.mjs:73
if (entry.name === 'node_modules' || entry.name.startsWith('.')) continue;
const full = join(dir, entry.name);
const mtime = entry.isDirectory() ? newestMtime(full) : statSync(full).mtimeMs;
if (mtime > newest) newest = mtime;
}
return newest;
}
// Hashes are computed from dist/, but the parity test recomputes them from
// src/. Regenerating against a stale build therefore writes hashes the test
// then rejects, after reporting "nothing to update" - a false all-clear on the
// most common mistake there is, forgetting to build. Refuse to guess.
const srcMtime = newestMtime(join(repoRoot, 'src'));
const distMtime = newestMtime(join(repoRoot, 'dist'));
if (distMtime < 0) {
throw new Error('dist/ is missing. Run `pnpm build` first - hashes are computed from the build.');
}
if (srcMtime > distMtime) {
throw new Error(
'dist/ is older than src/, so the hashes would be computed from a stale build\n' +
'and the parity test - which reads src/ - would reject them. Run `pnpm build` first.'
);
}
const templates = await import(distUrl('core/templates/skill-templates.js'));
const { getSkillTemplates, generateSkillContent } = await import(
distUrl('core/shared/skill-generation.js')
);
const TEST_FILE = join(repoRoot, 'test/core/templates/skill-templates-parity.test.ts');
const sha256 = (value) => createHash('sha256').update(value).digest('hex');
// The generated-content hashes are keyed by skill directory. Read that mapping
// from the same production helper the skills.sh generator uses, so a new
// workflow never needs a second list kept in sync here.
const PARITY_BASELINE = 'PARITY-BASELINE';View on GitHub (pinned to 6926ccb18a)
When it happens
Trigger: Thrown at scripts/regen-parity-hashes.mjs:73 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Fission-AI/OpenSpec@6926ccb18a (2026-08-25).
Data as JSON: /api/errors/39965f006a2491ed.
Report an issue: GitHub.