Skip to content

chore(src): delete 27 dark src files whose code a compiled file holds (#4700 batch 1) - #5163

Queued
noahgift wants to merge 1 commit into
mainfrom
la-72/4700-dark-src-batch1-r2
Queued

noahgift wants to merge 1 commit into
mainfrom
la-72/4700-dark-src-batch1-r2

Conversation

@noahgift

@noahgift noahgift commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Batch 1 of #4700: delete 27 .rs files under crates/*/src that no build compiles, each a copy of code a compiled file already holds. This re-cuts f3a0a48 onto current main with the same deletions; 40,766 lines go.

Row Change
1 Delete 25 dark files in aprender-serve, for example token.rs, qa_phase.rs, both mock_model.rs and layers/multi_head_attention.rs
2 Delete the dark generated_contracts.rs copies in aprender-graph and aprender-test; the compiled copy in aprender-serve stays
3 Remove the 13 baseline rows that named a deleted file (src_test_files_unwired 10, complexity 2, claim_literal 1). No row is added and no row for a surviving file changes

Why this is safe:

  • No mod declaration names any of the 27 files.
  • No include! or #[path] on main resolves to any of them. I checked 1,798 include! targets and 857 path targets, each resolved relative to its own file.
  • On main 812dbe3 plus this commit, all of these exit 0:
    • cargo check -p aprender-serve --all-targets, with and without --features cuda
    • cargo check -p aprender-graph --all-targets
    • check_src_test_files_wired.sh
    • check_baseline_ratchets.sh

Refs #4700
keep-open: batch 1 of several; #4700 also covers the stale-file decisions (S6, decode event, fused QKV, contract checks, argmax, ALiBi doc) and widening the dark-file guard to the whole tree.

ont-delta: none this sweep deletes uncompiled files, and the known-red rows it drops name only those deleted files; no type, shape or reason changes.

🤖 Generated with Claude Code

…#4700 batch 1)

Each file lies under crates/*/src and no package compiles it: no mod,
#[path] or include! reaches it from a package root (26 in aprender-serve
and aprender-graph packages, plus crates/aprender-test/src, a dir with a
virtual manifest only). A compiled file holds the same code: 23 are
byte-identical, and 4 are identical once // comments and whitespace are
removed (aprender-serve generate/mock_model.rs, gpu/gguf_model_state.rs,
quantize/avx2.rs, and aprender-test/src/generated_contracts.rs). Deleting
them loses no code. 40,766 lines.

Kept back: aprender-serve gguf/cuda/cache.rs, the 28th such twin. The dark
gguf/cuda/loading.rs include!s it (loading.rs:347), so it leaves with
loading.rs in a later batch and no deletion here leaves a dangling include!.

Baseline rows that named a deleted file are removed:
src_test_files_unwired_baseline.txt -10 (the #3809 guard fails on a stale
entry), complexity_baseline.txt -2, claim_literal_baseline.txt -1.
Left as they are: crates/aprender-serve/.pmat-baseline.json (a pmat 3.11.1
snapshot from 2026-04-03, untouched since the subtree merge, 54 of its rows
name these files), and the evidence/, datasets/ and docs/audits/ rows,
which record the past.

How the set was found: docs/lookahead/0.73/orphan_census.py --pin
316dee2 (branch la-73/3999-runs-everywhere-drafts): 138 orphans, 27 of
them with a twin, plus 1 twin in a dir with no package. References: git
grep at 316dee2 for each file's repo path, its crate-relative path and
its last two path components, and for any include!/#[path]/include_str!/
include_bytes! literal ending in its basename. Of the 5 basename hits, 4
resolve to other files that exist, and the fifth is loading.rs:347 above.
No source, contract, script or test reads any deleted file.

Checks on this branch (no cargo on this host; CI's workspace-test is the
build proof):
- scripts/check_src_test_files_wired.sh: OK, 32 baselined dark files (was
  42); --self-test: all cases pass.
- scripts/check_baseline_ratchets.sh: all 3 baselines "did not grow (N
  removed)". Its 2 FAIL rows are tool_version (this box has pmat 3.42.0,
  the rows were recorded under 3.41.1) and also hit the untouched
  cb200_baseline.txt.
- scripts/check_no_claim_literals.sh: PASS. REPORT 2 stale entries, the
  same 2 as on main.

Refs #4700

Re-cut onto current main by la-0.72b (E6 look-ahead) from la-0.73's f3a0a48; the same 27 deletions and 3 baseline row removals.

Refs #4700

Agent: la-0.72b
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

§13.11 rung 1 — quorum shadow verdict

S13-SHADOW pr=5163 head=1d9fd52e6fc6c458d771478adc9c180fd707bf2e verdict=REFUSE class=Q1 arm_rc=1

Shadow mode: this records a verdict and merges nothing. A refusal
to arm is not a block (§13 adds zero rows to §7) — the pull request is
exactly as green as it was.

@noahgift noahgift left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat 1, la-0.72 APPROVE @ 1d9fd52

Checked each of the 27 deleted files: none has a mod, include! or path declaration in its parent module, cfg-gated ones included. The three baseline files lose only the rows of the deleted files. CI green.

Receipt: review-la-0.72-5163-1d9fd52e6f.md

@noahgift noahgift left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat 2, aprender-78 APPROVE @ 1d9fd52

  • All 27 deleted .rs files are dark at this head. For each one, no include!/include_str!, #[path] or parent-module mod resolves to its exact path, checked by path resolution. A loose suffix grep flagged 10, and every one resolved to a different file (e.g. gguf/loader.rs includes gguf/token.rs, not src/token.rs).
  • The three baseline files lose only the rows for the deleted files; no other row is loosened. The one remaining non-Rust mention is a historical evidence log.
  • CI on this head: 10 success, 2 skipped.

@noahgift
noahgift added this pull request to the merge queue Oct 12, 2026
Any commits made after this event will not be merged.

This branch has not been deployed

No deployments
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