Skip to content

Indexer: index a crate and those under it, delete everything, removed crates, Import #103

Open

Description

@johnf

Parent

Spec: indexer redesign

What to build

The remaining ways to ask for work, from the admin pages and the CLI.

  • A crate and those under it: expands into one job per crate.
  • Delete everything: one special job with no crate. It discards waiting jobs, clears both indexes wholesale, and clears every crate's indexed version while keeping the records.
  • Removed crates:
    • "Index everything" also queues a delete for each crate that has a record but is no longer in the repository.
    • A job that finds its crate gone deletes its indexes, removes the crate record, and succeeds.
  • Import: pnpm crates:import queues each crate it writes, drains the queue, and exits non-zero if an import or a job failed. Its logic lives in the source tree, and the script only parses arguments.
  • Index in place: "index everything" against an existing OCFL repository lists and indexes its crates. The README says how.

Acceptance criteria

  • Asking for a collection crate and those under it from the admin pages queues one job per crate.
  • Delete everything empties both indexes and shows every crate as not indexed. Waiting jobs are gone.
  • A crate removed from the repository disappears from search and the admin pages after "index everything".
  • Indexing a named crate that's missing succeeds and removes its indexes.
  • pnpm crates:import leaves imported crates indexed. The bootstrap test (the real CLI end to end) passes.
  • Coverage of the index queue and indexer stays at 100%. pnpm test and pnpm lint pass.

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