File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -480,9 +480,6 @@ def main(argv: list[str] | None = None) -> int:
480480 examples_payload = redact_sensitive_payload (_examples_payload (report ))
481481 repair_plan_payload = redact_sensitive_payload (_repair_plan_payload (report ))
482482 patch_preview_payload = redact_sensitive_payload (_patch_preview_payload (report ))
483- fallback_simulations_payload = redact_sensitive_payload (
484- _fallback_simulations_payload (cwd , patch_preview_payload )
485- )
486483 doctor_report = redact_sensitive_text (_format_doctor_report (report , cwd = cwd ))
487484 if args .examples_out :
488485 _write_json (args .examples_out , examples_payload )
@@ -494,6 +491,9 @@ def main(argv: list[str] | None = None) -> int:
494491 _write_json (args .patch_preview_out , patch_preview_payload )
495492 bundle_paths = None
496493 if args .bundle_out :
494+ fallback_simulations_payload = redact_sensitive_payload (
495+ _fallback_simulations_payload (cwd , patch_preview_payload )
496+ )
497497 bundle_paths = _write_bundle (
498498 args .bundle_out ,
499499 examples_payload = examples_payload ,
Original file line number Diff line number Diff line change @@ -713,6 +713,35 @@ def test_release_readiness_script_exports_bundle_as_black_box(tmp_path: Path) ->
713713 assert all (item ["exists" ] and item ["size_bytes" ] > 0 and len (item ["sha256" ]) == 64 for item in manifest )
714714
715715
716+ def test_readiness_non_bundle_outputs_skip_fallback_simulation (monkeypatch , tmp_path : Path , capsys ) -> None :
717+ import minicode .readiness
718+
719+ report = ReadinessReport (
720+ status = "ready" ,
721+ provider = "openai" ,
722+ provider_ready = True ,
723+ provider_channel = "openai via OPENAI_API_KEY" ,
724+ risk_scope = "none" ,
725+ summary = "readiness: ready (openai)" ,
726+ )
727+ monkeypatch .setattr (minicode .readiness , "build_readiness_report" , lambda cwd : report )
728+
729+ def fail_if_called (cwd : str , patch_preview_payload : dict ) -> dict :
730+ raise AssertionError ("fallback simulations should only run for --bundle-out" )
731+
732+ monkeypatch .setattr (minicode .readiness , "_fallback_simulations_payload" , fail_if_called )
733+
734+ for output_args in (
735+ ["--doctor" ],
736+ ["--repair-plan" ],
737+ ["--patch-preview" ],
738+ ["--examples" ],
739+ ["--json" ],
740+ ):
741+ assert minicode .readiness .main (["--cwd" , str (tmp_path ), * output_args ]) == 0
742+ capsys .readouterr ()
743+
744+
716745def test_readiness_outputs_redact_real_secrets (monkeypatch , tmp_path : Path , capsys ) -> None :
717746 import minicode .readiness
718747
You can’t perform that action at this time.
0 commit comments