moving
Some checks failed
Installer Smoke / installer-smoke (push) Has been cancelled

This commit is contained in:
Oleg Maslov
2026-09-02 10:10:29 +02:00
commit 0c3e2ead3b
3841 changed files with 970576 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
/**
* AI-OS #6 fast-follow — agent-run goal-ancestry: a spawn carries the agent's
* durable goal + workspace as the "why". Focused unit on the exported helper.
*/
import { describe, it, expect } from 'vitest';
import { buildSpawnAncestry } from '../src/local/routes/fleet.js';
describe('buildSpawnAncestry (#6 agent-run goal)', () => {
it('includes project (workspace) + goal (agent goal)', () => {
expect(buildSpawnAncestry('Acme Redesign', 'Ship the pane')).toEqual({
project: 'Acme Redesign',
goal: 'Ship the pane',
});
});
it('omits empty levels', () => {
expect(buildSpawnAncestry(undefined, 'Ship the pane')).toEqual({ goal: 'Ship the pane' });
expect(buildSpawnAncestry('Acme', undefined)).toEqual({ project: 'Acme' });
expect(buildSpawnAncestry(undefined, undefined)).toEqual({});
});
});