Split The code is public; the app answers only to the crew.
Three modules the README calls tested have no test file: `action`, `models` and `textures` #139
Sign in to join this conversation.
Split The code is public; the app answers only to the crew.
Give the three headless modules that have no test file one each, so the README's claim that everything but the last five is tested becomes true.
README.md(the Shape section) says of the client's modules: "Everything except the last five is headless and tested" — the last five beingrenderer,hud,input,audioandmain. Walking the tree says otherwise. Everysrc/*/.tswithout a sibling*.test.tstoday:audio.tshas an issue of its own (#80) andweights.tsis generated data. This issue is the three that are pure functions with no excuse, and the sentence that describes them.Done looks like:
action.test.ts.action.tsis the shipped policy's contract — its own comment says "the bins are part of the shipped policy's contract, like the observation" — and nothing checks it. Test the bin tables (length, order, the zero in the middle of each), and that decoding every head's index yields theInputthe weights were trained to mean: the extreme yaw bin turns 720 deg/s, the middle bin turns nothing, an out-of-range index is clamped rather than producingundefinedin anInput.models.test.ts. Every function returns aMeshwhose four attribute arrays agree in length, whose indices all point insideposition, and whose triangles wind one way.addBoxputs a box of a known size where it was asked to,levelMesh([])is empty rather than malformed, andmuzzle("nonsense")isnull.textures.test.ts.materialTextures()returns exactlyTEX_SIZE * TEX_SIZE * LAYERS * 4bytes, is deterministic (two calls are byte-identical), leaves no layer entirely black or entirely one value, and its alpha channel is what the renderer assumes. State what it costs to build — the module claims about a millisecond.audiois #80;weightsis generated;shardruns underpool.test.ts).Files:
src/client/action.test.ts,src/client/models.test.ts,src/client/textures.test.ts(all new),README.md.Risks: none to the running app; nothing here changes a line of shipping code. The trap is writing tests that restate the implementation — pin the contract (array lengths, determinism, bin meanings the weights depend on), not the arithmetic.
Crew: scout.