Skip to content

Add CLI Ghost content type selection and guarded migration #225

Description

@aileen

Parent

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 contentTypes array containing only post and/or page; 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.
  • --limit remains restricted to integers 1–100, --page still 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions