mirror of
https://github.com/mvschwarz/openrig.git
synced 2026-11-07 05:56:21 -10:00
test(codex): update six expectations for the non-login flag and its setting
Four daemon tests pin Codex launch commands or the resume call's shape.
They now expect -c 'allow_login_shell=false' where the launch adds it.
Two settings tests list the keys. They now include
launch.codex_login_shell, and the routes test also checks its default.
No assertion is weakened.
(cherry picked from commit 3c0d90e530)
This commit is contained in:
1 parent
6f0f0888c1
commit
6130b4308c
6 files changed
+11
-8
No files matched your search
@@ -380,7 +380,7 @@ describe("Lifecycle reboot/recovery scenario matrix (Tier 1)", () => {
|
||||
|
||||
const r = await adapter.resume("r99-worker", "codex_id", "tok-abc", "/tmp");
|
||||
|
||||
expect(tmux.sendShellCommand).toHaveBeenCalledWith("r99-worker", "codex -s workspace-write '-c' 'check_for_update_on_startup=false' resume 'tok-abc'");
|
||||
expect(tmux.sendShellCommand).toHaveBeenCalledWith("r99-worker", "codex -s workspace-write '-c' 'check_for_update_on_startup=false' -c 'allow_login_shell=false' resume 'tok-abc'");
|
||||
expect(tmux.sendText).not.toHaveBeenCalled();
|
||||
expect(r).toEqual({
|
||||
ok: true,
|
||||
|
||||
@@ -40,9 +40,9 @@ describe("0.5.2-07 A2-3 — model-fidelity enumeration guard", () => {
|
||||
it("codex adapter: the resume branch passes the model into buildCodexResumeCore", () => {
|
||||
const src = read("adapters/codex-runtime-adapter.ts");
|
||||
// The LAUNCH resume call threads binding.launchPosture, model, then the exact precomputed
|
||||
// posture segment (followed by #275's network segment). The latter prevents W3 observation
|
||||
// from re-deciding policy.
|
||||
expect(src).toMatch(/buildCodexResumeCore\([^;]*binding\.launchPosture,\s*model,\s*(?:postureArg|`\$\{postureArg\}\$\{networkArg\}`)(?:,\s*daemonOptOut)?(?:,\s*effort)?\)/);
|
||||
// posture segment (followed by #275's network segment and the non-login tool-shell segment). The latter
|
||||
// prevents W3 observation from re-deciding policy.
|
||||
expect(src).toMatch(/buildCodexResumeCore\([^;]*binding\.launchPosture,\s*model,\s*(?:postureArg|`\$\{postureArg\}\$\{networkArg\}(?:\$\{loginShellArg\})?`)(?:,\s*daemonOptOut)?(?:,\s*effort)?\)/);
|
||||
});
|
||||
|
||||
it("claude adapter: every claude seat-launch template threads modelArg", () => {
|
||||
|
||||
@@ -207,7 +207,7 @@ describe("S03 selected arguments and unchanged defaults", () => {
|
||||
});
|
||||
it("Codex legacy resume uses the same explicit selection", async () => {
|
||||
const t = refusedTransport(); await new CodexResumeAdapter(t.tmux).resume("seat", "codex_id", "original", "/inert", null, "full_bypass");
|
||||
expect(t.send.mock.calls[0]?.[1]).toContain("codex -s danger-full-access -a never '-c' 'check_for_update_on_startup=false' resume");
|
||||
expect(t.send.mock.calls[0]?.[1]).toContain("codex -s danger-full-access -a never '-c' 'check_for_update_on_startup=false' -c 'allow_login_shell=false' resume");
|
||||
});
|
||||
it("does not widen unset, floor, named-profile or environment-only behavior", () => {
|
||||
expect(codexPostureArg("", {})).toBe(" -s workspace-write");
|
||||
|
||||
@@ -492,8 +492,8 @@ describe("CodexRuntimeAdapter.launchHarness fork branch", () => {
|
||||
expect(result.ok).toBe(true);
|
||||
const sendText = tmux.sendText as ReturnType<typeof vi.fn>;
|
||||
const sentCmd = sendText.mock.calls[0]?.[1] as string;
|
||||
// The no-profile floor and managed update setting precede the fork subcommand.
|
||||
expect(sentCmd).toMatch(/^codex -s workspace-write '-c' 'check_for_update_on_startup=false' fork/);
|
||||
// The no-profile floor, managed update setting and non-login tool shells precede the fork subcommand.
|
||||
expect(sentCmd).toMatch(/^codex -s workspace-write '-c' 'check_for_update_on_startup=false' -c 'allow_login_shell=false' fork/);
|
||||
expect(sentCmd).toContain("PARENT-THREAD-ABC");
|
||||
if (result.ok) {
|
||||
expect(result.resumeToken).toBe("NEW-CODEX-THREAD-XYZ");
|
||||
|
||||
@@ -133,7 +133,9 @@ describe("config routes (User Settings v0)", () => {
|
||||
// + 2 retention.stream_days / stream_max_items (slice 22 outcome 9 stream retention; default 30, 20000).
|
||||
// + 1 specs.builtins_visible (show built-in library entries by default).
|
||||
// + 1 stream.intake (issue #1856 queue intake routing; default queue.worker).
|
||||
expect(Object.keys(body.settings).length).toBe(95);
|
||||
// + 1 launch.codex_login_shell (defer to Codex's own login-shell setting; default off).
|
||||
expect(Object.keys(body.settings).length).toBe(96);
|
||||
expect(body.settings["launch.codex_login_shell"]).toMatchObject({ value: false, source: "default", defaultValue: false });
|
||||
expect(body.settings["specs.builtins_visible"]).toMatchObject({ value: true, source: "default", defaultValue: true });
|
||||
expect(body.settings["stream.intake"]).toMatchObject({ value: "queue.worker", source: "default", defaultValue: "queue.worker" });
|
||||
expect(body.settings["retention.stream_days"]).toMatchObject({ value: 30, source: "default", defaultValue: 30 });
|
||||
|
||||
@@ -123,6 +123,7 @@ describe("SettingsStore (User Settings v0)", () => {
|
||||
"skills.router_line.enabled",
|
||||
"onboarding.default_pack.enabled",
|
||||
"launch.non_interruptive",
|
||||
"launch.codex_login_shell",
|
||||
"health.context_pressure.warning_percent",
|
||||
"health.context_pressure.critical_percent",
|
||||
"files.allowlist", "progress.scan_roots",
|
||||
|
||||
Reference in new issue
Block a user