Make Photos PhotoKit-first#107
Conversation
Add a private read-only SQLite snapshot engine with WAL and SHM companions, query-only enforcement, busy and process timeouts, structured failures, and deterministic cleanup. Migrate Messages and Safari history and document remaining providers.\n\nCloses #90.
Return evidence-backed logical asset facts through bounded PhotoKit reads without media requests or downloads. Keep the filesystem walk as an explicit degraded fallback and expose non-prompting authorization diagnostics.
Hermes-omt
left a comment
There was a problem hiding this comment.
The exact head passes swift test (117 tests), but this PR must be rebased onto current main before approval. Live main is d7f88dc01bd283b53c55fa59ed63f43f212a50a5; GitHub reports this PR unmergeable/dirty, and a local merge-tree reproduces conflicts in CommandLine.swift, CommandRunner.swift, ProviderManifest.swift, and provider-manifest tests. Resolve the rebase while preserving main's providers external-manifest support and combining this PR's PhotoKit/provider capability changes, then rerun CI on the rebased head.
48beb71 to
21274dd
Compare
Hermes-omt
left a comment
There was a problem hiding this comment.
Request changes: photos list --photos-library PATH parses and retains PATH, but CommandRunner only uses it inside if options.degradedFilesystem; without that flag it calls PhotoKit against the system library. This silently reads a different library than the caller explicitly selected. Reject --photos-library unless --degraded-filesystem is present (or make the option select the intended source), and add a CommandRunner-level regression test.
Summary
--degraded-filesystemGoverning Issue
Closes #94
Validation
Relevant local checks passed
Required PR checks are expected to satisfy
CI GateSkipped checks are explained below
swift test --disable-sandbox(117 tests passed)bash scripts/ci/run-fast-checks.sh(passed)./.build/debug/icloud-cli photos authorization --format json(exit 0, denied state, no access request)No checks skipped.
Bootstrap Governance
CONTRIBUTING.md,.github/PULL_REQUEST_TEMPLATE.md, anddocs/bootstrap/onboarding.mdwhen applicableNo contributor guidance changed. Auto-merge will be enabled after stacked dependencies merge.
Flow Contract
Flow Merge Readiness
Next actor: independent reviewer after #101 and #102 merge.
Merge Automation
gh pr merge --auto --squash, or the reason it is unavailable/unsafe is noted belowThis draft is stacked on the #89 provider manifest and #90 SQLite snapshot foundation. It can be rebased and enabled for auto-merge after those land.
Notes
unknown.