The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): return True when fallback sign + strict verification succeed
David Metcalfec0b5a8e15d44
diff --git a/hermes_cli/main.py b/hermes_cli/main.pyindex c100098ef58..f3d3b4f0b5a 100644--- a/hermes_cli/main.py+++ b/hermes_cli/main.py@@ -7818,6 +7818,7 @@ def _desktop_macos_relaunchable_fixup()return Falseprint(" → macOS desktop re-signed (legacy ad-hoc); safeStorage keychain item left untouched")+ return Trueexcept Exception as exc:print(f" (warning: macOS relaunch fixup skipped: {exc})")return Falsediff --git a/tests/hermes_cli/test_gui_command.py b/tests/hermes_cli/test_gui_command.pyindex ab3dfd4dce3..a3480f96d10 100644--- a/tests/hermes_cli/test_gui_command.py+++ b/tests/hermes_cli/test_gui_command.py@@ -458,6 +458,10 @@ def test_desktop_macos_local_codesign_signs_native_binaries(tmp_path, monkeypatcdef test_relaunchable_fixup_falls_back_to_legacy_adhoc_on_failure(tmp_path, monkeypatch, capsys):"""A failing stable sign must still leave a launchable (deep ad-hoc) bundle.+ The stable signer raising routes into the legacy deep ad-hoc fallback;+ with the fallback sign and strict verification succeeding, the fixup+ reports ``True`` per its documented contract.+``macos_only``: the subject is ``codesign`` against a real ``.app`` bundlelayout (``exe.parents[2]``), which only the macOS packaged tree produces."""@@ -487,7 +491,7 @@ def test_relaunchable_fixup_falls_back_to_legacy_adhoc_on_failure(tmp_path, monkmonkeypatch.setattr(cli_main, "_desktop_macos_local_codesign", boom)- assert cli_main._desktop_macos_relaunchable_fixup(desktop_dir) is False+ assert cli_main._desktop_macos_relaunchable_fixup(desktop_dir) is Trueassert ["xattr", "-cr", str(app)] in callsassert ["/usr/bin/codesign", "--force", "--deep", "--sign", "-", str(app)] in calls@@ -901,7 +905,7 @@ def test_relaunchable_fixup_legacy_adhoc_success_still_verifies_and_never_deletemonkeypatch.setattr(cli_main, "_desktop_macos_local_codesign", boom)- assert cli_main._desktop_macos_relaunchable_fixup(desktop_dir) is False+ assert cli_main._desktop_macos_relaunchable_fixup(desktop_dir) is Trueassert ["/usr/bin/codesign", "--force", "--deep", "--sign", "-", str(app)] in callsassert ["/usr/bin/codesign", "--verify", "--deep", "--strict", str(app)] in callsassert not any("delete-generic-password" in c for c in calls)