Skip to content

Gated mail inventory and dry-run

Duckbill™ can inventory folders and produce a dry-run plan. Bulk historical migration is not an MVP execute path.

Rules

HTTP

MethodPathBehavior
GET/api/inventory/sourceFolder/message inventory against a recorded or mock adapter
GET/api/inventory/source?accountId=Stored scan for that account. Does not call the provider
GET/api/inventory/scansLast AnalyzeFolders snapshot for every account in the session
POST/api/inventory/folders/analyzePer-folder counts
GET/api/migrations/plansMicrosoft-target plan and connected Gmail or iCloud sources
POST/api/migrations/plansPersist a dry-run-required plan from stored folder scans
GET/api/migrations/dry-runLast dry-run counts for the signed-in user
POST/api/migrations/dry-runNon-mutating estimate for one source
POST/api/migrations/startAlways POLICY_DENIED in this milestone
POST/api/migrations/pausePOLICY_DENIED
POST/api/migrations/resumePOLICY_DENIED

Code

ModuleRole
packages/application/src/inventory.tsInventory and analyze
packages/application/src/folder-scan.tsConnect-time scan, stale label, stored read
packages/persistence/src/folder-scans.tsPer-account scan rows
packages/application/src/migration.tsPlan, dry-run, gated start
packages/application/src/migration-plan-page.tsMicrosoft-target plan from stored scans
packages/application/src/migration-dry-run-view.tsOne-source dry-run counts and denial copy
packages/persistence/src/migration-plans.tsPlan persistence
packages/persistence/src/migration-dry-runs.tsLast dry-run row for a user
apps/web/src/app/inbox/migration/page.tsxMigration page with plan and dry-run counts
database/migrations/0019_followon_providers.sqlPlan and dry-run tables
database/migrations/0024_folder_scans.sqlFolder scan table

See ADR 0027.