mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-19 06:34:43 +01:00
On Codex, /ship and the other skills now start audit and reviewer subagents with Codex's own `spawn_agent` and wait on `wait_agent`, instead of Claude Code's Agent tool, which Codex can't call. Why: Codex's /ship stopped at the Step 7 coverage audit and never finished (#4476). Codex users need `multi_agent = true` under `[features]` in `~/.codex/config.toml`. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
782f4595ed
commit
fda9dea79f
11 files changed
+127
-27
No files matched your search
+5
-5
@@ -7,11 +7,11 @@
|
||||
"agy/gstack-plan-devex-review": 114944,
|
||||
"agy/gstack-plan-eng-review": 143530,
|
||||
"agy/gstack-review": 104723,
|
||||
"codex/gstack-autoplan": 107895,
|
||||
"codex/gstack-plan-design-review": 110460,
|
||||
"codex/gstack-plan-devex-review": 116452,
|
||||
"codex/gstack-plan-eng-review": 144695,
|
||||
"codex/gstack-review": 104107,
|
||||
"codex/gstack-autoplan": 107438,
|
||||
"codex/gstack-plan-design-review": 110382,
|
||||
"codex/gstack-plan-devex-review": 114230,
|
||||
"codex/gstack-plan-eng-review": 142473,
|
||||
"codex/gstack-review": 104057,
|
||||
"copilot/gstack-autoplan": 108595,
|
||||
"copilot/gstack-plan-design-review": 109369,
|
||||
"copilot/gstack-plan-devex-review": 114406,
|
||||
|
||||
@@ -501,6 +501,31 @@ describe('golden-file regression', () => {
|
||||
expect(current).toBe(golden);
|
||||
});
|
||||
|
||||
test('Codex render names no Claude-only subagent call, and /ship starts its audits with spawn_agent and wait_agent (#4476)', () => {
|
||||
const root = path.join(GOLDEN_OUT, '.agents', 'skills');
|
||||
const claudeOnly = /subagent_type|run_in_background|TaskStop|task-notification|\bAgent tool\b/;
|
||||
const offenders: string[] = [];
|
||||
const walk = (dir: string): void => {
|
||||
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
||||
const file = path.join(dir, entry.name);
|
||||
if (entry.isDirectory()) walk(file);
|
||||
else if (entry.name.endsWith('.md')) {
|
||||
fs.readFileSync(file, 'utf-8').split('\n').forEach((line, i) => {
|
||||
if (claudeOnly.test(line)) offenders.push(`${path.relative(root, file)}:${i + 1}: ${line.trim().slice(0, 120)}`);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
walk(root);
|
||||
expect(offenders).toEqual([]);
|
||||
|
||||
const coverage = fs.readFileSync(path.join(root, 'gstack-ship', 'sections', 'test-coverage.md'), 'utf-8');
|
||||
expect(coverage).toContain('`spawn_agent`');
|
||||
expect(coverage).toContain('`wait_agent`');
|
||||
expect(coverage).toContain('Wait for its LAST-line JSON before applying the coverage gate.');
|
||||
expect(fs.readFileSync(path.join(ROOT, 'ship', 'sections', 'test-coverage.md'), 'utf-8')).toContain('`run_in_background: false`');
|
||||
});
|
||||
|
||||
test('Factory ship skill matches golden baseline', () => {
|
||||
const golden = fs.readFileSync(path.join(GOLDEN_DIR, 'factory-ship-SKILL.md'), 'utf-8');
|
||||
const current = fs.readFileSync(path.join(GOLDEN_OUT, '.factory', 'skills', 'gstack-ship', 'SKILL.md'), 'utf-8');
|
||||
|
||||
@@ -25,6 +25,7 @@ function renders(): Array<[string, string]> {
|
||||
for (const skill of SKILLS) {
|
||||
out.push([`${skill}/sections/review-sections.md`, fs.readFileSync(path.join(ROOT, skill, 'sections/review-sections.md'), 'utf8')]);
|
||||
for (const host of ALL_HOST_CONFIGS) {
|
||||
if (host.name === 'codex') continue;
|
||||
const ctx: TemplateContext = { host: host.name, skillName: skill, tmplPath: `${skill}/sections/review-sections.md.tmpl`, paths: HOST_PATHS[host.name] };
|
||||
out.push([`${host.name}:${skill}`, generateCodexPlanReview(ctx)]);
|
||||
}
|
||||
@@ -81,4 +82,19 @@ describe('native outside-voice fallback without TaskOutput (#3182)', () => {
|
||||
}
|
||||
expect(RESULT_CODES.OUTSIDE_VOICE_UNAVAILABLE.anchor).toBe('outside-voice-unavailable');
|
||||
});
|
||||
|
||||
test('Codex, with no Plan subagent type or TaskStop, takes the unavailable path without launching (#4476)', () => {
|
||||
for (const skill of SKILLS) {
|
||||
const content = generateCodexPlanReview({ host: 'codex', skillName: skill, tmplPath: `${skill}/sections/review-sections.md.tmpl`, paths: HOST_PATHS.codex });
|
||||
const section = flat(bounded(content));
|
||||
expect(section, skill).toContain('take the unavailable path without launching a native subagent');
|
||||
expect(section, skill).toContain('A native result never supplies outside coverage.');
|
||||
expect(section, skill).not.toMatch(/TaskStop|run_in_background|subagent_type|task-notification/);
|
||||
const unavailable = flat(content.slice(content.indexOf('**Unavailable path:**')));
|
||||
expect(unavailable, skill).toContain('Outside voice unavailable: <cause>. Fix: <fix>.');
|
||||
expect(unavailable, skill).toContain('Codex has no read-only native subagent');
|
||||
expect(unavailable, skill).toContain('`"unavailable_reason":"<cause>"`');
|
||||
expect(unavailable, skill).toContain('Do not record a clean review when no reviewer completed.');
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -298,6 +298,11 @@ describe('outside-voice dispatch contract', () => {
|
||||
{
|
||||
expectMentions(output, [['without', 'unavailable', 'launching']], 'output');
|
||||
expectMentions(output, [['do not', 'completed', 'reviewer']], 'output');
|
||||
if (host.name === 'codex') {
|
||||
expect(output).toContain('Codex offers no read-only Plan subagent type');
|
||||
expect(output).not.toMatch(/TaskStop|run_in_background|subagent_type/);
|
||||
continue;
|
||||
}
|
||||
expect(output, host.name).toContain('Do not set a model\noverride');
|
||||
expect(hasBoundedOutsideVoiceWait(output), host.name).toBe(true);
|
||||
}
|
||||
|
||||
@@ -377,8 +377,11 @@ test('CEO integrates completed native findings before its external-only comparis
|
||||
anchors.map(anchor => typeof anchor === 'string' ? review.indexOf(anchor) : review.search(anchor));
|
||||
expect(review.slice(externalStart, nativeStart)).toContain('**Integrate reviewer findings**');
|
||||
const bounded = review.slice(boundedStart, unavailableStart);
|
||||
expect(bounded).toContain('**Integrate reviewer findings**');
|
||||
expect(bounded).toMatch(/follow step 4/i);
|
||||
if (host.name === 'codex') expect(bounded).toContain('take the unavailable path without launching');
|
||||
else {
|
||||
expect(bounded).toContain('**Integrate reviewer findings**');
|
||||
expect(bounded).toMatch(/follow step 4/i);
|
||||
}
|
||||
expect(bounded).not.toContain('continue to Cross-model tension');
|
||||
const unavailable = review.slice(unavailableStart, findingsStart);
|
||||
expect(unavailable).toContain('STATUS = "unavailable", SOURCE = "none", OUTSIDE_STATUS = "unavailable"');
|
||||
|
||||
Reference in new issue
Block a user