fix: migrate codex context off agents injection

This commit is contained in:
Alex Newman
2026-05-06 14:24:40 -07:00
parent bb3dbfdb5a
commit 156062170d
4 changed files with 78 additions and 16 deletions
+22
View File
@@ -27,6 +27,15 @@ const syncMarketplaceSourcePath = join(
'sync-marketplace.cjs',
);
const syncMarketplaceSource = readFileSync(syncMarketplaceSourcePath, 'utf-8');
const transcriptConfigSourcePath = join(
__dirname,
'..',
'src',
'services',
'transcripts',
'config.ts',
);
const transcriptConfigSource = readFileSync(transcriptConfigSourcePath, 'utf-8');
describe('Install Non-TTY Support', () => {
describe('isInteractive flag', () => {
@@ -147,7 +156,9 @@ describe('Install Non-TTY Support', () => {
it('reports legacy Codex AGENTS cleanup failures to callers', () => {
expect(codexInstallerSource).toContain('function removeCodexAgentsMdContext(): boolean');
expect(codexInstallerSource).toContain('function disableCodexTranscriptAgentsContext(): boolean');
expect(codexInstallerSource).toContain('if (!cleanupLegacyCodexAgentsMdContext())');
expect(codexInstallerSource).toContain('if (!cleanupLegacyCodexTranscriptAgentsContext())');
});
it('does not fail Codex install after marketplace registration when only AGENTS cleanup fails', () => {
@@ -162,6 +173,17 @@ describe('Install Non-TTY Support', () => {
expect(cleanupFailureRegion).toContain('console.warn');
expect(cleanupFailureRegion).not.toContain('return 1');
});
it('does not seed new Codex transcript watcher configs with AGENTS context injection', () => {
expect(transcriptConfigSource).toContain("name: 'codex'");
const codexWatchRegion = transcriptConfigSource.slice(
transcriptConfigSource.indexOf("name: 'codex'"),
transcriptConfigSource.indexOf('stateFile: DEFAULT_STATE_PATH'),
);
expect(codexWatchRegion).toContain("path: '~/.codex/sessions/**/*.jsonl'");
expect(codexWatchRegion).not.toContain("mode: 'agents'");
expect(codexWatchRegion).not.toContain('updateOn');
});
});
describe('TaskDescriptor interface', () => {