Repository navigation
One inputs list: track, audio, and sound entries - #102
Conversation
nested-tracks.md §18 step 1, the format alone: clips: and inputs: merge into one inputs: list whose entries name what they play by field — track:, audio:, or the transitional sound:, which exists exactly as long as sounds/ does so audio: never quietly accepts a name that renders. Placement fields are uniform across kinds, entries may carry ids (automation's handle, §18 decision 3), position: becomes at:, and type: retires — every track is audio, and midi returns as an entry kind when it is real. Old spellings get forwarding messages, mixes/-style. The planner needed almost nothing: it has sorted the two lists as one since placements existed, so the file format caught up with the plan. Every action key survives — drums stays 6cd170a1cbfe through the whole migration and both bloom songs rebuild fully cached. tall-grass's guitar was the one real type: midi track; it becomes an ordinary empty track that renders silence and nothing places.
|
Starting review of 229d2f4. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 229d2f4. Configure here.
minjudd
left a comment
There was a problem hiding this comment.
Approving 229d2f4. A flag day whose whole claim is that nothing moves, so I went at the claim rather than the diff.
The plans are identical, 12 of 13. Comparing explain's input: lists and parameters for every track in creek and tall-grass, origin/main against this head: byte-identical everywhere except tall-grass/guitar, which had no node at all on main and now has type: stem v1, parameters: {"clips":[]}. That is the ex-midi track becoming an empty audio one, which the body calls out as the single behaviour change. So no existing key can have moved, independently of the cached-build proof.
The structure survived the rewrite, seen from outside the planner. A clean git archive export of examples/bloom checks ok, and field arrangement creek prints the same five lines it printed before the format existed — 1.1.1 lead-vocal, pad, and the three phrase passes at 1, 5, 9. Different file format, same song.
The migration messages name the move. An old-format drums.yaml gets both, each written for the suffix: every track is audio — delete type:… at type and clips: merged into inputs: — move each clip there, renaming position: to at: and source: to audio:/sound:/track: by what it names… at clips.
The rules that keep the format honest all fire. Zero kinds and two kinds get the same sentence (an entry plays exactly one thing…), which is right — they are the same mistake from opposite sides. duplicate input id "dup-a1b2c". audio: kit-sc is refused by kind, not by existence: audio: names the sound "kit-sc" — a sound is a definition, not committed bytes; use sound:, which is the thing that keeps audio: from quietly reacquiring the ambiguity. The cycle walker speaks entries (phrase → drums → kit-punch → phrase) and self-placement keeps its own message.
The scaffolding path works end to end, which the flag day could easily have broken: field track create demo bass writes name: bass + inputs: [] and adds - track: bass / at: 0 to main, and check is ok.
pnpm typecheck clean; 509 tests, the 58 failures here all field-audiod is not built.
One thing I checked rather than assumed: sound: is a fourth spelling that §18's decision list does not contain, and it is documented where it has to be — project-model.md carries it, transitional nature and all, and that is the doc AGENTS.md requires to be current. §18 stays the point-in-time record, with the status line above it naming the three spellings that actually shipped.
The cached-build half of the gate — drums at 6cd170a1cbfe, both songs coming back entirely cached — is still yours, not mine: no daemon and no warm cache here.
No findings.
Bugbot finding on #102: expandLoop never copied pan onto repetitions — unreachable while only clips looped (clips had no pan), real once placement fields went uniform. A looping panned entry rendered centred and its key ignored pan edits. Repetitions now carry pan under the same omit-when-centred rule as the direct path, so a loop still hashes identically to its hand-tiled equivalent — which is the new test, proven failing first. bloom unaffected: its one loop is centred, drums stays 6cd170a1cbfe and creek rebuilds fully cached.
|
Starting review of f1ed61d. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 229d2f4849
ℹ️ 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".
minjudd
left a comment
There was a problem hiding this comment.
Approving f1ed61d. This is a real bug the format created and I did not catch — a looped entry silently rendered centred — and the fix is right in the way that matters: the loop's output now equals the hand-written tiling exactly, rather than merely carrying a pan.
Reproduced across the two heads. Giving creek's drums entry pan: -0.5 beside its existing loop:
229d2f4 {"start":0,...,"gain_db":0,"fade_in":0,"fade_out":0} ← no pan, twice
f1ed61d {"start":0,...,"gain_db":0,"pan":-0.5,"fade_in":0,"fade_out":0}
And the contract the test names holds against a real project, not just the fixture: hand-tiling the same thing as two 2-bar entries at bars 1 and 3, each panned, produces a parameters string byte-identical to the looped one. That is the strongest form of "expansion matches the hand-written equivalent", and it is what makes the fix a restoration rather than an addition.
Worth being precise about the blast radius, since it decides whether this needed to land before the merge: nothing in bloom pairs a loop with a pan, and all 13 tracks plan byte-identically to 229d2f4. So no key moves, nothing re-renders, and the bug was latent — which is exactly why it would have shipped. A pan that is silently dropped produces audio nobody can tell is wrong from the file, and check had nothing to say about it.
The omit-when-centred rule is preserved, so the fix cannot re-key a centred loop: pan is spread in only when non-zero, the same as the direct path.
pnpm typecheck clean, and the new test passes on its own — the 22 failures in stem.test.ts here are the daemon-dependent execute cases, all field-audiod is not built.
Credit where it is due: Bugbot found this, not me. I compared plans across the format change and read the entry schema, and a pan that survives to the schema but not through expandLoop is exactly the gap that comparison cannot see, because bloom has no entry that would show it.
No findings.
Codex finding on #102: the unchosen branch pushed its choose diagnostic and then fell through to the unknown-name check, whose predicate did not know the unchosen state — a sound that exists was also reported unknown. Introduced when kind checks went non-fatal. The predicate now counts unchosen among the names that exist; test proven failing first.
Codex finding on #102: project-model.md still told readers to write source: <name> for a generative reference, which the schema this PR ships refuses. It now says sound: <name>, the transitional kind field.
|
Starting review of 1cb54e6. |
minjudd
left a comment
There was a problem hiding this comment.
Reviewed 1cb54e6. The fix is right and I reproduced it on both heads; one finding, and it is a comment rather than code — the sign saying these two sites cannot drift is still up, in the file that no longer shares them.
The false second message reproduces, and is gone. An unchosen generative sound named by an entry, diagnostics on each head:
f1ed61d input "intro" sources "keys", which has no chosen variant yet — field choose keys first
input "intro" references unknown sound "keys" ← false: keys is right there in sounds/
1cb54e6 input "intro" sources "keys", which has no chosen variant yet — field choose keys first
The second sentence was the worse half of the pair: it says the name does not resolve, which sends you looking for a typo, while the first says the name resolves fine and needs a choose. Two answers to "what is wrong here", and the wrong one reads as the fatal one.
The three sibling states are untouched, which is what makes this a suppression rather than a rule change — same probe, same output on both heads: audio: keys on the unchosen sound still gets only audio: names the sound "keys" … use sound:; a takeless recipe still gets nothing at all (bloom-in-tree.md §3, a request rather than an error); sound: nope still gets references unknown sound "nope". All four states of a generative sound — chosen, unchosen, takeless, absent — now answer through sound: the way they answer through a recipe's source:.
The change can only ever remove a diagnostic, and the guard it adds tests the same set as the push directly above it, so there is no gap where the choose message goes missing and the unknown one is suppressed anyway. pnpm typecheck clean; 257 pass and 16 skip across src/model, src/commands, and src/schema — none of that subset needs the daemon, so it is green here rather than merely un-run.
The doc line is correct: an entry does say sound: <name>. I checked the five source: mentions left in docs/ rather than assuming the sweep should have taken them too, and they are a different field — a sound recipe's own source:, which still exists and still resolves in the song's one namespace, so project-model.md:210's "source: pad must mean exactly one thing" holds as written.
minjudd on #102: checkSource's comment still vouched that its messages were shared with the entry path so the two sites could not drift — false since the entry loop went per-kind, and the false second diagnostic this PR already fixed is exactly the drift it promised against. Both comments now say what is true: checkSource serves a sound's source: with one caller, and the entry path resolves per kind on purpose, because its messages name the field and a shared kind-blind one cannot.
|
Starting review of 79ec234. |
minjudd
left a comment
There was a problem hiding this comment.
Approving 79ec234. Comment-only, and I checked that literally: zero changed lines in the diff are anything but a comment, so no test run could come out differently and I did not pretend one was evidence.
What I did verify is that the new comments say true things, since that is the entire content of the commit.
- "One caller: validateSingleInput, below" —
checkSourceis defined atsingle-input.ts:25and called at:55, and nowhere else insrc/. The header now describes the function's real reach instead of a sharing arrangement it lost. - The reason it gives is the reason.
unknown audioandunknown soundare both really there (project.ts:747,:771), andcheckSourcereally does sayreferences unknown source— so "kind-blind" names a property of the code rather than a rationale invented after the fact. - The citation that got promoted from bare to explicit landed on the right section. The old comment said "the whole visibility rule (§1.5)" with only a
project-layout.mdreference upstream of it to anchor the number, and this file citesnested-tracks.md §1.5elsewhere for a track's local timeline — so making it explicit is exactly where a rewrite can silently pick the wrong document.project-layout.md §1.5isaudio/is all of a song's committed sound, whose text is "enforced visibility, not content: a clip can only reference its own song's ledger plusshared/— the system checks this." That is the rule, and §18 is still §18 with §17 unmoved above it. - "The one cross-scope spelling is
audio: //shared/asset:" holds at the schema, which is where it has to:audioissourceRef,trackandsoundareslug, so no other entry kind can spell a label at all. - "Entry references" is now the accurate word for the block, not just the current one. The header introduces
fileBySource, whose only call site isfileBySource(entryRef(entry))in the loop check at:833— so the paragraph describes the code beneath it more closely than "Clip sources" did even before clips retired.
Reworded rather than re-shared is the right call for the reason your reply gives, and it leaves the two sites separate on the record — which is the part that makes the next drift a decision instead of an accident.
No findings.
nested-tracks.md §18 step 3: a track entry may hold an inline `generative:` block — the sound schema's request fields verbatim (prompt or text, plus conditioning), written where they play. The entry mints a `gen:` node under step 2's naming rule, but nothing in the build may run it: the node resolves to the chosen take, every take auditions as `gen:<name>-<n>`, and a request with no takes fails resolution naming the `field generate` that fills it. Decision 3 amended as designed on concrete files: the required id fell. Takes key on the gen node's name — the owning track's, or `<track>-<id>` — so run-recorded state lives in `audio/<name>/variants.yaml` with a `gen:` first key (`sound:` stays for the transitional sounds), and the common leaf fold moves no files: `still-water-keys` folded and its audio directory never moved, only the file's first key renamed, a move the check diagnostic tells a pre-fold file to make. `field generate` and `field choose` resolve gen node names, so the sole-entry leaf reads as `field generate still-water-keys --song creek` — the exact command the file's comment has always shown. The track file never changes when audio is generated or chosen — the design constraint stated in the leaf-content discussion, asserted at the byte level by a test. It is also why a voice entry authors `voice_ref_sha256` up front (the schema already pairs it with `voice_ref`): the run verifies the snapshot against it and refuses a drifted voice, instead of writing the hash back the way the sound path fills its recipe. Namespace guards grew to match: a generative entry may not mint a name a sound or an asset holds (both claim `audio/<name>/`, which imports also land in since #104), check says so, and the import pre-flight now reads generative entry names from tracks/ so the collision is an upfront refusal rather than a check-red project after the copy. The gen-name collision check covers both generator kinds, so an un-id'd generative and an un-id'd supercollider in one track collide with the give-each-an-id message. The fold's cache story is the amended decision 6 exactly, with a better ending than kit-punch's: `keys` re-keyed once (its input moved from the raw take to the wrapper stem) and re-rendered byte-identically — `be389af6d73b…`, the hash it had before the fold — so `phrase` and `main` never re-keyed at all and print `cached`. `lead-take` deliberately does not fold: `vocal-48k` (a normalize sound) sources it and a sound cannot see a track; it waits for multi-rate step 3, recorded in the plan intro beside seven-eight-loop's identical deferral. ## Testing From the repo root: ``` pnpm build && pnpm typecheck && pnpm test ``` 549 tests pass (31 new: entry-takes loading and its diagnostics, the graph shape and never-runs proof, generate/choose end-to-end against the stub worker including the track-file-untouched byte assertion, the namespace guards, and the review round's pins — tampered takes and drifted voice references flagged by check, fmt coverage for takes files on both sides, the orphaned-takes-directory scan, and generate/choose refusing an asset-owned name and a mis-attached takes file). ``` cd examples/bloom field check field build creek/track:main field query 'deps(//songs/creek/track:keys)' ``` `check` says `ok`. The build prints `source //songs/creek/gen:still-water-keys → songs/creek/audio/still-water-keys/1.wav` — a `built` line on that gen node is what wrong looks like, because it would mean the build ran a deliberate generation. `deps` prints the three-line leaf shape: `gen:still-water-keys`, `track:still-water-keys`, `track:keys`. On a warm pre-fold cache, `track:still-water-keys` and `track:keys` build once and `phrase`/`main` stay `cached` — the downstream cache surviving is the proof keys re-rendered byte-identically (`shasum -a 256 .field/out/songs/creek/track/keys.wav` still prints `be389af6d73b…`). Without my cache the same claim is checkable via `field explain`: keys' `parameters` are byte-identical across the fold, so only the input hash moved. ``` field choose still-water-keys --song creek --variant 2 field build creek/track:main field choose still-water-keys --song creek --variant 1 ``` `choose` prints the gen spelling (`//songs/creek/gen:still-water-keys now plays it; every placement follows` — before this PR it claimed a `sound:` label and said `source:`, a spelling #102 retired). The first build after switching takes rebuilds exactly the keys chain — different take, different bytes, so `still-water-keys`, `keys`, `phrase`, `main` rebuild and nothing else does — and both renders then live in the action cache, so flipping between takes after that is entirely `cached`: variant A/B-ing is a one-line diff each way and zero renders once both have been heard. I also verified the fresh-clone story from a `git archive` export (no takes — audio/ is git-ignored): `field check` says `ok`, and `field build creek` refuses with `//songs/creek/sound:lead-take has no takes yet — field generate lead-take --song creek --seed <n>`, which is the message the README now quotes (it used to quote still-water-keys' — the fold changed which request the build reaches first). Generating on this machine is stub-tested only; no model workers are installed here. State left behind: an `audiod` daemon in `examples/bloom` (`field quit` stops it).

nested-tracks.md §18's first step, the format alone:
clips:andinputs:merge into oneinputs:list whose entries name what they play by field —track:,audio:, orsound:. Thesound:field is §18's transition made explicit: it exists exactly as long assounds/does, soaudio:never quietly accepts a name that renders — that would rebuild the bytes-versus-definitions ambiguity kind-in-field exists to remove. Placement fields are uniform across kinds, every entry may carry anid:(automation's handle, §18 decision 3, with per-track uniqueness checked),position:becomesat:, andtype:retires — every track is audio, and midi returns as an entry kind when it is real. Old spellings forward the waymixes/did:clips:,type:,position:, andsource:each get a message naming the move, not an unrecognized-key shrug.The planner needed almost nothing, which is the evidence the format was the thing lying:
planTrackhas sorted the two lists into one placement plan since placements existed, so this PR mostly deletes the second spelling (net −153 lines). Validation becomes one entry loop with per-kind resolution —audio:refuses a sound's name pointing atsound:, and vice versa — and the containment-cycle walker,explain's level answer, and the loop rules (everyrequired on renders-later sources) all speak entries. Diagnostics on a bad reference stay non-fatal to time resolution, matching how clip sources always behaved.One real behavior note: tall-grass's
guitarwas the onlytype: miditrack in bloom; it becomes an ordinary empty track that renders silence and that nothing places.field track createloses its--typeflag, and scaffolded tracks are written asname+inputs: [].Generator entries (
supercollider:,generative:) are deliberately absent — they are §18's next two steps, and this PR is the flag day they land on top of.Review fixes folded in: loop repetitions carry the entry's pan (uniform fields made a panned loop expressible, and expansion must equal the hand-tiled equivalent — pan included), an unchosen generative sound is one diagnostic rather than a false "unknown" stacked on the choose message, the generative example in project-model.md says
sound:, and the comment that claimed checkSource's messages were shared with the entry path now says the sites are separate on purpose.Testing
From the repo root:
510 tests pass, every fixture migrated to the new format. The exactly-one-kind rule is mutation-proven: disabling the schema's arity check turns its test red.
checksaysokon the fully migrated example. Drums printsaction: 6cd170a1cbfe (cached)— the same key it has carried since before #100 — and both songs come back entirely cached (creek: 10 cached + 2 source, tall-grass: 4 cached). This is the PR's core claim made falsifiable: entry spelling is wiring, the resolved placement plan is byte-identical, so a format flag day re-renders nothing. If any resolved field had drifted — an offset defaulting differently, the sort order moving — these commands are where it would show, asbuiltlines and a moved drums key.What wrong looks like — the forwarding messages on an old-format file:
The first prints two migration messages ("every track is audio — delete type:…" and "clips: merged into inputs: — move each clip there, renaming position: to at: and source: to audio:/sound:/track:…"), plus a cascade from phrase losing sight of drums; the second restores and says
ok.I also ran
field checkandfield arrangement creekfrom a cleangit archive HEAD examples/bloomexport —ok, and the structure prints as before — so nothing depends on this checkout's caches.scsynthis not on my PATH; nothing here needed it, because no SC action key moved and the cached renders satisfied every build.State left behind: an
audioddaemon inexamples/bloom(field quitstops it), and.field/out/songs/tall-grass/now exists from the first tall-grass build in this checkout.