Skip to content

refactor(crux): delete unimported modules and completed one-shot scripts - #4995

Merged
OAGr merged 1 commit into
mainfrom
claude/cleanup-crux-orphans
Sep 26, 2026
Merged

OAGr merged 1 commit into
mainfrom
claude/cleanup-crux-orphans

Conversation

@OAGr

@OAGr OAGr commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Removes about 11k lines of crux code that nothing uses: 23 modules with no importers, and 25 one-shot migration or backfill scripts whose migrations have already landed. Pure deletion plus three comment/doc edits; all of it is recoverable with git show e35e704fa:<path>.

Modules with no importers (repo-wide import graph + grep for string/script-map references): lib/validation/mermaid-checks.ts, lib/issue-scoring.ts, lib/matrix-dimensions.ts, lib/matrix-snapshot.ts (the last three with their tests), lib/calc-evaluator.ts, lib/entity-names.ts, lib/normalize-entity-slugs.ts, lib/dispatch-prompt-template.ts, entity-matrix/scan.ts and gaps.ts, authoring/orchestrator/tools/add-references.ts and enrich/enrich-references.ts (registry.ts already says the tool was removed), generate/generate-research-reports.ts (a no-op), evals/pilot.ts, and six unused barrel index.ts files.

Completed one-shot scripts in crux/scripts/ (FISA-702 seeding, stable-id / slug / fact-id migrations, QUA-503 mapping and sweep already applied as migration 0182, resource title fixes, and others) plus authoring/bootstrap-update-frequency.ts and reassign-update-frequency.ts. sync-careers-to-personnel was already broken: its input career-data.json does not exist.

Kept on purpose: check-pr-merge-eligible (a hook uses it), refresh-frameworks (a workflow runs it), reusable tools (scrape-ailabwatch, fetch-forum-posts, check-source-urls, triage-footnotes, fix-contradicted-facts), and stableid-migration-map.json (SQL provenance).

Verified on the tree with these deletions: crux typecheck error set unchanged; crux vitest passes (only tests of deleted modules are gone); node crux/build.mjs and pnpm crux --help OK; content gate passes; pre-push gate passed. Touches crux/commands/ so it needs gate:rules-ok.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WXiHX1a9DEuvwydgTP43ZE


Generated by Claude Code

23 modules nothing imports, and 25 one-shot migration/backfill scripts
whose migrations have landed. Recoverable from git history.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WXiHX1a9DEuvwydgTP43ZE
@coderabbitai

coderabbitai Bot commented Sep 26, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 38 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 01d15fc5-2a13-4fa9-ae90-389bdeeba355

📥 Commits

Reviewing files that changed from the base of the PR and between f65653a and f95c10a.

📒 Files selected for processing (52)
  • apps/wiki-server/src/routes/wikibase/resources.ts
  • crux/authoring/bootstrap-update-frequency.ts
  • crux/authoring/creator/index.ts
  • crux/authoring/orchestrator/tools/add-references.ts
  • crux/authoring/reassign-update-frequency.ts
  • crux/commands/tablebase.ts
  • crux/enrich/enrich-references.ts
  • crux/entity-matrix/gaps.ts
  • crux/entity-matrix/scan.ts
  • crux/evals/injectors/index.ts
  • crux/evals/pilot.ts
  • crux/generate/generate-research-reports.ts
  • crux/health-monitor/index.ts
  • crux/lib/calc-evaluator.ts
  • crux/lib/dispatch-prompt-template.ts
  • crux/lib/entity-names.ts
  • crux/lib/issue-scoring.test.ts
  • crux/lib/issue-scoring.ts
  • crux/lib/issues/index.ts
  • crux/lib/maintain/index.ts
  • crux/lib/matrix-dimensions.test.ts
  • crux/lib/matrix-dimensions.ts
  • crux/lib/matrix-snapshot.test.ts
  • crux/lib/matrix-snapshot.ts
  • crux/lib/normalize-entity-slugs.ts
  • crux/lib/political/index.ts
  • crux/lib/validation/mermaid-checks.ts
  • crux/scripts/add-stableids-to-entity-yaml.ts
  • crux/scripts/apply-batches-to-fisa-702.ts
  • crux/scripts/backfill-fact-entity-ids.ts
  • crux/scripts/dedup-resources.ts
  • crux/scripts/fix-resource-titles.test.ts
  • crux/scripts/fix-resource-titles.ts
  • crux/scripts/fix-url-resource-titles.ts
  • crux/scripts/grokipedia-from-wikipedia.mjs
  • crux/scripts/migrate-entity-types.mjs
  • crux/scripts/migrate-kb-slugs-to-stableids.ts
  • crux/scripts/migrate-naked-fact-ids.ts
  • crux/scripts/migrate-ref-slugs.ts
  • crux/scripts/migrate-resource-hex-to-stableid.ts
  • crux/scripts/normalize-stableids.ts
  • crux/scripts/qua-503-generate-mapping.ts
  • crux/scripts/qua-503-sweep-mdx.ts
  • crux/scripts/recompute-source-verdicts.ts
  • crux/scripts/research-fisa-702.ts
  • crux/scripts/resource-title-fixes.json
  • crux/scripts/seed-fisa-702-analyze.ts
  • crux/scripts/seed-fisa-702.ts
  • crux/scripts/strip-career-facts.ts
  • crux/scripts/sync-careers-to-personnel.ts
  • crux/scripts/wire-references.ts
  • docs/agent-rules/id-system.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Protected paths modified

This PR modifies files that affect agent behavior, CI, or validation rules.
A human must review these changes and add the gate:rules-ok label to unblock merge.

Modified protected files:

  • crux/commands/tablebase.ts

Status: gate:rules-ok label is present. This check will pass.

OAGr commented Sep 26, 2026

Copy link
Copy Markdown
Contributor Author

Protected Paths Check is red only because crux/commands/tablebase.ts is a protected path. The edit removes two log lines that point at the deleted sync-careers-to-personnel script. It needs a maintainer's gate:rules-ok after review; no code change will clear it.


Generated by Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

Test Coverage Report

Workspace Lines Branches Functions Statements
wiki-server 56.2% 41.0% 57.8% 55.1%
web 13.2% 11.5% 8.5% 13.3%
discord-bot 39.1% 30.3% 43.6% 38.2%
crux 41.5% 38.8% 44.5% 41.4%
Total 36.6% 29.9% 31.9% 36.3%

Coverage is advisory only — no thresholds enforced. Generated by vitest --coverage.

@OAGr OAGr added the gate:rules-ok Human override for rules gate label Sep 26, 2026 — with Claude
@OAGr
OAGr merged commit 4b560dd into main Sep 26, 2026
40 of 41 checks passed
@OAGr
OAGr deleted the claude/cleanup-crux-orphans branch September 26, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gate:rules-ok Human override for rules gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants