Phase 1 of the M12 megaplan for #201: pure refactor extracting every Core Printing (PM*) call in PrintPanelService into a shared @MainActorPMTicketBridge (decision D12), so the Phase 2 ticket serialise/restore path and the Phase 4 native spooler share one documented ownership policy.
Changes
New Sources/ICCery/Print/PMTicketBridge.swift: Handles (session/settings/pageFormat/object), Binding (makePrinter/release/bind/currentPrinterID), Values (setValue/stringValue), Paper (applyPaper/customPaperDimensions) — moved verbatim from PrintPanelService.
PrintPanelService now calls the bridge; local unsafeBitCast/PMRelease/paper helpers deleted. sessionBindingFailed moved into PMTicketError.
Gate evidence (zero behaviour change)
xcodebuild test -scheme ICCery -only-testing:ICCeryCoreTests (x86_64): 483 tests, 1 failure — ArgyllRunnerPrinttargTests.testDeterminism (malformedManifest: No JSON document found in printtarg stdout), a real-subprocess flake unrelated to this refactor (the diff touches no Argyll code); passes on isolated re-run.
No CI runs on feat→milestone PRs per .gitea/workflows/macos.yml; local gate is the merge evidence.
## Summary
Phase 1 of the M12 megaplan for #201: pure refactor extracting every Core Printing (`PM*`) call in `PrintPanelService` into a shared `@MainActor` `PMTicketBridge` (decision D12), so the Phase 2 ticket serialise/restore path and the Phase 4 native spooler share one documented ownership policy.
## Changes
- New `Sources/ICCery/Print/PMTicketBridge.swift`: Handles (`session`/`settings`/`pageFormat`/`object`), Binding (`makePrinter`/`release`/`bind`/`currentPrinterID`), Values (`setValue`/`stringValue`), Paper (`applyPaper`/`customPaperDimensions`) — moved verbatim from `PrintPanelService`.
- `PrintPanelService` now calls the bridge; local `unsafeBitCast`/`PMRelease`/paper helpers deleted. `sessionBindingFailed` moved into `PMTicketError`.
## Gate evidence (zero behaviour change)
- `xcodebuild test -scheme ICCery -only-testing:ICCeryCoreTests` (x86_64): 483 tests, 1 failure — `ArgyllRunnerPrinttargTests.testDeterminism` (`malformedManifest: No JSON document found in printtarg stdout`), a real-subprocess flake unrelated to this refactor (the diff touches no Argyll code); passes on isolated re-run.
- No CI runs on feat→milestone PRs per `.gitea/workflows/macos.yml`; local gate is the merge evidence.
Centralise every Core Printing (PM*) call in one @MainActor bridge so
the upcoming ticket serialise/restore path and native spooler share a
single documented ownership policy. Pure move — no behaviour change.
gronod
merged commit ffbe56f43a into milestone/m12-native-spool2026-09-17 12:16:27 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Phase 1 of the M12 megaplan for #201: pure refactor extracting every Core Printing (
PM*) call inPrintPanelServiceinto a shared@MainActorPMTicketBridge(decision D12), so the Phase 2 ticket serialise/restore path and the Phase 4 native spooler share one documented ownership policy.Changes
Sources/ICCery/Print/PMTicketBridge.swift: Handles (session/settings/pageFormat/object), Binding (makePrinter/release/bind/currentPrinterID), Values (setValue/stringValue), Paper (applyPaper/customPaperDimensions) — moved verbatim fromPrintPanelService.PrintPanelServicenow calls the bridge; localunsafeBitCast/PMRelease/paper helpers deleted.sessionBindingFailedmoved intoPMTicketError.Gate evidence (zero behaviour change)
xcodebuild test -scheme ICCery -only-testing:ICCeryCoreTests(x86_64): 483 tests, 1 failure —ArgyllRunnerPrinttargTests.testDeterminism(malformedManifest: No JSON document found in printtarg stdout), a real-subprocess flake unrelated to this refactor (the diff touches no Argyll code); passes on isolated re-run..gitea/workflows/macos.yml; local gate is the merge evidence.