Repository navigation
Retire the migration layer and the residue the folds left - #132
Conversation
Neither op has had a producer since mixes/ retired and the standalone effect rules folded into stems: mix was tombstoned as kept-for-the-wire, effects was dead without even a tombstone. Both leave both sides of the render-plan boundary — types, validators, dispatch, renderMix, sumStems, dsp::Fader — and RENDER_PLAN_VERSION moves 7 → 8 so a stale binary refuses loudly. ChainPresence goes with them: with one caller the enum was a bool spelled long. The DSP is untouched, which the unchanged stem golden proves. The full-chain golden is re-cut on a stem plan (pan, loop fold, all three effects in one render), and every insert-validation test that rode an effects plan now rides a stem.
Field has one user and every project is migrated, so the machinery for telling old layouts where their contents went serves nobody: the RETIRED_* tombstone keys, the legacy-file rows, the sounds/ and mixes/ directory diagnostics, the retired package hints, and the variants sound: arm all go. Strict schemas still refuse every retired key — with a plain Unrecognized key now — and the history stays in the plans, where it was already recorded, instead of being re-told in code comments. The takes/ machinery goes the same way: the schema, the loader that walked it on every check, and the field status count all enforced a layout decided against on 2026-08-10 (project-model.md "Takes"). mintId/randomSuffix leave ids.ts — nothing ever minted an id, and the doc's identity tier now says entry ids are author-written. sounds.ts becomes generative.ts, its parse-less SuperCollider zod object collapses to the interface generators/types.ts actually consumes, and single-input.ts folds into its one consumer. entryName is now one function, exported from cables.ts and imported by validate, ending the drifted reproduction; the two fileBySource constructions now name each other, with the real merge left for a focused change.
|
Starting review of bcf6300. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bcf63009a3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
project-core.md §3 decision 3 still required machine-minted entry ids, which the mintId removal quietly contradicted — the record now carries a dated amendment: the spelling stays the convention, the minter returns with its first caller. And local-time.test.ts's take-timing test survived the takes-loader removal by asserting an empty diagnostic list over a file nothing reads — green forever, guarding nothing — so it goes; the timing rule it pinned returns with the recording representation.
minjudd
left a comment
There was a problem hiding this comment.
Reviewed d4eec18. (d4eec18 landed as I was submitting on bcf6300; GitHub refused the stale review with a 422, so nothing was published against the old SHA — the delta is one doc paragraph and one deleted test, and everything below was re-run here.) 968 deletions is the diff where something live leaves with the dead, so I built the daemon and ran the falsification tests the description names rather than reading the removals.
No retired key is silently accepted — the body's own test, one project per spelling:
REFUSED track: sound: Unrecognized key: "sound" at inputs.0
REFUSED track: type: midi Unrecognized key: "type"
REFUSED track: clips: Unrecognized key: "clips"
REFUSED entry: position: Unrecognized key: "position" at inputs.0
REFUSED entry: source: Unrecognized key: "source" at inputs.0
REFUSED track: gain_db: Unrecognized key: "gain_db"
REFUSED track: pan: Unrecognized key: "pan"
Every one still fails the gate. The message is worse and the file is still refused, which is the trade the description makes explicitly.
The version guard works, and I tested the direction that matters. renderPlanVersion moves to 8 in render.cpp alongside the TypeScript constant, and the check is a plain != at render.cpp:247. Feeding a v7 plan to the binary I built from this head:
field-audiod: render failed: …/p7.json: render plan version 7 but this field-audiod speaks 8
— rebuild the daemon (pnpm build:native)
and a v8 plan renders. op: "mix" is refused by name (plan.op: unknown render op "mix") rather than falling through.
One thing worth recording since I have been borrowing the working checkout's binary through several reviews: it is now built from this branch and speaks 8, which is why pointing FIELD_AUDIOD at it makes the render tests pass rather than fail. The guard is also what makes that borrowing safe in retrospect — a version mismatch is loud, so no render I reported on an earlier PR could have come from a mismatched binary.
The golden accounting is exactly what the description claims, and I checked hash by hash. Two of four survive byte-identical — the stem render (ed468951…) and the normalize (df49c48…) — which is the DSP-untouched proof. Of the two that go, f9fbcb23… belonged to renders the same bytes on every platform on an op: 'effects' plan and reappears as a90dc4b0… on the same test now running op: 'stem'; 5db5d230… belonged to renders a mix to the same bytes on every platform, which leaves with the op it tested. No golden disappeared without its subject.
Nothing dangles. sounds.js, single-input, mintId, randomSuffix, take.js, takeSchema, sumStems, ChainPresence, renderMix and dsp::Fader have zero references left in src/ or native/. The native build is clean, pnpm typecheck is clean, and the suite is 39 files, 623 passed at this head — 624 at bcf6300, matching the description, minus the vacuous take test dropped here — and green rather than the 68-failure shape I have been reporting all session, because for once the daemon exists.
The consolidations do not change behaviour. The surviving entryName differs from validate's copy in one term — main's included entry.sound, which the schema now makes unreachable — so no legal file's diagnostic changes. Requiring gen: on a variants file breaks nothing that exists: both shipped variants.yaml files in bloom carry it. And field status drops the takes count, as claimed.
End to end in bloom, with the v8 daemon: field check → ok, both songs build, field explain creek/track:space still prints both cable lines with their derived arrivals, and field arrangement tall-grass is unchanged.
One observation, not a finding, because the description decides it on purpose: leftover mixes/, sounds/, takes/, targets.yaml, mix.yaml and arrangement.yaml are now silently ignored (ok=true, zero diagnostics). For the five migration artifacts that is plainly right. arrangement.yaml is the one I would keep an eye on, because it is the one a person could still create today out of a wrong assumption rather than an old layout — the guidance survives in project-model.md's "There is no arrangement.yaml", so it is documented rather than enforced, which is a defensible place to land.
The two answers in this head are both right, and both are things I had passed. project-core.md §3 decision 3 did require machine-minted entry ids ("Machines mint it → … slug-plus-short-random for clips"), and the mintId removal contradicted it silently — I checked that nothing in src/ still called the minter and never checked whether a (DECIDED) record still promised it. The amendment is the right shape: dated, appended, stating what stands and what returns. And the dropped local-time.test.ts case really was vacuous once the loader went — it wrote a manifest under songs/creek/takes/slow/ and then asserted diags.filter(m => m.includes('disagrees with tempo map')) was empty, which nothing could have made non-empty. I ran that suite and reported 624 green without noticing one of them guarded nothing.
One finding inline, in the amendment itself.
"Held it for a year" was off by fifty-one weeks in a record written to be believed without re-derivation. The claim that does the work — the minter never had a caller in its life — is what the history supports, and it is now the whole claim.
|
Starting review of 1ba8b61. |
minjudd
left a comment
There was a problem hiding this comment.
Approving 1ba8b61. The amendment now reads "it never had a caller in its life", which keeps the load-bearing half and drops the invented duration — and it is the stronger claim of the two, since never-called is categorical where a span is just a number someone has to trust. git log -S'mintId(' still returns only the commit that added it and the one that removed it, so the sentence is exactly true.
Gates at this head: pnpm typecheck clean, 39 files / 623 tests all passing against the daemon built from this branch, and CI's linux job green on this SHA.
Everything I verified at d4eec18 stands — the delta is four lines of prose in one paragraph. For the record, that verification was: every retired key still refused rather than silently accepted, the plan-version guard firing in the direction I could test with two real binaries, the golden accounting reconciled hash by hash (stem and normalize byte-identical, full-chain re-cut onto a stem, the mix golden leaving with its op), no dangling references to any removed symbol, and bloom building and explaining end to end through the v8 path.
No findings.
Field has one user and every project is migrated, so the machinery for telling old layouts where their contents went now serves nobody — and the pre-realtime survey found it was most of what stood between the current code and a clean start on recording. This PR removes the migration layer, the residue three retirements left behind, and the two render ops nothing produces. History stays in the plans, where it was already recorded; the code stops re-telling it.
What goes, model side: the
RETIRED_*tombstone keys in the track schema (sound:,type:,clips:,position:,source:,gain_db:/pan:), the legacy-file diagnostics (targets.yaml,generation/,mix.yaml,arrangement.yaml), thesounds/andmixes/directory diagnostics, the retired package hints (mix:,sounds:,targets:→track:), and the variants file's pre-foldsound:arm —gen:is simply required now. Strict schemas still refuse every retired key, with a plain "Unrecognized key". Thetakes/machinery goes the same way: the schema, the loader that walked it on every check, and thefield statuscount were all enforcing a layout decided against on 2026-08-10 (project-model.md "Takes"); itsrecording:vocabulary (device, latency, buffer size) is already recorded there for the recording plan to inherit.mintId/randomSuffixleaveids.ts— nothing ever minted an id, and the doc's identity tier now says entry ids are author-written.What goes, daemon side:
op: "mix"andop: "effects"leave both sides of the render-plan boundary — types, validators, dispatch,renderMix,sumStems,dsp::Fader,ChainPresence— andRENDER_PLAN_VERSIONmoves 7 → 8 so a stale binary refuses loudly. The DSP is untouched, which the unchanged stem golden proves; the full-chain golden is re-cut on a stem plan (pan, loop fold, all three effects in one render), and every insert-validation test that rode an effects plan now rides a stem.Smaller consolidations riding along:
sounds.tsbecomesgenerative.tsand its parse-less SuperCollider zod object collapses to the interfacegenerators/types.tsactually consumes;single-input.tsfolds into its one consumer;entryNameis one function now (exported fromcables.ts, imported by validate), ending a reproduction that had already drifted; the twofileBySourceconstructions now name each other, with the real merge deliberately left for a focused change; and the stale headers that still describedtargets.ts,sound:labels, and the pluggable-mixer future are rewritten to the present tense.Testing
From the repo root:
pnpm install && pnpm build && pnpm build:native, thenpnpm test— 39 files, 624 passed (down from 638: the removed tests pinned the forwarding messages this PR deletes; the surviving behaviors — strict-schema refusal, takes-attachment refusal, chain validation — kept their tests, reworked onto current vehicles). The native rebuild matters: without it the render tests fail against a binary still speaking plan version 7.Then
cd examples/bloom && field check && field status && field build tall-grass && field play tall-grass— check says ok, status prints each song without a takes count (before this PR it printed "0 takes"), and the build renders/caches through the v8 stem path.What would show this wrong: a track file with
type: midiorclips:now draws "Unrecognized key" instead of the old guided message — deliberate, per the no-archaeology decision; if you see a silent acceptance of any retired key, that is a bug. The removed ops are refused by name: a hand-written plan withop: "mix"fails validation rather than rendering.Note
Medium Risk
Render plan v8 and removed ops will break hand-written or stale-daemon renders; intentional loss of guided migration errors means retired YAML keys must fail loudly via strict schema, not silently.
Overview
Removes the post-migration tombstones and forwarding that used to guide old YAML layouts (
sound:,clips:,mixes/,sounds/, legacy files, package hints). Strict schemas now reject those keys with a plain Unrecognized key instead of migration messages.Daemon render plans drop
op: "effects"andop: "mix"end-to-end (sumStems,Fader,ChainPresence, validators, dispatch).RENDER_PLAN_VERSIONbumps 7 → 8 so an old binary fails loudly. Insert-chain goldens and validation tests move ontostemplans; the full-chain golden is re-cut on a stem with pan, loop fold, and all three effects.Model cleanup:
takes/loading andtakeschema removed;gen:is required on variants files (nosound:arm).mintId/randomSuffixremoved; docs say entryid:slugs are author-written.sounds.ts→generative.ts; SuperCollider typing consolidates ingenerators/types.ts;single-input.tsinlined into resample;entryNameshared fromcables.ts.CLI:
field statusno longer prints a takes count per song.Reviewed by Cursor Bugbot for commit bcf6300. Configure here.