Skip to content

[codex] Improve inventory schema handling#76

Merged
jmcte merged 4 commits into
mainfrom
codex/repair-icloud-inventory-probes
Jun 11, 2026
Merged

[codex] Improve inventory schema handling#76
jmcte merged 4 commits into
mainfrom
codex/repair-icloud-inventory-probes

Conversation

@pheidon

@pheidon pheidon commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • route Safari CloudTabs list through the live cloud_tabs / cloud_tab_devices schema
  • normalize SQLite schema drift into clear unsupported-schema errors instead of raw sqlite failures
  • allow iCloud Drive scoped paths to point at a file without trying to open the file as a directory
  • add Apple Messages chat.db schema support for conversations and recent-message metadata
  • resolve modern Contacts AddressBook databases under AddressBook/Sources/*/AddressBook-v22.abcddb
  • add focused regression coverage for unsupported schemas, file-scoped Drive reads, Apple Messages schema reads, and AddressBook source discovery

Why

The privacy-safe Hermes sweep showed several broad inventory commands failing against real Apple stores because the CLI was querying synthetic placeholder table names or old default paths. This patch makes schema drift explicit and actionable, keeps CloudTabs on the live schema already verified on Hermes, starts replacing synthetic assumptions with real Apple schema adapters, and resolves the modern Contacts database location.

Validation

  • git diff --check: passed locally on Pheidon
  • GitHub PR Fast CI: passed on macOS self-hosted runner for commit 93c3b67
  • GitHub PR Fast CI: passed on macOS self-hosted runner for commit 85b7061
  • GitHub PR Fast CI: passed on macOS self-hosted runner for commit 8fc5a09
  • Local Pheidon Swift validation not available: swift is not installed here
  • Hermes schema-only scan completed; live-store Messages validation was requested but the validator did not return a compact result yet

Remaining Follow-Up

  • Add bounded/summary-only live validation for messages conversations, or add a CLI --limit option for that command before re-running on a full live store
  • Add schema-aware row adapters for live Notes, Contacts, Mail, and Music after Hermes returns full table/column maps where needed

@pheidon pheidon force-pushed the codex/repair-icloud-inventory-probes branch from d026661 to 93c3b67 Compare June 11, 2026 17:08
@pheidon pheidon force-pushed the codex/repair-icloud-inventory-probes branch from 3271022 to 8fc5a09 Compare June 11, 2026 17:36
@jmcte jmcte marked this pull request as ready for review June 11, 2026 17:53

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8fc5a09790

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Sources/ICloudCLICore/DriveInventory.swift
Comment thread Sources/ICloudCLICore/LocalInventories.swift
@jmcte jmcte enabled auto-merge (squash) June 11, 2026 20:23
@jmcte jmcte merged commit 3887fee into main Jun 11, 2026
1 check passed
@jmcte jmcte deleted the codex/repair-icloud-inventory-probes branch June 11, 2026 21:12
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.

2 participants