test(codex): pin reasoning effort through quick-start and the multi-user clamp

Both create schemas now refuse an unknown level, and a non-granted owner's
codexConfig keeps its reasoningEffort when the clamp forces bypass off.
docs/architecture-invariants.md lists the two --config values codex now
takes from codexConfig.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Michael Grundberg
2026-10-01 17:16:18 +02:00
co-authored by Claude Opus 5.5
parent 45db24bacf
commit 0ae39cdd94
3 changed files with 19 additions and 2 deletions
+4 -1
View File
@@ -28,11 +28,14 @@ describe('codexConfig.reasoningEffort', () => {
}
});
it('rejects a level codex does not know, and anything shaped like shell', () => {
it('rejects a level codex does not know, and anything shaped like shell, on both create routes', () => {
for (const reasoningEffort of ['bogus', 'HIGH', 'high; rm -rf /', '']) {
expect(() =>
CreateSessionSchema.parse({ workingDir: '/tmp', mode: 'codex', codexConfig: { reasoningEffort } })
).toThrow();
expect(() =>
QuickStartSchema.parse({ caseName: 'work', mode: 'codex', codexConfig: { reasoningEffort } })
).toThrow();
}
});
});