Skip to content

Archive retired backfill one-shots (ledger #194) - #1947

Merged
BigSimmo merged 4 commits into
mainfrom
codex/retire-backfill-one-shots
Aug 14, 2026
Merged

Archive retired backfill one-shots (ledger #194)#1947
BigSimmo merged 4 commits into
mainfrom
codex/retire-backfill-one-shots

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

  • Archive backfill-document-covers.mjs, backfill-document-tags.ts, and backfill-enrichment.ts to scripts/archive/, following the existing check-m13-migration.ts / check-july8-live-batch.ts archive pattern (npm scripts repointed at the new path so they stay runnable; no npm script existed for the covers script, so it's invoked directly at its new path).
  • Update tests/document-cover-thumbnails.test.ts's source-read path for the moved covers script (it asserts a pagination-safety property of that script's source, so the test stays live rather than being archived alongside it).
  • Update docs/scripts-index.md to record the archive moves and explain why the other two scripts the ledger row named (backfill-gold-document-labels.ts, backfill-smart-index.ts) were not archived.
  • Confirm (with grep evidence, see Notes) that the ledger row's second claim — a dead ci-change-scope token — does not apply: that script is live, central CI tooling.

Docs/scripts only. No application code, CI workflow files, or clinical/RAG surfaces touched.

Verification

  • npm run docs:check-scriptsdocs script-ref check passed: 473 npm-run reference(s) resolve to real scripts.
  • npm run verify:pr-local (heavy scope, triggered by the package.json + test-file changes) — all steps passed except one pre-existing, unrelated failure (see Notes):
    • check:runtimePASS: Node runtime 24.19.0 matches required Node 24.x. / PASS: npm runtime 11.17.0 matches required npm 11.x.
    • check:installed-lock-parityfull tree: 760 package locations; 51566 files.
    • format:changedAll matched files use Prettier code style!
    • docs:check-inventoryDocs inventory current: 237 script files, 245 npm scripts.
    • docs:check-linksdocs link check passed: 1736 repo path references resolve.
    • lint / typecheck — clean
    • testTest Files 601 passed (601) / Tests 6509 passed | 4 skipped (6513)
    • buildCompiled successfully in 57s, Client bundle secret surface check passed.
    • check:rag:fixturesOffline RAG fixture and manifest validation passed (36 golden cases, 23 suites).
    • check:medication-interactionsdata/medication-interaction-index.json is up to date (523 rows).
    • check:medication-lexicon-reportFAILED, pre-existing and unrelated to this diff (see Notes)
  • npm run verify:ui — not applicable, no UI/routing/styling change
  • npm run verify:release — not applicable, not a release/handoff gate

Risk and rollout

  • Risk: Low. Two of the three archived scripts had no npm-run callers beyond their own manual entry point, and none of the five scripts named in the ledger row are referenced in .github/workflows/, worker/, or any Railway config (checked directly — no scheduled/cron jobs reference any of the five). All three archived scripts remain runnable at their new path.
  • Rollback: git revert this commit; it only moves files and edits docs/package.json script paths.
  • Provider or production effects: None.

Notes

Ledger #194, part 1 (five backfill one-shots) — three archived, two kept:

Archived (confirmed no live invocation — no .github/workflows/ reference, no worker/ reference, no Railway cron/scheduled-job reference, and only a manual npm-run entry point or none at all):

  • backfill-document-covers.mjs — the ingestion pipeline (worker/main.ts, worker/python/extract_pdf_assets.py) now generates cover_page images inline for every newly-indexed PDF; this script was the one-time catch-up for documents indexed before that landed. It had no npm script (only direct node scripts/... invocation) and is not referenced anywhere except tests/document-cover-thumbnails.test.ts, which reads its source text to assert a real pagination-safety property (a stable ORDER BY for PostgREST range scans) — that test's import path was updated to the new archive location so the assertion keeps running.
  • backfill-document-tags.ts / backfill-enrichment.ts — both were already listed as one-shot archive candidates in docs/scripts-index.md's "Remaining candidates" line before this PR. Their npm scripts (tags:backfill, enrich:backfill) are repointed at the archive path rather than removed, matching how check:m13-migration / check:july8-live-batch stay runnable after archiving.

Not archived, despite being named in the ledger row: backfill-gold-document-labels.ts and backfill-smart-index.ts. Both are already classified as [live] ongoing tooling in docs/scripts-index.md (Document intelligence & governance / Ingestion, indexing & reindex sections) and in docs/codebase-index.md — not in the doc's "One-shot / dated — archive candidates" section. Archiving them would contradict this repo's own established, pre-existing convention for distinguishing completed migrations from ongoing tooling, so they were left in place. Flagged in docs/scripts-index.md for visibility.

Ledger #194, part 2 (dead ci-change-scope token) — confirmed not applicable, no action taken:

$ grep -rn "ci-change-scope" . (excluding node_modules/.git)
./.github/workflows/ci.yml:45:    # paths fail closed to static_heavy_changed in ci-change-scope.mjs.
./.github/workflows/ci.yml:84:            node scripts/ci-change-scope.mjs --files .github/actions/setup-lighthouse-chromium/action.yml
./.github/workflows/ci.yml:86:            node scripts/ci-change-scope.mjs
./scripts/ci-change-scope.mjs: (the script itself, 1040+ lines, self-tested)
./scripts/check-format-changed.mjs:33:  spawnSync(..., ["scripts/ci-change-scope.mjs", "--json"], ...)
./scripts/verify-pr-local.mjs:91:  const args = ["scripts/ci-change-scope.mjs", "--json"];
./scripts/verify-phone-chrome.mjs:48:  execFileSync(..., ["scripts/ci-change-scope.mjs", "--json"], ...)
./scripts/productivity-core.mjs:409:  const args = ["scripts/ci-change-scope.mjs", "--json"];
./tests/ci-cache-safety.test.ts:171:  "node scripts/ci-change-scope.mjs --files ..."

ci-change-scope is live, central CI-scope classification tooling wired into .github/workflows/ci.yml and four other scripts plus a test. No dead token exists to remove — that half of ledger row #194 was already stale before this pass, as the prior pass suspected.

Pre-existing, unrelated gate failure observed during verification: check:medication-lexicon-report fails ("docs/medication-interaction-lexicon-review.md is stale") on this branch. Confirmed via git diff origin/main -- docs/medication-interaction-lexicon-review.md scripts/build-medication-lexicon-report.ts returning empty — neither file differs from origin/main on this branch, so the failure is pre-existing repo drift unrelated to this PR's scope and was not fixed here to avoid expanding this single-task docs/scripts PR into an unrelated surface.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com


Generated by Claude Code

Ledger #194: three of the five backfill scripts named in the row are
completed one-time migrations with no live invocation (no npm script
in backfill-document-covers.mjs's case, and only manual npm run
entries for the other two; none referenced in .github/workflows/ or
any scheduled job) — move them to scripts/archive/ following the
existing check-m13-migration.ts / check-july8-live-batch.ts pattern:

- backfill-document-covers.mjs: covers are now generated inline by
  the ingestion pipeline (worker/main.ts,
  worker/python/extract_pdf_assets.py); this was the one-time catch-up
  for documents indexed before that. No npm script existed; still
  runnable directly. tests/document-cover-thumbnails.test.ts reads its
  source for a pagination-safety assertion — import path updated.
- backfill-document-tags.ts / backfill-enrichment.ts: already flagged
  as one-shot archive candidates in docs/scripts-index.md. npm scripts
  (tags:backfill / enrich:backfill) repointed at the archive path so
  they stay runnable, matching the check:m13-migration precedent.

The other two named scripts (backfill-gold-document-labels.ts,
backfill-smart-index.ts) are left in place: docs/scripts-index.md and
docs/codebase-index.md already classify both as [live] ongoing
governance/indexing tooling, not completed migrations, and archiving
them would contradict that established convention.

Also confirmed the ledger row's second claim: no dead "ci-change-scope"
token exists. scripts/ci-change-scope.mjs is live, central CI-scope
classification tooling, referenced by .github/workflows/ci.yml,
verify-pr-local.mjs, verify-phone-chrome.mjs, productivity-core.mjs,
check-format-changed.mjs, and tests/ci-cache-safety.test.ts. No action
taken on that half of the row.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QLbw9qpfjv5CeNz6XpmteN
@supabase

supabase Bot commented Aug 14, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 35 minutes

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1f6cd58b-f3be-48cd-b4f8-2b39c04858c2

📥 Commits

Reviewing files that changed from the base of the PR and between 563ce41 and e2691a3.

📒 Files selected for processing (6)
  • docs/scripts-index.md
  • package.json
  • scripts/archive/backfill-document-covers.mjs
  • scripts/archive/backfill-document-tags.ts
  • scripts/archive/backfill-enrichment.ts
  • tests/document-cover-thumbnails.test.ts

Comment @coderabbitai help to get the list of available commands.

BigSimmo pushed a commit that referenced this pull request Aug 14, 2026
Three independent branches (PR #1947, #1949, #1950) hit
check:medication-lexicon-report failing on a file with zero diff
against origin/main. Queues a P2 ledger request to investigate the
staleness-detection logic itself rather than let it keep recurring
unaddressed across unrelated PRs.
@BigSimmo
BigSimmo enabled auto-merge August 14, 2026 12:35
@BigSimmo
BigSimmo disabled auto-merge August 14, 2026 13:01
@BigSimmo
BigSimmo enabled auto-merge (squash) August 14, 2026 13:14
@BigSimmo
BigSimmo merged commit c9b089c into main Aug 14, 2026
24 checks passed
@BigSimmo
BigSimmo deleted the codex/retire-backfill-one-shots branch August 14, 2026 13:30
BigSimmo pushed a commit that referenced this pull request Aug 14, 2026
…merged

#215, #210, and #293 were queued as `done` in this same PR, each citing a PR
(#1949, #1953, #1962) that turned out still to be open, not merged — verified
by checking whether each PR's actual file change is present on origin/main
(none are). Reconciling the original `done` requests would have closed these
rows while their fixes exist only on unmerged branches, one of which (#1949)
currently has failing required CI.

Converts all three to `update` requests documenting the correction and the
real current state, so reconciling this PR now cannot close a row before its
fix has actually landed. Leaves #98, #189, and #194 as `done` unchanged —
those cite PR #1950 and PR #1947, both confirmed merged into main.
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.

2 participants