Skip to content

chore(repo): remove verified junk from the 2026-10-04 audit - #439

Merged
jonit-dev merged 10 commits into
developfrom
chore/junk-cleanup-2026-10-04
Oct 5, 2026
Merged

jonit-dev merged 10 commits into
developfrom
chore/junk-cleanup-2026-10-04

Conversation

@jonit-dev

@jonit-dev jonit-dev commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Removes verified unused engine declarations, unreachable template/example source, uncompiled native samples, and unreferenced repository artifacts from the 2026-10-04 junk audit. Every finding has a recorded disposition; 70 cleanup changes remain. Public exports, live compatibility surfaces, diagnostic names, and owner-decision items stay intact.

Opus 5.5 at high effort reviewed the complete deletion diff. The physics allocation benchmark still supports PRD-191 and is restored. The rain noise verifier and distinct August audit are retained conservatively for their proof/history value. All three match develop byte-for-byte; the restored benchmark ran successfully and the rain scaffold hash was measured again.

PRD-495 is complete: 7/7 phase boxes and 6/6 acceptance criteria. The last two commits only close/archive that record; source code is unchanged from the qualified head.

Validation:

  • Full-scope CI run 37255318117 succeeded at source head 346afd0: 44 jobs passed, 3 conditional native legs skipped by policy. Typecheck, lint, package contracts, native package tests, all four unit shards, and ci-required passed.
  • Core has zero unused locals/parameters; 66 scaffold tests, conventions, budgets, and documentation checks passed.
  • The source-qualified run passed the GPU-world shard that had previously timed out. No assertion or timeout was weakened. Earlier local full suites remain recorded as timing failures, not claimed green.

The broader manual audit exposed a pre-existing Windows warmup/mailbox defect. Repository policy selects reduced native coverage for develop PRs and their merge queue; all selected Linux/Android and complete unit/package gates remain required. Windows/macOS desktop core and iOS are skipped under that policy. The broader audit failure stays recorded.

The final documentation head must pass its fresh checks and the required merge queue before landing.

The audit's input stays untracked; this commit is the dispositions and the
deletions. 73 changes whose only tracked references were their own definition
or a comment that contradicted the code, across six areas: compiler-proven
unused declarations and now-unread parameters in packages/core, two dead
playtest/asset helpers plus a dead bench script, the never-packaged Android
sample JS and the orphan Metal shader (plus three module-only `export`
keywords), twenty zero-reader template helpers, nine example leftovers, and the
docs/scripts surface (two unreferenced PDFs, a duplicate audit, two unreachable
analysis scripts, five dead exports, two stale round-ledger pointers).

Restored on review: the `QuarryScene` class-expression name in
examples/quarry. `Constructor.name` is what scene diagnostics print, so the name
is diagnostic surface and dropping one identifier cleaned up nothing.

Kept, with the reason recorded in the PRD rather than a deletion: the
`stamp:template-loading` entry point (its wrapped function has no other caller,
so it is the only way to apply a canonical `loading.ts` change to the tracked
templates — the role its contract-tested sibling `stamp:template-render.ts`
plays), `core/__tests__/seed.spec.ts` (the only proof that a *different* seed
diverges), the two playtest compat facades, the published `assets` barrel
re-exports, and every owner-decision item.

Gates, each with its real exit code:

