You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tracking issue for the full adversarial codebase audit of 2026-07-06. Full report with system map, per-finding scenarios, design tensions, and open questions: docs/audits/codebase-audit-2026-07-06.md (in-repo).
97 findings — 7 Critical · 23 High · 38 Medium · 29 Low. All Critical/High findings are filed as the 20 issues below (clustered by fix unit). The remaining Medium/Low findings are tracked in the checklist here rather than as individual issues.
Remaining Medium findings (not individually filed)
C31 [engine] update() mutates fixedDeltaTime as a substep channel, no try/finally — one callback exception permanently corrupts the timestep (elastica.ts:320-383)
C32 [engine] Static reset assigns cached position array by reference — in-place mutation corrupts the static cache (elastica.ts:335-338)
C33 [engine] Rigid borders use unrotated half-extents — rotated OBB corners clip through walls (borders.ts:39-65)
C34 [engine] Borders perfectly elastic regardless of restitutions[i], no angular response (borders.ts:39-65)
C35 [engine] collisions: false freezes all rotation — integrateAngularMotion gated on collisions (elastica.ts:353-364)
C39 [engine] collisionsList overwritten per substep — consumers only see the last substep (elastica.ts:356, 367)
C40 [engine] cornersPool.release never called — pool drains after 32 acquisitions; SAT recomputes corners 4× (pool.ts:61-94; obb.ts:41, 81)
C41 [engine] Engine reads element.dataset.state in the core — DOM contract in the physics layer; canvas must bypass via array pokes (elastica.ts:140)
C43 [engine] No tunneling protection (no swept tests/CCD), undocumented (collision/*)
C46 [react] Engine constructed in render, discarded, rebuilt in effect; ×3 under StrictMode (dom-elastica.tsx:137, 151-157)
C48 [react] Presets place static elements in document coords in a container-space sim; canvas statics pile at center (presets.ts:66-73, 100-111)
C49 [react] --er/--eds CSS vars only written when non-default — stick at stale values (dom/renderer.ts:50-62)
C50 [react] Removing the last CanvasBox leaves frozen pixels — early return before clearRect (canvas-elastica.tsx:160)
C51 [react] Canvas path allocates ~5N objects/frame while sold as the 200+-elements performance mode (canvas-elastica.tsx:141-162)
C52 [react] No pause/play on CanvasElastica; no prefers-reduced-motion; no offscreen pause in either mode
C53 [react] Canvas pre-init block is dead code (el.element === null never true) (canvas-elastica.tsx:165-182)
C55 [react] InitialConditionParams/UpdateParams duplicated in presets.ts and types.ts — silent drift (presets.ts:5-45)
C56 [react] Two hash-grid debuggers, different geometry — DOM overlay is viewport-fixed, wrong unless full-screen (utils.tsx:31-58)
§6 of the audit report lists 20 open questions the code alone can't resolve. The ones that gate filed issues: Q1 resolver rewrite vs rename (#7), Q3 intended useOBB default (#18), Q4 are dynamic element lists in scope (#12/#13), Q9 real React support range (#15), Q10 hamo as dependency vs peer (#11), Q11 per-element physics props in DOM mode — planned API or doc fiction (#18), Q14/Q15 naming + license (#23), Q19 website standalone or not (#22).
Tracking issue for the full adversarial codebase audit of 2026-07-06. Full report with system map, per-finding scenarios, design tensions, and open questions:
docs/audits/codebase-audit-2026-07-06.md(in-repo).97 findings — 7 Critical · 23 High · 38 Medium · 29 Low. All Critical/High findings are filed as the 20 issues below (clustered by fix unit). The remaining Medium/Low findings are tracked in the checklist here rather than as individual issues.
Filed issues
Engine (packages/engine)
React (packages/react)
'use client'stripped from published bundle (High)elasticaand rebuilds its value every render #17 — [C19] Canvas context null-assertselastica, identity churn (High)Docs
Infra / repo
website/.github/, never read (Critical)Suggested order
elasticaand rebuilds its value every render #17 — consider the body-handle API from [C5][C42] react/engine: mounting or unmounting a box corrupts the simulation — registration is never reconciled #12's design tension, which collapses most of them.Remaining Medium findings (not individually filed)
update()mutatesfixedDeltaTimeas a substep channel, no try/finally — one callback exception permanently corrupts the timestep (elastica.ts:320-383)restitutions[i], no angular response (borders.ts:39-65)collisions: falsefreezes all rotation —integrateAngularMotiongated on collisions (elastica.ts:353-364)collisionsListoverwritten per substep — consumers only see the last substep (elastica.ts:356, 367)cornersPool.releasenever called — pool drains after 32 acquisitions; SAT recomputes corners 4× (pool.ts:61-94; obb.ts:41, 81)element.dataset.statein the core — DOM contract in the physics layer; canvas must bypass via array pokes (elastica.ts:140)--er/--edsCSS vars only written when non-default — stick at stale values (dom/renderer.ts:50-62)clearRect(canvas-elastica.tsx:160)prefers-reduced-motion; no offscreen pause in either modeel.element === nullnever true) (canvas-elastica.tsx:165-182)InitialConditionParams/UpdateParamsduplicated in presets.ts and types.ts — silent drift (presets.ts:5-45)timeRef;useJavascriptEnablemisnamed, gates nothing, publicly exported (dom-elastica.tsx:92)Remaining Low findings (not individually filed)
hasBounced(i)increments and returns a count — name promises a boolean read (elastica.ts:218-222)hash/bucketsgetters return live internals and vanish under object spread (elastica.ts:41-47)(A<<16)|Bsilently collides above 65,535 bodies; undocumented at call sites (aabb.ts:239)ElementData.rect.left/toptyped but never read; zero-arg default callback yields all bodies at origin (types.ts:19-23)vectorPooldead code beside an "only used ones exported" comment (pool.ts:136)CollisionRecord.loop/inHash(structure long gone)initalConditionsPresetstypo is the only exported spelling (presets.ts:129)rightFlowdoesn't flow right;dvdScreenSaverOBB≡dvdScreenSaver;DragAndGravitycasing (presets.ts:179-232)DomElasticawhile the engine's default is theElasticaclass (index.tsx:62)will-change: transformon every physics element (dom/renderer.ts:16)dprread once, no matchMedia listener — stale after monitor moves (canvas-elastica.tsx:67)!rectinit guard can never trip — hamo's{}is truthy (dom-elastica.tsx:179)HashGrid/isEmptyArray/useJavascriptEnableexported publicly, documented nowhere (index.tsx:46)latest= 1.0.0-dev, no CHANGELOG/tags/releases; ESM-only entry untested against CJS consumershttps://localhost:3000; sitemap/OG URLs wrong without env var (app/layout.tsx:18)next/scriptwithout requiredid(app/layout.tsx:82) — PLAUSIBLE.tldr/cache/*tracked despite gitignore); stalewebsite/.cursor/rules/*Maintainer decisions needed
§6 of the audit report lists 20 open questions the code alone can't resolve. The ones that gate filed issues: Q1 resolver rewrite vs rename (#7), Q3 intended
useOBBdefault (#18), Q4 are dynamic element lists in scope (#12/#13), Q9 real React support range (#15), Q10 hamo as dependency vs peer (#11), Q11 per-element physics props in DOM mode — planned API or doc fiction (#18), Q14/Q15 naming + license (#23), Q19 website standalone or not (#22).