Repository navigation
lead-take folds into a leaf track; sounds/ empties - #113
Conversation
|
Starting review of acc96ae. |
minjudd
left a comment
There was a problem hiding this comment.
Reviewed acc96ae. The interesting claim here is the one about the cache, and it is checkable without a daemon — so I checked it rather than reading the reasoning.
The conversion is the same action either side of the fold. With the same 24 kHz take under both trees:
main //songs/creek/convert:lead-take-48000 input //songs/creek/sound:lead-take 6628fb647d2f action 90b940ba1397
head //songs/creek/convert:gen-lead-take-48000 input //songs/creek/gen:lead-take 6628fb647d2f action 90b940ba1397
The node's name changed and its key did not, which is the whole of "the name is wiring" made falsifiable. The resample never re-runs.
The plan moves exactly twice. Across every track in both songs, the difference is a new leaf stem — creek/lead-take, one clip, start 0, no duration, a clean pass-through — and lead-vocal's input going from the conversion to the leaf. lead-vocal's own parameters string is unchanged, so it re-keys through its input hash alone, which is amended decision 6 for the fourth time. That its output is byte-identical, and that main therefore stays cached, is the daemon half and stays yours.
The migration works the way the Testing block says. A pre-fold takes file gets these takes attach to the gen node "lead-take" now — rename sound: to gen: (nested-tracks.md §18), and after that one-line edit check is ok. deps runs in the straight line claimed. field choose lead-take --song creek --variant 1 reports //songs/creek/gen:lead-take now plays it; every placement follows and leaves the track file's md5 identical — the constraint the whole two-file split exists for, holding at the last fold.
bloom has no sounds/ directory in either song, and grep -rn 'sound:' examples/ finds nothing — a shade better than the body's "only history in the README's prose" (the README says the word "sound" four times, never as a field). No src/ or native/ change, so the suite is #112's unchanged: 581 tests, 472 pass, 42 skip, 67 fail, all field-audiod is not built. pnpm typecheck clean.
One finding, in the plan's status paragraph.
"One sound remains" survived an edit whose content says both are gone; now it reads "No sound remains". Found by minjudd on #113.
|
Starting review of 8ef1f8e. |
minjudd
left a comment
There was a problem hiding this comment.
Approving 8ef1f8e. One word, and the paragraph now says what it reports: "No sound remains: vocal-48k retired with multi-rate step 3 …, and lead-take has folded … bloom's sounds/ directories are gone." A reader learns where chunk 6 is from the first clause instead of having to reconcile it with the rest.
The diff against the head I reviewed is that single line, so everything from acc96ae carries without re-running: the conversion keeping action 90b940ba1397 across the fold while its node name changes, the plan moving exactly twice, the takes migration diagnostic, choose repointing the gen node with the track file's md5 unchanged, no sounds/ and no sound: anywhere in examples/, and the suite unchanged at 581 because no code moved.
The byte-identity of lead-vocal's re-render and main staying cached remain yours, verified in your environment — this machine has no daemon.
No findings.
The chunk 6 finale's second half (nested-tracks.md §18, decision 12). #113 left bloom with no `sounds/` directory and nothing exercising the machinery; this removes it. The `sound:` entry field, the sound schema union (effect sounds, the supercollider sound form, the generative recipe form and its tombstones), the `sounds/` loader and `song.sounds`, the graph's declared-sound rules, the eq/limit/reverb generators, the sound-side generate/choose paths, and the namespace's sounds scan are gone. Three rules remain in the engine — `supercollider`, `stem`, `resample` — every spec synthesized from the model; the effect *contracts* live on as inserts, unchanged (schema/effects.ts is still the wire format, and the daemon is untouched). Every departing spelling forwards rather than dying with a grammar error. A surviving `sounds/` directory gets one diagnostic with the fold instructions — mixes/-grade, one message for the directory because the fix is the same fold for every file in it. A `sound:` entry is a tombstone naming where its target went. The `sound:` and `sounds:` label packages forward to `track:` (§18 decision 5 — "the sound: label still forwards to track: at the finale"), and `targets:` chains straight there rather than to a second dead end, the mistake it was already fixed for once. A pre-fold takes file keeps its `sound:`→`gen:` rename diagnostic — the schema deliberately still admits the old key so the loader can say the move instead of "unrecognized key". `field generate` and `field choose` speak entries only now. Filling targets a generative entry by its gen node name, and a brand-new request scaffolds a leaf track carrying the entry — the shape every request lives in — validated through the track schema but written from the raw object, so the scaffold has no defaulted placement noise and is byte-for-byte the file a person would write. The create path pre-flights everything it would mint: the track file it writes, the gen node name, the bare name, an existing takes directory, and the audition labels. The `pkg: 'sound' | 'gen'` distinction disappeared from both results and the CLI's hints along with the second kind. The proof that this is pure retirement: bloom's graph came through untouched. `field check` is ok and a full `field build //songs/...` after the change is entirely cache hits — zero re-renders, because no surviving node's key contains anything that left. The forwarding is exercised for real: `field build //songs/creek/sound:lead-take` answers "sounds folded into tracks: try //songs/creek/track:lead-take", and the plural forwards the same way. Tests moved with the machinery rather than shrinking around it: the effect-property oracle translates its sound-shaped fixtures into wrapper tracks with one insert and still measures every property from C++ output through the build rules; effects chains became wrapper tracks placing wrapper tracks; build/watch/export/stem/model fixtures became wrapper tracks or generative/supercollider leaves; generate/choose tests assert the scaffold shape and the takes file instead of a recipe. Two historical tests retired with the transition they proved (the fold-is-a-cache-hit pair), each replaced by the invariant that survives it — a generator render is keyed by parameters, never by its name, so a rename is a cache hit under the new label. Docs follow the behaviour: project-model.md and build-graph.md now describe the track-only model (the layout tree loses `sounds/`, the entry-kind list loses its transitional fourth kind, "Sound types" became "Node types"); nested-tracks.md's status is complete-except-deferred-sends with the finale recorded; now.md keeps both lines in the neighbours' stays-until-exercised shape. ## Testing From the repo root, `pnpm build && pnpm typecheck && pnpm test` — 579 tests pass (net −2 from #113's 581: the two fold-transition tests retired with the transition, and the migrated suites kept their assertion counts). No native change, so no `pnpm build:native` needed. By hand, in `examples/bloom` (needs `pnpm build` so the `field` on your PATH is current; spawns an `audiod` daemon — `field quit` stops it): ``` field check field build //songs/... field build //songs/creek/sound:lead-take ``` `check` says ok, and the full build prints nothing but `source` and `cached` lines — zero re-renders is the whole claim: the retirement moved no graph node and no action key, and a single `built` line here would mean it did. The third command fails usefully: `pattern matched no labels: //songs/creek/sound:lead-take (sounds folded into tracks: try //songs/creek/track:lead-take)` — before this PR that spelling resolved. What a project mid-migration sees: put any YAML file in `songs/creek/sounds/` and `field check` answers with the fold instructions for the directory; write `sound: lead-take` in a track entry and the schema forwards it to the `track:` spelling. `field generate`/`choose` still work end to end against the entry model (the stub-worker suites in `src/commands/generate.test.ts` and `choose.test.ts` cover the scaffold, fill, and repoint paths). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Large schema and graph refactor across build, generate, and labels, but behavior is intended to be retirement-only with label forwarding; risk is mainly migration edge cases and missed references to removed sound paths. > > **Overview** > Finishes nested-tracks chunk 6 by **retiring `sounds/` and the sound machinery** so every buildable definition lives on a track: `generative:` / `supercollider:` entries, `inserts:` for effects, and `//songs/.../track:` labels. The graph keeps only **`supercollider`**, **`stem`**, and **`resample`** generators; eq/limit/reverb **generator modules** are removed while insert contracts and daemon rendering stay the same. > > **Migration instead of hard failures:** surviving `sounds/` directories get fold diagnostics; `sound:` entries and `sound:` / `sounds:` / `targets:` labels forward to `track:` with hints; stale takes files still get `sound:` → `gen:` guidance. > > **CLI:** `field generate` fills a gen node by name or **scaffolds a leaf track** for a new request; `field choose` is gen-only (no `pkg: sound | gen`). Help text and examples use `track:` / `gen:` labels. > > **Tests and docs** follow the track-only model (wrapper tracks for effect chains, updated bloom build expectation: cache hits, no re-renders). Fold-specific tests are replaced by the invariant that generator renders key on parameters, not node names. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit bf773f2. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
nested-tracks is Active — chunk 4 is revived by #123 and the soak holds either way; Shipped was the one indefensible value. The three stale prose lines are updated to what actually happened (voice generation through #64/#65 and the #113 fold, effects through #14/#15 with the §6 executor move, musical time through #24), so the keyword and the prose agree on day one. The README claims adoption, not sharing, while agent-config#15 is still open.
The last sound folds (nested-tracks.md §18 step 3, the shape still-water-keys set):
lead-takeis now a leaf track whose one input is the generative request, andlead-vocalplacestrack: lead-takeat bars 5 and 9 where its clips saidsound: lead-take. The gen node keeps the name — the entry carries no id, so the node is the owning track's name — which is whyaudio/lead-take/never moves and the takes file only flips its attachment key. The 24 kHz take converts at the leaf's own edge (multi-rate.md decision 4), and what the old sound indirection was for survives the fold:field choose lead-takerepoints the gen node and both placements follow, with the track files untouched.The fold is byte-identical:
lead-vocalre-renders (its wiring changed from the conversion ref to the track ref) to exactly the bytes it produced before the fold —cmpclean against the pre-fold artifact — somainnever re-keys. The conversion itself was not even re-run:convert:gen-lead-take-48000is an action-cache hit fromconvert:lead-take-48000's render, because the node name is wiring and the key never sees it. A/B take flipping stays fully cached in both directions.With that, bloom has no
sounds/directory left andrg 'sound:' examples/finds only history in the README's prose. What remains of chunk 6 — recorded in the plan's status — is retiring the machinery bloom no longer exercises: thesound:entry field, thesound:label and takes key, and thesounds/loader, behind the migration diagnostics the format owes departing spellings. That is the next PR, and it is deliberately not this one: this diff is the example moving, and the retirement diff is schema surgery that deserves its own review.Testing
One local migration first: if you have generated takes for
lead-take,field checkwill saysongs/creek/audio/lead-take/variants.yaml: these takes attach to the gen node "lead-take" now — rename sound: to gen: (nested-tracks.md §18)— a one-line edit to that git-ignored file, and the diagnostic tells you exactly it.Then, in
examples/bloom(needspnpm buildso thefieldon your PATH is current; spawns anaudioddaemon —field quitstops it):checksays ok; the deps run in a straight linegen:lead-take → convert:gen-lead-take-48000 → track:lead-take → track:lead-vocal; the first build re-renderslead-takeandlead-vocal(new labels, converted content unchanged), and a followingfield build //songs/...showsmaincached — the fold moved no bytes, which is the claim that would fail loudest if the leaf stem were not a clean pass-through. The choose round-trip re-renders on the way to variant 2 and is entirelycachedon the way back to 3, andgit statusstays clean throughout — neither command touches a tracked file. 581 tests pass unchanged from #112; the fold adds none because it changes no code, which is itself the point: the machinery landed in #105–#112, and this PR is bloom catching up to it.Note
Low Risk
Example and documentation only; no schema or CLI changes in this diff, so production risk is limited to readers following outdated
sound:paths in local clones.Overview
Moves creek’s last sound into the nested-tracks model:
lead-takeis now a leaf track (tracks/lead-take.yaml) whose sole input is agenerative:block (text, delivery knobs), andsounds/lead-take.yamlis removed so bloom has nosounds/left.lead-vocalwires through the track, not a sound: both verse and build placements usetrack: lead-takeinstead ofsound: lead-take. The 24 kHz take still resamples at the leaf edge to 48 kHz;field choose lead-takerepoints thegen:node so both placements follow without touching tracked YAML.Docs and the bloom README are aligned with
gen:labels, track-based placements, and chunk 6 status (sound machinery retirement deferred to a follow-up PR). No application code changes — behavior was already in prior nested-tracks / multi-rate work; this diff is the example catching up.Reviewed by Cursor Bugbot for commit acc96ae. Configure here.