claude-dev-env 8.42.5 → 8.42.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -436,3 +436,32 @@ def should_print_probe_reason_on_the_bypassed_copilot_gate_line(
|
|
|
436
436
|
assert captured_stdout.count(probe_line) == 2
|
|
437
437
|
assert exit_code == 0
|
|
438
438
|
|
|
439
|
+
|
|
440
|
+
@pytest.mark.parametrize(
|
|
441
|
+
("accepted_exit_codes", "broker_exit_code", "expected_tier"),
|
|
442
|
+
[
|
|
443
|
+
((0,), 3, None),
|
|
444
|
+
((0, 2), 2, "wait"),
|
|
445
|
+
],
|
|
446
|
+
)
|
|
447
|
+
def should_accept_only_the_broker_exit_codes_the_named_constant_lists(
|
|
448
|
+
accepted_exit_codes: tuple[int, ...],
|
|
449
|
+
broker_exit_code: int,
|
|
450
|
+
expected_tier: str | None,
|
|
451
|
+
tmp_path: Path,
|
|
452
|
+
monkeypatch: pytest.MonkeyPatch,
|
|
453
|
+
) -> None:
|
|
454
|
+
broker_path = tmp_path / "account_broker.py"
|
|
455
|
+
broker_path.write_text(
|
|
456
|
+
"import json, sys\n"
|
|
457
|
+
"print(json.dumps({'decision': {'tier': 'wait'}, 'accounts': []}))\n"
|
|
458
|
+
f"sys.exit({broker_exit_code})\n",
|
|
459
|
+
encoding="utf-8",
|
|
460
|
+
)
|
|
461
|
+
monkeypatch.setattr(check_convergence, "_codex_account_broker_path", lambda: broker_path)
|
|
462
|
+
monkeypatch.setattr(
|
|
463
|
+
check_convergence, "ALL_CODEX_BROKER_ACCEPTED_EXIT_CODES", accepted_exit_codes
|
|
464
|
+
)
|
|
465
|
+
|
|
466
|
+
assert check_convergence._read_codex_tier() == expected_tier
|
|
467
|
+
|