Make Finder debug launcher just work without a signing identity#249
Open
morluto wants to merge 7 commits into
Open
Make Finder debug launcher just work without a signing identity#249morluto wants to merge 7 commits into
morluto wants to merge 7 commits into
Conversation
The proactive configure_debug_signing detection should handle the common no-identity case, but if signing is still refused (e.g. environment mismatch or an invalid SIGN_IDENTITY), surface the explicit ALLOW_ADHOC_SIGNING=1 and SIGN_IDENTITY Terminal commands at the point of failure instead of just the generic retry prompt. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The patch helper now requires Recorder.swift to exist for the preview patch. Add a keyboard_shortcuts_upstream_recorder fixture with #Preview blocks at the line position the preview-removal patch expects, and create it in make_keyboard_shortcuts_patch_fixture so all three KeyboardShortcuts patch helper tests pass. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Covers the edge case where configure_debug_signing proactive detection does not prevent the signing refusal. A fake conductor exits 1 and emits the ad-hoc signing error; the test verifies the launcher surfaces the explicit ALLOW_ADHOC_SIGNING=1 and SIGN_IDENTITY Terminal commands. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Double-clicking
Launch RepoPrompt CE.commandon a Mac without an Apple Development signing identity drops into ar/s/x/qretry loop that never succeeds. The launcher looks like a simple app launcher, but it is really a small retry UI around a build+package+relaunch pipeline:Because packaging runs before the app lifecycle step, any deterministic packaging failure returns the launcher to the same retry prompt. Pressing
rreruns the same environment and hits the same failure again. There is no hint that the user is expected to set an environment variable in a separate Terminal.What is confusing
The launcher presents itself as a one-click "build and relaunch" button, so a retry loop that never recovers reads as a broken app, not as a missing signing identity. The actual error (
Debug ad-hoc signing is disabled by default. Set ALLOW_ADHOC_SIGNING=1 ...) is buried in the build log and the launcher never surfaces it as actionable guidance. The README documents theALLOW_ADHOC_SIGNING=1 ./conductor app relaunchworkaround, but a Finder-double-click user has no reason to read the README before clicking the launcher.There were three layered blockers in that one pre-launch path, each masking the next:
ALLOW_ADHOC_SIGNING=1was set. The Finder launcher did not set that, so every retry failed at signing preflight.KeyboardShortcutsbecause its design-time#Previewblocks required preview macro support that the command-line build does not load.@Entryenvironment values hit the same class of command-line macro-plugin loading failure.So even a user who found the
ALLOW_ADHOC_SIGNING=1workaround in the README would still hit two more build failures before the app opened.Fix: the launcher just works
Launch RepoPrompt CE.commandnow detects the no-identity case up front and exportsALLOW_ADHOC_SIGNING=1for its own conductor relaunch jobs, with a clear warning that debug secure storage will be in-memory. The double-click flow no longer requires the user to open Terminal or read the README first — the launcher just works.A reactive fallback message was also added: if signing is still refused after the proactive configuration (e.g. environment mismatch or an invalid
SIGN_IDENTITY), the launcher surfaces the explicitALLOW_ADHOC_SIGNING=1 ./conductor app relaunchandSIGN_IDENTITY="Apple Development: ..."Terminal commands at the point of failure instead of just the generic retry prompt.The two downstream build blockers are also fixed so the package phase actually completes:
@Entryenvironment values are expanded into explicitEnvironmentKeydefinitions, with narrow SwiftFormat guards so formatting does not collapse them back to@Entry.What changed
Launch RepoPrompt CE.command: proactiveconfigure_debug_signingdetection that auto-enables ad-hoc signing when no Apple Development identity is found, plus a reactive fallback message if signing is still refused.Scripts/test_debug_app_process.py: hermetic launcher test with fakesecurityand fakeconductorcommands to prove the fallback environment is passed through.Scripts/patch_keyboard_shortcuts_resource_lookup.sh+Scripts/patches/keyboardshortcuts-2.3.0-remove-previews.patch: independent application of the resource lookup and preview-removal patches.Sources/RepoPrompt/App/FontPreset.swift,Sources/RepoPrompt/Features/AgentMode/Views/AgentMessageBubble.swift,Sources/RepoPrompt/Features/AgentMode/Views/ToolCards/ToolCardContainer.swift,Sources/RepoPrompt/Infrastructure/UI/Markdown/MarkdownFileLinkInteraction.swift:@Entry-> explicitEnvironmentKeyshims.Reviewer guide
The branch is split into two commits:
33a4680 Allow Finder debug launcher ad-hoc signingLaunch RepoPrompt CE.command,Scripts/test_debug_app_process.py.ca00bf6 Avoid SwiftUI macro plugin failures in debug packagingScripts/patch_keyboard_shortcuts_resource_lookup.sh,Scripts/patches/keyboardshortcuts-2.3.0-remove-previews.patch, and the fourEnvironmentKeyshims.Notes
@Entryreplacements are intended to be behavior-preserving. They avoid depending on SwiftUI macro plugins during command-line package builds.#Previewblocks only; it does not affect runtime library code.Validation
python3 Scripts/test_debug_app_process.pybash -n 'Launch RepoPrompt CE.command' Scripts/patch_keyboard_shortcuts_resource_lookup.shALLOW_ADHOC_SIGNING=1 ./conductor build --request-key debug-adhoc-signing-final.agents/skills/rpce-contribution-check/scripts/preflight.sh push