Add CLI Ghost content type selection and guarded migration
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 22
- Forks
- 19
- Avg merge
- 18h 31m
- Merged PRs (30d)
- 50
Description
Parent
- PRD #213 — Deliver the maintained HTML-to-Algolia extraction pipeline
- User stories covered: 30–36, 41–43, 48–52
What to build
Deliver the complete CLI path for selecting posts, pages, or both and safely migrate an existing mixed-use Algolia index from legacy slug-managed records to stable Ghost content identity. Preserve posts-only defaults and partial-run safety, reconcile only package-managed records on complete runs, and publish the operator-facing migration release before incremental handlers change.
Acceptance criteria
- The CLI accepts a top-level nonempty, duplicate-free
contentTypesarray containing onlypostand/orpage; omission remains posts-only and there is no CLI override. - Posts are fetched first and pages second through independent pagination streams with the existing delay and complete-run page size.
-
--limitremains restricted to integers 1–100,--pagestill requires--limit, and either flag makes every selected-type run a partial upsert that never deletes unseen records. - Existing slug skip/ignore behavior remains slug-wide across selected Ghost content types.
- A complete run validates and preflights every new record, reconciles stale package-managed records and newly disabled content types, saves the selected set, and leaves unrelated records untouched.
- Same-slug posts and pages coexist through protected content ID/type fields and distinct grouping by content ID.
- Before in-place migration, existing records are classified as valid new managed, exact legacy managed, unrelated, or ambiguous; ambiguity and partial runs against an unmigrated index fail before writes.
- The operator contract requires pausing Netlify writes, copying the index, preflighting, running the complete migration, verifying, and only then deploying identity-aware handlers; required identity settings are applied after record reconciliation.
- The post-migration gate proves valid managed identity/type, fetched census parity, no stale legacy/continuation records, disabled-type removal, same-slug coexistence, unchanged unrelated records, and required facets/distinct settings.
- When in-place classification is unsafe, the documented alternative builds and validates a fresh index and switches configuration.
- Offline process-level acceptance covers all selection, pagination, partial/complete, classification, reconciliation, settings ordering, failure, backup/rollback, and unrelated-record cases.
- A scoped CLI minor release is published and verified with maintenance window, backup, default, migration, settings, compatible Netlify floor, verification, and rollback instructions.
Blocked by
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with blocked issue #224 and parent PRD #213, then trace the existing CLI and Algolia migration flow. Done means satisfying the selection, pagination, partial-run, reconciliation, migration-safety, verification, offline acceptance, and release criteria described here.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli, search
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100