test: integrated-tree fixes — gate census counts the five safety evals, team-mode fixture ships the overlay render library, outside-voice prompt located structurally

This commit is contained in:
garrytan committed 2026-10-03 22:01:15 +00:00
1 parent cce7aba81e
commit afd55b8a1f
4 files changed
+14 -8

No files matched your search

+5 -4
View File
@@ -44,10 +44,11 @@ test('the existing quality and behavior phases retain their complete separate sh
expect(quality.evalsAll).toBe(true);
expect(behavior.evalsAll).toBe(true);
expect(qualityFiles).toHaveLength(1);
// 45 files (first-task-scaffold registers no gate case, so the gate lane
// skips it); the seven case-sharded files contribute one shard per gate case.
expect(new Set(behaviorFiles.map(file => file.split('#')[0])).size).toBe(45);
expect(behaviorFiles).toHaveLength(72);
// 50 files, five of them the gate safety-rule evals (first-task-scaffold
// registers no gate case, so the gate lane skips it); the seven case-sharded
// files contribute one shard per gate case.
expect(new Set(behaviorFiles.map(file => file.split('#')[0])).size).toBe(50);
expect(behaviorFiles).toHaveLength(77);
expect(behaviorFiles).toEqual(expect.arrayContaining([
...['review-exploratory-small-cli', 'ship-exploratory-small-cli', 'ship-exploratory-unavailable',
'ship-exploratory-plan-checks', 'ship-exploratory-late-input'].map(id => `test/skill-e2e-qa-callers.test.ts#${id}`),
+4 -1
View File
@@ -64,7 +64,10 @@ test('CEO and Eng describe the actual disabled route and completion validator',
expect(output.replace(/\s+/g, ' ')).toContain('If preflight selected `disabled`, use the guarded record below');
expect(output).toContain('"outside_status":"disabled"');
} else expect(output).toContain('persist `outside_status: disabled` with the guarded');
const prompt = output.slice(output.indexOf('"IMPORTANT:'), output.indexOf('\n<plan content>"'));
const promptEnd = output.indexOf('\n<plan content>"');
const prompt = output.slice(output.lastIndexOf('\n"', promptEnd) + 1, promptEnd);
expect(prompt.startsWith('"')).toBe(true);
expect(prompt.split('\n')[0]).toContain('.claude/skills/');
expect(prompt).toContain('End with Recommendation: <action> because <specific reason>');
expect(prompt).toContain('If there are no findings, say so and explain why');
const invocation = outsideVoiceInvocation(ctx);
+4 -2
View File
@@ -196,10 +196,12 @@ describe('outside-voice dispatch contract', () => {
});
test('the delegated prompt itself requires findings only and forbids plan mutations', () => {
const promptStart = rendered.indexOf('"IMPORTANT:');
const promptEnd = rendered.indexOf('\n<plan content>"');
expect(promptStart).toBeGreaterThan(-1);
const promptStart = rendered.lastIndexOf('\n"', promptEnd) + 1;
expect(promptStart).toBeGreaterThan(0);
expect(promptEnd).toBeGreaterThan(promptStart);
expect(rendered.slice(promptStart, promptStart + 1)).toBe('"');
expect(rendered.slice(promptStart, rendered.indexOf('\n', promptStart))).toContain('.claude/skills/');
const prompt = rendered.slice(promptStart, promptEnd);
// A sovereignty rule elsewhere in the parent workflow does not reach
// a fresh-context reviewer receiving only this constructed prompt.
+1 -1
View File
@@ -351,7 +351,7 @@ describe('setup --team / --no-team / -q', () => {
fs.writeFileSync(file, content, { mode: 0o755 });
};
try {
for (const rel of ['setup', 'VERSION', 'SKILL.md', 'qa/SKILL.md', 'bin/gstack-config', 'bin/gstack-patch-names', 'bin/gstack-state-root.sh', 'bin/gstack-install-registry.sh', 'scripts/resolve-codex-generation-model.ts', 'scripts/models.ts', 'scripts/preflight-codex-overlap.ts', 'scripts/discover-skills.ts', 'scripts/external-skill-names.ts', 'scripts/host-config.ts']) {
for (const rel of ['setup', 'VERSION', 'SKILL.md', 'qa/SKILL.md', 'bin/gstack-config', 'bin/gstack-patch-names', 'bin/gstack-state-root.sh', 'bin/gstack-install-registry.sh', 'bin/gstack-render-claude.sh', 'scripts/resolve-codex-generation-model.ts', 'scripts/models.ts', 'scripts/preflight-codex-overlap.ts', 'scripts/discover-skills.ts', 'scripts/external-skill-names.ts', 'scripts/host-config.ts']) {
const dest = path.join(cwd, rel);
fs.mkdirSync(path.dirname(dest), { recursive: true });
fs.copyFileSync(path.join(ROOT, rel), dest);