Merge remote-tracking branch 'origin/codex-mode-session-start-hook-migration' into fix-and-ship-codex-mem-search-access

# Conflicts:
#	plugin/scripts/worker-service.cjs
This commit is contained in:
Alex Newman
2026-05-06 19:11:41 -07:00
5 changed files with 149 additions and 22 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', () => {
@@ -172,7 +181,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', () => {
@@ -187,6 +198,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', () => {