feat(voyage)!: rename produced_by field values + validator comments [skip-docs]
- commands/trekexecute.md: produced_by literals -> trekexecute (4 occurrences) - commands/trekendsession.md: produced_by literals -> trekendsession (2 occurrences) - tests/validators/next-session-prompt-validator.test.mjs: 11 'ultraexecute-local' refs -> 'trekexecute' - tests/commands/trekcontinue.test.mjs: 3 fixture strings updated - tests/lib/cleanup.test.mjs: 1 fixture string updated - lib/validators/next-session-prompt-validator.mjs: producer-list comment - docs/HANDOVER-CONTRACTS.md line 432: example producer names updated Part of voyage-rebrand session 2 (W3.4 / Step 6). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
0508edff15
commit
5f74a670ab
7 changed files with 24 additions and 24 deletions
|
|
@ -210,7 +210,7 @@ test('ultracontinue Bug 3 (e) — CLI consistency mode flags producer mismatch i
|
|||
// Project-dir prompt: produced_by ultraexecute-local at T-1
|
||||
const projectPrompt = join(projectDir, 'NEXT-SESSION-PROMPT.local.md');
|
||||
writeFileSync(projectPrompt,
|
||||
'---\nproduced_by: ultraexecute-local\nproduced_at: 2026-05-04T15:30:00.000Z\n---\n\n# Session 2\n');
|
||||
'---\nproduced_by: trekexecute\nproduced_at: 2026-05-04T15:30:00.000Z\n---\n\n# Session 2\n');
|
||||
|
||||
// Plugin-root prompt: produced_by graceful-handoff at T-0 (newer)
|
||||
const pluginPrompt = join(root, 'NEXT-SESSION-PROMPT.local.md');
|
||||
|
|
@ -303,7 +303,7 @@ test('ultracontinue Bug 4 (f-1) dry-run lists candidates without deleting', asyn
|
|||
updated_at: '2026-05-04T16:00:00.000Z',
|
||||
}, null, 2));
|
||||
writeFileSync(join(dir, 'NEXT-SESSION-PROMPT.local.md'),
|
||||
'---\nproduced_by: ultraexecute-local\nproduced_at: 2026-05-04T16:00:00.000Z\n---\n\n# Done\n');
|
||||
'---\nproduced_by: trekexecute\nproduced_at: 2026-05-04T16:00:00.000Z\n---\n\n# Done\n');
|
||||
const r = cleanupProject(dir, { dryRun: true });
|
||||
assert.equal(r.valid, true, JSON.stringify(r.errors));
|
||||
assert.equal(r.parsed.wouldDelete.length, 2);
|
||||
|
|
@ -330,7 +330,7 @@ test('ultracontinue Bug 4 (f-2) confirm deletes and (f-3) idempotent re-run hand
|
|||
updated_at: '2026-05-04T16:00:00.000Z',
|
||||
}, null, 2));
|
||||
writeFileSync(join(dir, 'NEXT-SESSION-PROMPT.local.md'),
|
||||
'---\nproduced_by: ultraexecute-local\nproduced_at: 2026-05-04T16:00:00.000Z\n---\n\n# Done\n');
|
||||
'---\nproduced_by: trekexecute\nproduced_at: 2026-05-04T16:00:00.000Z\n---\n\n# Done\n');
|
||||
|
||||
// f-2: confirm deletes
|
||||
const r2 = cleanupProject(dir, { dryRun: false, confirm: true });
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ function buildProject(dir, status) {
|
|||
};
|
||||
writeFileSync(join(dir, '.session-state.local.json'), JSON.stringify(stateObj, null, 2));
|
||||
writeFileSync(join(dir, 'NEXT-SESSION-PROMPT.local.md'),
|
||||
`---\nproduced_by: ultraexecute-local\nproduced_at: 2026-05-04T16:00:00.000Z\n---\n\n# Done\n`);
|
||||
`---\nproduced_by: trekexecute\nproduced_at: 2026-05-04T16:00:00.000Z\n---\n\n# Done\n`);
|
||||
return dir;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@ function frontmatter(producedBy, producedAt, extra = '') {
|
|||
}
|
||||
|
||||
test('validateNextSessionPromptContent — both consistent producers (valid)', () => {
|
||||
const text = frontmatter('ultraexecute-local', '2026-05-04T16:00:00.000Z');
|
||||
const text = frontmatter('trekexecute', '2026-05-04T16:00:00.000Z');
|
||||
const r = validateNextSessionPromptContent(text);
|
||||
assert.equal(r.valid, true, JSON.stringify(r.errors));
|
||||
assert.equal(r.parsed.produced_by, 'ultraexecute-local');
|
||||
assert.equal(r.parsed.produced_by, 'trekexecute');
|
||||
});
|
||||
|
||||
test('validateNextSessionPromptObject — missing produced_by is invalid', () => {
|
||||
|
|
@ -34,7 +34,7 @@ test('validateNextSessionPromptObject — missing produced_by is invalid', () =>
|
|||
});
|
||||
|
||||
test('validateNextSessionPromptObject — missing produced_at is invalid', () => {
|
||||
const r = validateNextSessionPromptObject({ produced_by: 'ultraexecute-local' });
|
||||
const r = validateNextSessionPromptObject({ produced_by: 'trekexecute' });
|
||||
assert.equal(r.valid, false);
|
||||
assert.ok(r.errors.find(e => e.code === 'NEXT_SESSION_PROMPT_MISSING_FIELD' && /produced_at/.test(e.message)));
|
||||
});
|
||||
|
|
@ -52,7 +52,7 @@ test('validateNextSessionPromptContent — no frontmatter downgrades to warning
|
|||
});
|
||||
|
||||
test('validateNextSessionPromptConsistency — producer mismatch with both fresh fails', () => {
|
||||
const a = { path: '/a', parsed: { produced_by: 'ultraexecute-local', produced_at: '2026-05-04T16:00:00.000Z' } };
|
||||
const a = { path: '/a', parsed: { produced_by: 'trekexecute', produced_at: '2026-05-04T16:00:00.000Z' } };
|
||||
const b = { path: '/b', parsed: { produced_by: 'graceful-handoff', produced_at: '2026-05-04T16:05:00.000Z' } };
|
||||
const state = { updated_at: '2026-05-04T15:00:00.000Z' };
|
||||
const r = validateNextSessionPromptConsistency(a, b, { state, now: Date.parse('2026-05-04T16:30:00.000Z') });
|
||||
|
|
@ -62,7 +62,7 @@ test('validateNextSessionPromptConsistency — producer mismatch with both fresh
|
|||
|
||||
test('validateNextSessionPromptConsistency — state-anchored stale candidate ignored', () => {
|
||||
const a = { path: '/a', parsed: { produced_by: 'graceful-handoff', produced_at: '2026-05-03T10:00:00.000Z' } };
|
||||
const b = { path: '/b', parsed: { produced_by: 'ultraexecute-local', produced_at: '2026-05-04T16:05:00.000Z' } };
|
||||
const b = { path: '/b', parsed: { produced_by: 'trekexecute', produced_at: '2026-05-04T16:05:00.000Z' } };
|
||||
const state = { updated_at: '2026-05-04T16:00:00.000Z' };
|
||||
const r = validateNextSessionPromptConsistency(a, b, { state, now: Date.parse('2026-05-04T16:30:00.000Z') });
|
||||
assert.equal(r.valid, true, JSON.stringify(r.errors));
|
||||
|
|
@ -70,16 +70,16 @@ test('validateNextSessionPromptConsistency — state-anchored stale candidate ig
|
|||
});
|
||||
|
||||
test('validateNextSessionPromptConsistency — 24h wall-clock drift emits soft warning', () => {
|
||||
const a = { path: '/a', parsed: { produced_by: 'ultraexecute-local', produced_at: '2026-05-01T16:00:00.000Z' } };
|
||||
const b = { path: '/b', parsed: { produced_by: 'ultraexecute-local', produced_at: '2026-05-01T16:00:00.000Z' } };
|
||||
const a = { path: '/a', parsed: { produced_by: 'trekexecute', produced_at: '2026-05-01T16:00:00.000Z' } };
|
||||
const b = { path: '/b', parsed: { produced_by: 'trekexecute', produced_at: '2026-05-01T16:00:00.000Z' } };
|
||||
const r = validateNextSessionPromptConsistency(a, b, { now: Date.parse('2026-05-04T16:30:00.000Z') });
|
||||
assert.equal(r.valid, true);
|
||||
assert.ok(r.warnings.find(w => w.code === 'NEXT_SESSION_PROMPT_WALL_CLOCK_DRIFT'));
|
||||
});
|
||||
|
||||
test('validateNextSessionPromptConsistency — same producer, both fresh, no errors', () => {
|
||||
const a = { path: '/a', parsed: { produced_by: 'ultraexecute-local', produced_at: '2026-05-04T16:00:00.000Z' } };
|
||||
const b = { path: '/b', parsed: { produced_by: 'ultraexecute-local', produced_at: '2026-05-04T16:01:00.000Z' } };
|
||||
const a = { path: '/a', parsed: { produced_by: 'trekexecute', produced_at: '2026-05-04T16:00:00.000Z' } };
|
||||
const b = { path: '/b', parsed: { produced_by: 'trekexecute', produced_at: '2026-05-04T16:01:00.000Z' } };
|
||||
const r = validateNextSessionPromptConsistency(a, b, { now: Date.parse('2026-05-04T16:30:00.000Z') });
|
||||
assert.equal(r.valid, true);
|
||||
assert.deepEqual(r.errors, []);
|
||||
|
|
@ -91,7 +91,7 @@ test('CLI shim — single-file mode returns JSON for valid file', () => {
|
|||
const dir = mkdtempSync(join(tmpdir(), 'nspv-cli-'));
|
||||
try {
|
||||
const file = join(dir, 'NEXT-SESSION-PROMPT.local.md');
|
||||
writeFileSync(file, frontmatter('ultraexecute-local', '2026-05-04T16:00:00.000Z'));
|
||||
writeFileSync(file, frontmatter('trekexecute', '2026-05-04T16:00:00.000Z'));
|
||||
const out = execFileSync(process.execPath, [
|
||||
'lib/validators/next-session-prompt-validator.mjs',
|
||||
'--json',
|
||||
|
|
@ -109,7 +109,7 @@ test('CLI shim — consistency mode flags producer mismatch', () => {
|
|||
try {
|
||||
const a = join(dir, 'a.md');
|
||||
const b = join(dir, 'b.md');
|
||||
writeFileSync(a, frontmatter('ultraexecute-local', '2026-05-04T16:00:00.000Z'));
|
||||
writeFileSync(a, frontmatter('trekexecute', '2026-05-04T16:00:00.000Z'));
|
||||
writeFileSync(b, frontmatter('graceful-handoff', '2026-05-04T16:01:00.000Z'));
|
||||
let exitCode = 0;
|
||||
let out = '';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue