Skip to content

🧪 Test PDFs through Finder's Open command - #69

Merged
JFWooten4 merged 3 commits into
mainfrom
peachbottom-finderopen120
Oct 27, 2026
Merged

JFWooten4 merged 3 commits into
mainfrom
peachbottom-finderopen120

Conversation

@JFWooten4

Copy link
Copy Markdown
Member

Summary

Implement opener-0120 (§2.4 macOS default PDF handler): test opening PDFs through Finder's Open command, rather than treating a direct delegate call as equivalent.

  • Add test-finder-open.applescript, which issues Finder's real open AppleScript verb against a separately supplied PDF path. Paths are passed as script arguments, never embedded into script source or a shell.
  • Add test-finder-open.py with deterministic tests of the read-only macOS default-handler preflight, valid local PDF selection, Finder command source, and newly appended anonymous Finder scan-origin records.
  • Add an explicitly opted-in --live /path/to/harmless.pdf integration mode for an interactive Mac. It requires PDF Magic Opener already be the macOS default PDF handler, sends Finder the Open request, and verifies the normal scanner entry point receives a Finder-attributed request without changing file associations, bypassing scanning, or reading the user's PDF.
  • Document the live manual command and limitations: Finder Automation permission cannot be silently granted on GitHub-hosted CI; the live test validates dispatch to the scan gate, while scan verdict and browser launch remain governed by existing tests.
  • Compile the AppleScript in macOS CI, and run its safe Python regression tests alongside the native scan/open and cancellation checks.

Scope and coordination

Used a fresh isolated no-slash branch peachbottom-finderopen120 from verified main fe58a76c68615cea36b8ad0122495ac289609d5c. Confirmed no applicable AGENTS.md in the tracked tree and checked existing PRs for overlaps. The existing native tests simulate delegate events; this PR is the focused Finder Open integration path, separate from browser cold-start, default-handler monitoring, and other concurrent tasks.

Only four test, documentation, and CI files changed; no runtime launcher, scanner, installation, quarantine, application-selection, or user-preference code was modified. Both scanner-tests and macos-build are required green before authorized squash merge.

Verification

  • Verified the pushed branch has one non-empty commit and exactly the four scoped files.
  • Required CI: Python regression tests on macOS, macOS AppleScript compilation, and existing full native/scanner suites.
  • Explicit real Finder interaction is a guarded interactive test because Finder's Automation permission is user-controlled; CI never suppresses that prompt or changes the default handler.

JFWooten4 and others added 3 commits October 27, 2026 18:38
Add a Finder AppleScript Open integration probe, gated to interactive macOS with the PDF Magic Opener default already configured. Verify read-only default-handler preflight, source-file and origin-log safeguards, and Finder attribution, with AppleScript compilation in macOS CI. Preserve existing scanner, quarantine, and user associations.

Co-authored-by: ChatGPT # 6 <noreply@openai.com>
Preserve the concurrent PDF handler verification work on main and retain only the Finder Open integration probe, documentation, and scoped CI checks.

Co-authored-by: ChatGPT # 6 <noreply@openai.com>
Preserve current default-handler implementation and its checks; carry forward only the focused Finder Open probe, CI, and documentation.

Co-authored-by: ChatGPT # 6 <noreply@openai.com>

Copy link
Copy Markdown
Member Author

Final verification: GitHub Actions run 40596763741 succeeded on head f50fa23bca87b13daecbf1efd1ebebffbe38c394; both scanner-tests and macos-build passed, including compiling the real Finder AppleScript Open command, safe integration guardrail tests, and existing native scan/launch checks. GitHub reports the PR clean and mergeable, and its changed-file list contains only README, CI, the Finder Open script, and its dedicated Python tests. Concurrent merged PR #68 adds a separate Finder double-click test and does not duplicate this Open command test. Interactive Finder Automation consent remains an opt-in local run, not claimed as completed on hosted CI.

@JFWooten4
JFWooten4 merged commit a9a1a6d into main Oct 27, 2026
2 checks passed
@JFWooten4
JFWooten4 deleted the peachbottom-finderopen120 branch October 27, 2026 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant