fix(issue-23-24): merge review - the environment form of the auto-trust switch reaches the handler; a rate-limited dialog does not hide the next one
Two probes from the merge-side codex review (its report was lost to an API outage; the probes and their results were recovered from its transcript): - create_session.sh and resume_session.sh set AUTO_TRUST=1 and then exported MAM_AUTO_TRUST from it, so the documented MAM_AUTO_TRUST=0 without a flag reached handle_startup_dialogs as 1: the operator had turned automatic trust off and it stayed on. Now AUTO_TRUST defaults to the environment value and an explicit --auto-trust/--no-auto-trust wins. - _mam_dialog_pick exited on the first dialog inside its resend cooldown instead of looking further down the screen, so a skipped (--no-auto-trust) or just-answered trust prompt hid the codex update notice below it, which the docs say is always answered. It continues to the next dialog now; S5 and S5b (one send per cooldown, one retry after it) still hold. Regressions: S6c, S5f (startup path), R3b and C3 (resume/create, env only, flag over env). Each fails without the fix. The create skill doc names the environment form and its precedence. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VCgu9Fa9iT7TbJUSzdq4Ff
This commit is contained in:
1 parent
f4ba205c9f
commit
05b0ea4762
6 files changed
+76
-5
No files matched your search
@@ -578,6 +578,32 @@ def test_s6_no_auto_trust_leaves_trust_dialogs_alone_but_answers_notices(
|
||||
assert sent == ["send-keys -t test-sess 2"], (res.stderr, sent)
|
||||
|
||||
|
||||
def test_s6c_a_skipped_trust_dialog_does_not_hide_the_notice_below_it(mam_sandbox):
|
||||
"""S6c (merge review, codex probe): with --no-auto-trust and a codex screen
|
||||
that shows the trust prompt and the update notice together, the trust
|
||||
prompt is skipped and recorded, and the skip's cooldown must not stop the
|
||||
picker from answering the notice on the next poll."""
|
||||
res, sent = _run_dialogs(
|
||||
mam_sandbox, "codex",
|
||||
"Do you trust the contents of this directory?\n > 1. Yes, continue\n"
|
||||
"Update available\n 1. Update now\n 2. Skip\n 3. Skip until next version",
|
||||
timeout=3, env={"MAM_AUTO_TRUST": "0", "MAM_DIALOG_RESEND_S": "30"})
|
||||
assert sent == ["send-keys -t test-sess 2"], (res.stderr, sent)
|
||||
assert "no-auto-trust" in res.stderr, res.stderr
|
||||
|
||||
|
||||
def test_s5f_a_dialog_inside_its_cooldown_does_not_block_the_next_one(mam_sandbox):
|
||||
"""S5f (merge review, codex probe): two dialogs on one screen, auto-trust on.
|
||||
The trust prompt is answered first; while it is rate-limited the notice
|
||||
must still be answered, once each."""
|
||||
res, sent = _run_dialogs(
|
||||
mam_sandbox, "codex",
|
||||
"Do you trust the contents of this directory?\n > 1. Yes, continue\n"
|
||||
"Update available\n 1. Update now\n 2. Skip\n 3. Skip until next version",
|
||||
timeout=3, env={"MAM_DIALOG_RESEND_S": "60"})
|
||||
assert sent == ["send-keys -t test-sess Enter", "send-keys -t test-sess 2"], (res.stderr, sent)
|
||||
|
||||
|
||||
def test_s6b_create_session_no_longer_gates_dialogs_on_claude(mam_sandbox):
|
||||
"""S6b (source read): the #24 root cause was the `AGENT = claude` gate at
|
||||
the create_session call site, so the gate's absence is the regression."""
|
||||
|
||||
Reference in new issue
Block a user