Skip to content

docs: record that indexing runs in a worker draining a durable queue - #80

Merged
johnf merged 1 commit into
mainfrom
worktree-adr-indexing-worker-queue
Nov 17, 2026
Merged

johnf merged 1 commit into
mainfrom
worktree-adr-indexing-worker-queue

Conversation

@johnf

@johnf johnf commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Records the decision from the indexer redesign map (#65), ticket #70 "Where indexing runs and what triggers it". Docs only; no code changes.

 docs/adr/
+└── 0005-indexing-runs-in-a-worker.md   # indexing leaves the API process
 GLOSSARY.md
+  Reindex, Index job, Worker             # new terms
~  Index                                  # now says an already-indexed crate is left alone

The design the ADR records:

flowchart LR
    Admin[Admin pages] --> Q[(Durable queue of index jobs)]
    Deposit --> Q
    CLI[CLI: Import, pnpm index] --> Q
    Q --> W[Worker]
    Q --> CLI
    W --> DB[Database index]
    W --> S[Search index]
Loading

The API only adds index jobs. The Worker runs them, and the CLI adds jobs and then runs the queue itself until it is empty.

Evidence

  • Before: no ADR for where indexing runs; the glossary had no term for a queued request to index a crate.
    After: ADR 0005 and three glossary terms. The pre-commit checks (biome, tsc, knip) pass.

Merge Danger

Door: two-way

Documents a decision; reverting is a docs revert. The decision itself is the hard-to-reverse part, and it isn't implemented by this PR.

Blast Radius: docs

#79 also edits GLOSSARY.md, so whichever merges second may need a rebase.

Adds ADR 0005 and the glossary terms Reindex, Index job and Worker.

Decided on the indexer redesign map (#65), ticket #70.
@johnf
johnf merged commit 1ac0610 into main Nov 17, 2026
5 checks passed
@johnf
johnf deleted the worktree-adr-indexing-worker-queue branch November 17, 2026 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant