Repository navigation
🛡️ Verify macOS PDF default-handler changes - #62
Merged
Merged
Conversation
Read back the Launch Services PDF association after a successful setter callback. Fail closed on a missing or mismatched registration and add read-only synthetic macOS CI coverage. Co-authored-by: ChatGPT # 6 <noreply@openai.com>
Preserve the independent read-only PDF lookup merged on main and ensure the synthetic app fixtures match valid macOS bundles. Co-authored-by: ChatGPT # 6 <noreply@openai.com>
Retain the script-style production entrypoint; compile the pure verification helper against synthetic application fixtures without executing the setter. Integrate current main without force-pushing. Co-authored-by: ChatGPT # 6 <noreply@openai.com>
Bring the active PDF default-handler status workflow into this narrow setter-verification PR without changing its behavior or tests. Co-authored-by: ChatGPT # 6 <noreply@openai.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.
Summary
Implement opener-0112, checklist §2.4 “Verify that the default-handler change succeeds.”
NSWorkspace.setDefaultApplication(at:toOpen:)completes without an error, read back Launch Services' actual registered PDF bundle identifier and compare it with the selected application's bundle identifier.macos-build. Document the verification behavior.Why
The existing setter treated a successful API callback as proof that macOS changed its default PDF handler. Its callback can succeed without confirming the currently registered association, potentially misreporting success. The new postcondition validates that the exact requested handler is registered.
Scope, coordination, and safety
This PR changes only the setter utility, the macOS CI workflow, its new read-only tests, and a README clarification. It does not alter scanning, quarantine handling, user browser preferences, current PDF associations before explicit installer invocation, or the old no-argument Brave default. Existing
setDefaultApplicationbehavior remains intact.Concurrent PR #59 independently introduces a read-only CLI for identifying the PDF handler (opener-0108). This PR does not import that unmerged utility or alter its files; it only verifies the result of the existing setter in its own executable, so the two tasks remain independently testable.
Required verification
Run both existing GitHub Actions jobs,
scanner-testsandmacos-build, on the final integrated PR head; require both to pass, verify mergeability against currentmain, then squash-merge and independently confirmmerged=trueand the actual merge SHA.The configured Codex Pony/Kefania publishing integration is not exposed in this chat; this PR is created through the connected GitHub identity instead.