- `pnpm typecheck` exit 0. `pnpm lint` exit 0, 1074 warnings.
- `packages/core` `tsc --noEmit --noUnusedLocals --noUnusedParameters` exit 0,
  empty output (baseline of 24 is the audit input's own measurement).
- `pnpm --filter @threenative/runtime-native test` exit 0 — 134 files / 1548
  tests passed, 62 skipped; Rust physics parity 21 + 2; publint clean. It needs a
  compiled host first (`pnpm native:build` exit 0); every pre-build failure was
  an `is not built` assertion on a missing executable, and none named a file this
  change deletes.
- The four scaffolder specs the restamp touches: 4 files / 93 tests, exit 0.
- `pnpm check:docs` exit 0 — 2324 links across 1217 Markdown files.
  `scripts/__tests__` 143 files / 1944 tests, exit 0.
- Generated-surface drift: `generate-ctx-surface-table --check`,
  `generate-capability-reference --check` and `check-capability-docs --census`
  all exit 0, so no capability manifest or reference moves.
- `pnpm --filter abyss-framework build` exit 0 and `git check-ignore` reports
  `.gitignore:8:*.build-report.json`, so the build report no longer dirties the
  tree; `git status --porcelain examples/abyss-framework` after that build lists
  only this commit's deletions.

`pnpm test` is red and its PRD box stays open: the package-test phase is wholly
green, and the unit phase is 7932 passed / 13 skipped / 5 failed, all five
`Test timed out` in `template-assets-compile-1`, `template-assets-compile-2`
and `template.spec.ts`. Those three specs each scaffold, install and build every
template, and this box is shared with other agents' worktrees — load average
55–70 on 24 cores during the run. The same four files are green run alone
(4 files / 93 tests, exit 0, 205s), so nothing here is a behavioural failure;
the PRD records the exact cause and stays in `active/` until one clean
`pnpm test` is recorded.
… wall-clock

The literal `pnpm test` full board ran to completion with the shipped serial
package walk and a four-core pin (1424s): docs, build and package-test green,
unit phase 4 failed / 7933 passed / 13 skipped. All four failures are
`Test timed out` — the three heaviest scaffolder specs (60s, 60s, 180s) and
one native desktop screenshot wait that captured no host output — on a box at
load 27-44 across 24 cores. No behavioural assertion failed, and the same four
files alone on the four idlest cores are green: 4 files / 117 tests, exit 0,
227s.

That is the third run to fail on wall-clock alone, so it is not rolled a fourth
time: at launch no core was below 59% busy, and another 24-minute run would
only add contention to the box it is trying to measure. The PRD says so, names
the pacing that was tried, and leaves AC-2 and the phase-2 gate box unticked
because the gate as written ran red.

No tracked runner, config, timeout or test changed; `TN_SUITE_PACKAGE_CONCURRENCY`
and `taskset` are execution-time inputs the suite already reads. The audit input
`junk-audit-2026-10-04.md` stays untracked. PRD stays in
`docs/PRDs/tech-debt-code-quality/` — the remaining work is re-runnable, not
blocked-only, so it is not a `done/` or `BLOCKED/` move.
…eep moved

The normaliseToMetres and attachToBone cells in the PRD-289 applicability
table still named Enemy.ts:863 and :869, which this lane's dead-comment
deletion moved 15 lines up to :848 and :854. TN_TEMPLATE_CONVENTIONS_FAILED
on the budgets job; it is green now. The shooter scaffold hash measured
through createProject already matched its pin, so it stays as it is.
Plain merge, no rebase: the merge queue needs a current base. #416 is one
commit, 1,087 files; two of them carried cleanup edits too, so one conflict.

Resolution of packages/create-threenative/__tests__/scaffold.spec.ts:
PRD_201_PARENT_SCAFFOLD_HASHES is re-measured on the merged tree through
createProject, not taken from either side. Ten templates moved (the ten this
sweep edited, which #416 also touched); platformer, snow and starter keep
#416's values because neither side changed them. scaffold.spec.ts 66 tests
exit 0.

templates/puzzle/src/scenes/Play.ts auto-merged clean and was audited by
diff: this lane's `unwatch` deletion and #416's material-lighting wiring are
both present. All 14 of this lane's whole-file deletions are gone from the
merged tree and every file #416 added is present.

Also here: the native census table regenerated by `pnpm census` (android/
3,187 -> 1,814 is the deleted sample JS and orphan Metal shader), and the
PRD-495 record of the merge. `pnpm budgets` needed a rebuilt
packages/playtest/dist first — #416's collectRegionalTone was missing from a
stale artefact, not from merged source.

Verified on the merged tree: pnpm typecheck exit 0; pnpm lint exit 0 (0
errors); pnpm sync:agents --check exit 0; check-template-conventions green;
pnpm check:docs exit 0 (2,393 links); scripts lane 8 files / 260 tests exit
0; pnpm budgets exit 0. AC-2 stays unticked — no fresh full board over the
merged tree yet. The Windows desktop core leg stays red and is not waived.
@jonit-dev jonit-dev added the prd:75% PRD phases in, acceptance open label Oct 5, 2026
@jonit-dev
jonit-dev marked this pull request as ready for review October 5, 2026 01:34
…ere not junk

An independent `claude-opus-5-5 --effort high` review checked every removal for
readers and found three whose "dead" premise was false, so they come back
byte-identical to origin/develop (64aed30):

- packages/physics/scripts/bench-allocations.ts — open PRD-191 names it as its
  Phase 3 EDIT target and verification step 2. Its "NOT STARTED" status is
  stale: 91e46d3 did that work and its record shows the bench at exit 0.
- templates/rain/tools/verify-noise-volume.mjs — the owner's manual
  storm-volume proof. Nothing in the repo runs it because it needs an external
  tempest.html; PRD-473 and the release-readiness note cite it as history.
- plans/technical-debt-audit-2026-08-20.md — a distinct audit of d75f464, not
  a duplicate, with P0-2 and P0-4 still tracked by PRD-177/184 and PRD-180.

The rain hash is re-measured, not guessed: the byte-stability assertion printed
the generated tree's actual value. Executed changes drop 73 -> 70 (B 5->4,
D 20->19, E 11->10) and each restoration is now a Retained row with its reason.

Also corrects three claims the review disproved: metal_rt.mm embeds only
raytracingKernel, VISIBILITY_INTENT is still read in rain/src/game.ts, and the
hash comments no longer claim one declaration per template. The Windows bullet
now names the warmup advance(60) before the tolerant startup wait as the fault
and withdraws the self-imposed merge gate — that leg needs native_tier 'full'
and a develop pull request classifies 'reduced'
(scripts/ci-change-scope.mjs:610-618), verified against this pull request. The
broader full-platform audit stays recorded as red, and AC-2 stays unticked.
…D as done

CI run 37255318117 at head 346afd0 reached terminal success with typecheck, lint,
test, test-native, all four test-unit shards and ci-required green, so AC-2 and its
Phase 2 workspace-gate box now have their proof. The literal local `pnpm test` never
went green and is still recorded as red on wall-clock alone; the tick rests on the
hosted run, which covers the same four run-test-suite phases over the same package
scope. The Windows desktop-core leg stays red history and skipped here under the
reduced native_tier, not waived.

Filed to docs/PRDs/done/; the PRD-208 link is re-pointed.
@jonit-dev jonit-dev added prd:100% and removed prd:75% PRD phases in, acceptance open labels Oct 5, 2026
@jonit-dev
jonit-dev enabled auto-merge October 5, 2026 03:28
@jonit-dev
jonit-dev disabled auto-merge October 5, 2026 04:08
@jonit-dev
jonit-dev enabled auto-merge October 5, 2026 04:16
@jonit-dev
jonit-dev disabled auto-merge October 5, 2026 04:24
@jonit-dev
jonit-dev merged commit f2d5ad7 into develop Oct 5, 2026
37 of 68 checks passed
jonit-dev added a commit that referenced this pull request Oct 8, 2026
Origin filed PRD-495 for the 2026-10-04 junk audit (#439) while the local
branch gave 495 to the compile-walk PRD. The compile walk takes 540, the next
free number, and every link follows.
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