Add resumable per-provider metadata archives#104
Conversation
Expose a deterministic metadata-only provider registry through JSON and text output, covering every current Apple-data command family with maturity, source, permission, sensitivity, capability, and polling declarations. Document the v1 compatibility policy.\n\nCloses #89.
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.
Add explicit scan and wall-clock budgets, structured crawl reports, cancellable Drive enumeration, Finder-tag budget metadata, and redacted watch partial-success envelopes. Extend the live audit with explicit budgets and aggregate outcomes.\n\nCloses #92.
Define versioned archive sync, storage, status, migration, retention, and privacy contracts with idempotent upserts, explicit tombstones, bounded attempts, persisted freshness and counts, private atomic files, and fail-closed sensitivity gates.\n\nCloses #93.
|
@athena-omt @pheidon @ares-omt @Hermes-omt — this high-risk archive-contract PR is stacked on #101–#103 and intentionally draft until those foundations merge. Early review is requested on cursor advancement, idempotency, migration, retention, nested JSON handling, private atomic storage, backup policy, and fail-closed sensitivity boundaries. |
Hermes-omt
left a comment
There was a problem hiding this comment.
Request changes: sensitiveField(in:) only recursively inspects direct object elements of an array. A payload such as {"nested":[[{"body":"..."}]]} is accepted and persisted despite body being explicitly forbidden. I reproduced this through archive sync on the reviewed head: it exited 0 and wrote the synthetic body value into account.json.
Please make sensitive-field traversal recursive for every ArchiveValue shape (including arbitrarily nested arrays), and add a regression test covering an array nested inside an array containing a forbidden key. The existing direct nested-object test does not cover this case.
Hermes validation: exact-head checkout; swift test passed (130 tests). Live CI checks are successful; GitHub currently reports auto-merge disabled and mergeable_state=dirty.
Hermes-omt
left a comment
There was a problem hiding this comment.
Reviewed current head 7f74b1639279f0be5ae517a67c6435e83a4eb56c. The prior nested-array sensitive-field bypass is fixed with recursive traversal across all ArchiveValue shapes and a targeted regression test. Exact-head macOS validation passed: swift test --disable-sandbox; PR Fast CI and CI Gate are successful. Branch is current with main, mergeable clean, auto-merge enabled, and no unresolved review threads.
Summary
Governing Issue
Closes #93
Validation
CI Gateswift test --disable-sandbox— 130 tests passedbash scripts/ci/run-fast-checks.sh— passed; source line coverage 89.13%, mutation checks killed expected mutations, debug and release builds passedSynthetic tests cover restart/resume, idempotency, explicit tombstones, persisted counts, v0 migration, scan and timeout partial state, source partial failure, retention, permissions, CLI sync/status, nested JSON fields, and sensitive-provider/field rejection.
Bootstrap Governance
CONTRIBUTING.md,.github/PULL_REQUEST_TEMPLATE.md, anddocs/bootstrap/onboarding.mdwhen applicableThis branch is stacked on foundation PRs #101, #102, and #103. The PR remains draft until those merge and the diff collapses to the issue #93 commit; auto-merge will then be armed.
Flow Contract
Flow Merge Readiness
Next actor: foundation reviewers, then security/architecture/macOS review on this PR.
Merge Automation
gh pr merge --auto --squash, or the reason it is unavailable/unsafe is noted belowAuto-merge is intentionally deferred while the PR is draft and stacked on #101–#103.
Notes