Repository navigation
Add install.sh and field upgrade: install a checkout and keep it current (install.md chunk 1) - #185
Conversation
…ent (install.md chunk 1) install.sh installs the checkout it sits in: the field command as a pnpm link, field-audiod, and a re-sync of each worker environment already set up. field upgrade runs that installer from any directory, and field upgrade status reports what is installed and what is out of date. The plan for releases and a one-line curl install is docs/projects/install/readme.md §3.
…and document it in the CLI manual main gained a Windows CI job and docs/cli.md. install.sh is bash, so on Windows field upgrade now refuses with the steps to run by hand, the installer's tests skip there, and the eight daemon error messages name BUILD_DAEMON: field upgrade audiod, or pnpm build:native in the checkout on Windows. docs/cli.md's install section, reference table, and environment variables cover field upgrade and field setup's new options.
ninjudd
left a comment
There was a problem hiding this comment.
📽️ Projector review · 0.7.3 · model claude-opus-5-5 · effort xhigh · CHANGES REQUESTED · took 11m 57s over 2 heads
This change gives a Field checkout an installer and a way to keep it current. ./install.sh installs dependencies, builds dist/, links field through pnpm, builds field-audiod, and re-syncs only the worker environments someone already set up. field upgrade [target] runs that installer from any directory, and its status target compares the checkout, the CLI build, the daemon, and each worker with their sources. field setup gains --existing and --check so the CLI decides which workers count as set up, the eight daemon error messages name field upgrade audiod (or the checkout build on Windows, where field upgrade refuses), and pnpm gen:limits stops rewriting an unchanged header. Releases, the release installer, and the one-line curl install stay in chunks 2 to 4 of the new install plan, and the installer never pulls or switches branches.
3 finding threads: 0 resolved, 3 open
Covered 21 of 21 changed files; none is generated.
The install plan is new at status: in-progress, so every question it opens must be answered or deferred to where it gets decided. §7.2, §7.4, and the interim half of §7.6 answer theirs. §7.1 and §7.5 name the chunk they gate, and §8.3 defers the rest of §7 that gates chunks 2 to 4, which covers §7.3. The install.ps1 question at the end of §7.6 gates no chunk and names no owner, so it has a thread.
- What ran. At this head, in a scratch worktree:
pnpm install --frozen-lockfile,pnpm typecheck,bash -n install.sh,project check, and vitest onsrc/install.test.ts,src/commands/upgrade.test.ts,src/workers/setup.test.ts,src/commands/generate.test.ts, andsrc/schema/plan-limits.test.ts, where 5 files and 90 tests passed.pnpm gen:limitsleft the modification time ofplan-limits.hunchanged. - Extra runs. Three cases added for the review, then removed, ran inside the
src/install.test.tssandbox, which uses stand-ins for pnpm and cmake and a temporaryHOMEandPATH. They back the first thread and the first suggestion. pnpm 11.15.1 moved a globalfieldlink between two stand-in packages in a throwawayPNPM_HOME, so themovedpath works with the real pnpm. - Not run.
install.shandfield upgradeagainst a real environment, a JUCE build offield-audiod, andfield setup --existingagainst real worker environments. A two-target CMake project stood in for the daemon's build to show which edits relink which binary.shellcheckis not installed, so the script had onlybash -n.
Suggestions
install.sh:210printsmain matches origin/mainfor a branch with unpushed commits, because onlyHEAD..@{upstream}is counted. Say the branch is not behind its upstream, or count@{upstream}..HEADtoo.src/audiod/client.ts:66makesBUILD_DAEMONreadpnpm build:native in the field checkouton Windows, andsrc/audio/plugins.ts:109,src/audio/render-daemon.ts:98, andsrc/cli.ts:761wrap it in backticks, so "in the field checkout" reads as part of the command. Keep the instruction outside the code span.
Since the keyboard instrument's voice host (#179), field finds `sclang` itself in `sclangCommand`, and both SuperCollider renders and `field keys` go through it. On Windows that lookup could not find a real `sclang` at all, even with SuperCollider installed: its `PATH` search tried only `sclang`, never `sclang.exe`; a native `FIELD_SCLANG` such as `C:\Program Files\SuperCollider-3.13.0\sclang.exe` contains no `/`, so it was searched for as a bare name and reported missing; and the fallback probed only the macOS app bundle. The Windows stack recorded this as an open item in windows-portability.md §7.2. This makes the lookup platform-aware without changing it on macOS or Linux: - On Windows the `PATH` search tries `.com` and `.exe`, and never the bare name, because an extensionless file cannot run there. The rest of `PATHEXT` is left out on purpose: both callers spawn without a shell, and Node refuses a `.bat` or `.cmd` that way (`spawn EINVAL`, since the CVE-2024-27980 releases). A `FIELD_SCLANG` that names a batch file is refused with that reason. - A `FIELD_SCLANG` with a backslash, a slash, or a drive is read as a path; a bare name is still searched for on `PATH`, so a wrapper like `sclang-wrapper.exe` keeps working. - The fallback takes the newest `SuperCollider-<version>` folder under Program Files, sorting versions numerically so 3.13.0 beats 3.9.3. - `PATH` and `ProgramFiles` are read without regard to case. Windows usually spells the first one `Path`, and the voice host can pass a copied environment, which loses the case-insensitive lookup that only `process.env` has. The platform is a parameter of `sclangCommand`, defaulting to `process.platform`, so `src/generators/supercollider.test.ts` exercises each Windows rule against real files on any machine; the two tests whose fixtures only a POSIX host can hold skip on Windows. `build.test.ts` now probes for a real `sclang` with the same lookup, so its integration test runs on Windows when SuperCollider is installed. `docs/cli.md` and `docs/keys.md` describe the whole lookup order, and the plan records the item as ported. #185 also edits `docs/cli.md`, in different lines (its `FIELD_OFFLINE` row and the Platform notes), so whichever merges second should merge cleanly. ## Testing From the root of a checkout of `windows/sclang-lookup`, with the daemon built by `pnpm build:native` (the full suite's daemon tests need it): ```sh pnpm install --frozen-lockfile pnpm typecheck pnpm exec vitest run src/generators/supercollider.test.ts pnpm test project check ``` You should see a clean typecheck, `Tests 11 passed (11)` for the lookup tests, the full suite passing (995 passed and 1 skipped on macOS here), and `Project plans are valid.` The lookup tests are what would show the change wrong: a failure in any test whose name mentions Windows means `sclang.exe`, a native `FIELD_SCLANG`, or the Program Files fallback is not found. Against `main`'s lookup, every Windows test fails. Nothing here can be exercised by hand on macOS. The `windows` CI job runs the same tests natively on Windows. A by-hand check on a Windows machine with SuperCollider installed is `field keys` or `field build` on a project with a `supercollider:` entry, which should find `sclang.exe` with no `FIELD_SCLANG` set. The commands leave the checkout unchanged. <!-- projector-summary v=1 sha=d1169c1d93a915b25bd10f61bb2ebd1d67ef76d7 --> 📽️ **Projector summary** of d1169c1: https://field.amnes.ac/reviews/186
…anything `install_cli` ran `pnpm install` and `pnpm run build` before `link_cli` checked that pnpm's global bin directory was on PATH, and `all` ran the whole `cli` target, `pnpm add -g` included, before `install_audiod` checked for CMake. So `./install.sh` without CMake, or `./install.sh cli` without the bin directory on PATH, installed, built, and sometimes linked before it stopped with exit status 69, against install.md §2.2 and §5. Each target now runs its checks first: Node and pnpm, pnpm's global bin directory (on PATH unless `field` already links this checkout), and CMake for `audiod` and `all`. The message for a missing bin directory names the target that was run, rather than `cli`, because nothing has run yet.
…rebuild runs `audiod_changed` compares every tracked file under `native/audiod` with the `field-audiod` binary, but that CMake project also builds `field-dsp-check` and `field-fixture`, and CMake relinks `field-audiod` only when its own inputs change. After a pull that touched only `src/dsp-check.cpp`, `src/fixture/fixture.cpp`, or a comment in `CMakeLists.txt`, `field upgrade audiod` rebuilt without relinking the daemon, and the status row kept asking for the build that had just run. `install_audiod` now touches the binary (`touch -c`, so a build that produced none still reports `audiod-missing`) after each successful build, and the row compares the sources with the installer's last build. The pnpm stand-in in `src/install.test.ts` leaves an existing daemon alone, as CMake does, so the new test fails without the touch.
The plan is in progress, and §7.6 left whether Windows gets an `install.ps1` open with no chunk to decide it. Chunk 3, the release installer, now decides it: a Windows checkout installs with four pnpm commands, but a release install has no checkout to run them in, and the question goes with whether releases publish a Windows daemon (§7.2).
`report_checkout` counted only `HEAD..@{upstream}`, so a branch with
local commits and nothing to pull printed `main matches origin/main`.
It now counts `@{upstream}..HEAD` too and prints a `repo-ahead` row,
`main is 1 commit ahead of origin/main`, as a plain row: the installer
installs the checkout as it is, so local commits need no action. A branch
that is both ahead and behind still warns `repo-behind`.
On Windows, `BUILD_DAEMON` reads `pnpm build:native in the field checkout`, and three of the eight daemon messages wrapped it in backticks, so "in the field checkout" read as part of the command. Those three now name it without a code span, as the other five already did.
…aemon's terms `main` licenses Field's code under MIT (#184), and its README records that `field-audiod` links JUCE (AGPLv3 or commercial) and compiles in the VST3 SDK (GPLv3 or Steinberg's proprietary license). Plan §7.1 still said the repository had no `LICENSE` and weighed only JUCE. §7.1 now states the license and leaves open the one decision that gates chunk 2: publish the daemon under the copyleft terms, with its license notices in the archive and its source at the release tag, or hold both commercial licenses. §3.1 puts `LICENSE` in the CLI archive and points the daemon archive at §7.1.
ninjudd
left a comment
There was a problem hiding this comment.
📽️ Projector review · 0.7.4 · model claude-opus-5-5 · effort xhigh · CHANGES REQUESTED · took 15m 44s
This change gives a Field checkout an installer and a way to keep it current. ./install.sh installs dependencies, builds dist/, links field through pnpm, builds field-audiod, and re-syncs only the worker environments someone already set up. field upgrade [target] runs that installer from any directory, and its status target compares the checkout, the CLI build, the daemon, and each worker with their sources. This head answers the first review: each target checks its prerequisites before its first command, the installer touches field-audiod after each build so audiod-stale clears, chunk 3 owns the install.ps1 question, a branch with unpushed commits reports repo-ahead, and the Windows build instruction is no longer inside a code span.
4 finding threads: 3 resolved, 1 open
Covered 21 of 21 changed files; none is generated. Seven changed since the reviewed head e333044, and the merge base did not move.
The three earlier threads are fixed at this head, and each was already resolved:
- Prerequisites before anything changes. In the
src/install.test.tssandbox,allwithoutcmake, without pnpm's global bin directory on PATH, without a global bin directory at all, and with Node 22, andaudiodwithoutcmake, each exit 69 with no install, build, or link logged. audiod-staleafter its rebuild. The same sandbox ran the real CMake on a two-target project laid out likenative/audiod. An edit to the second target's source madestatusprintaudiod-stale, andinstall.sh audiodbuilt only that target without relinkingfield-audiod.statusthen printedaudiod-current, and the same run with thetouch -cline removed still printedaudiod-stale.- The
install.ps1question. §6 lists it under chunk 3, and §7.6 says why. With it, every question in thein-progressplan is answered or deferred to a named chunk.
What this review ran, and what it did not:
- What ran. At this head, in a scratch worktree:
pnpm install --frozen-lockfile,pnpm typecheck,bash -n install.sh,project check, and vitest onsrc/install.test.ts,src/commands/upgrade.test.ts,src/workers/setup.test.ts,src/commands/generate.test.ts,src/commands/version.test.ts, andsrc/schema/plan-limits.test.ts, where 6 files and 114 tests passed. The extra sandbox cases were removed afterwards. - CI. The
linuxjob passed. Thewindowsjob failed insrc/keys/voice-host.test.ts,src/commands/record-midi-daemon.test.ts,src/audio/plugin-hosting.test.ts, andsrc/model/project.test.ts, none of which this pull request changes. The first two also fail inmain's own Windows run at8472df5, the commit CI merged this head into. The other two are an inventory cache rewritten within one timestamp and a hook timeout.src/install.test.tsskips on Windows, and the runnable part ofsrc/commands/upgrade.test.tspassed there. - Not run.
install.shandfield upgradeagainst a real environment, a JUCE build offield-audiod, andfield setup --existingagainst real worker environments.shellcheckis not installed, so the script had onlybash -n.
`require_cmake` checked only that `cmake` was on PATH, so on Ubuntu 22.04, whose `cmake` package is 3.22, `./install.sh` installed, built, and linked the CLI before `build:native` stopped at `cmake_minimum_required(VERSION 3.24)`. `require_cmake` now reads `cmake --version` and refuses one older than `native/audiod/CMakeLists.txt` requires, naming the version it found, and `status` reports it as a `cmake-old` row. `docs/install.md` and plan §2.2 say the installer checks Node, pnpm, and CMake, and that the daemon build, not the installer, reports a missing compiler or missing headers.
…dy sent you to the checkout `field upgrade` promises to keep a checkout's install current, but the `cli` target built only `dist/`, so `field ui` kept serving an old `ui/dist`, or refused with `pnpm --dir ui build`, a command that is not a script inside a song project. `field --version` sent a stale build to `pnpm build` the same way. The `cli` target now runs `pnpm run build:ui` after `pnpm run build`, every time, for the reason `build` runs every time. It does not check for `ui/`: `package.json` and `pnpm-workspace.yaml` name it in the same commit as the installer, so its absence is a broken checkout. The root install already covers the `ui/` workspace member. `status` reports `ui-current`, `ui-stale`, or `ui-missing`, comparing `ui/dist/index.html`, which Vite rewrites on every build, with the tracked files the bundle may read: everything under `ui/` and `src/` but tests, and the lockfile. The remedies move to `src/remedies.ts`. `BUILD_DAEMON` joins `BUILD_CLI`, `BUILD_UI`, and `INSTALL_UI`, which name `field upgrade cli`, or on Windows the pnpm script to run in the checkout. `field --version`, `field ui`'s missing client, and its missing app shell use them, and the Windows refusal in `field upgrade` lists `pnpm build:ui` too.
ninjudd
left a comment
There was a problem hiding this comment.
📽️ Projector review · 0.7.4 · model claude-opus-5-5 · effort xhigh · CLEAN · took 24m 33s over 2 heads
This change gives a Field checkout an installer and a way to keep it current. ./install.sh installs dependencies, builds the CLI and the field ui client, links field through pnpm, builds field-audiod, and re-syncs only the worker environments someone already set up. field upgrade [target] runs that installer from any directory, and its status target compares the checkout, the CLI build, the UI build, the daemon, and each worker with their sources. The CLI's remedies, collected in src/remedies.ts, name field upgrade cli or field upgrade audiod instead of pnpm scripts that do not exist inside a song project. Releases, the release installer, and the one-line curl install stay in chunks 2 to 4 of the install plan.
4 finding threads: 4 resolved, 0 open
Covered 25 of 25 changed files; none is generated. Since the review of 50611d8, the branch merged main cleanly, which moved the merge base to 8472df5 and only shifted this pull request's hunks in the five files both sides touched. It also added three commits. The first refuses a CMake older than 3.24, the second records the MIT license in plan §7.1, and the third builds the UI in the cli target and moves the remedies into src/remedies.ts. The review started at d517430 and moved to 70e2f92 when the third commit arrived.
The earlier thread on docs/install.md is fixed at this head, and the author had already resolved it. In the src/install.test.ts sandbox, with a stand-in cmake for each version:
- Older versions are refused before anything changes. 3.22.1 and 3.23.5 exit 69 from both
allandaudiodwith nothing installed, built, or linked, andstatusprintscmake-old. - 3.24 and later pass. 3.24.0, 3.24.0-rc1, 4.0.0, 10.1, and real
cmake --versionoutput with its trailing lines all pass. - An unreadable version fails closed.
cmake version unknownand empty output exit 69 before anything changes. Empty output names no version in the message (cmake isand then nothing). Acmakethat exits non-zero reads as missing.
The three threads from the first review were fixed at 50611d8, and nothing in the new commits reopens them. The install plan stays in-progress with every open question answered or deferred to a named chunk, and the new §7.1 still defers the daemon's license to before chunk 2.
What this review checked in the new UI and remedies commit:
- The UI build.
pnpm run build:uiran in the scratch worktree in about two seconds and left the checkout clean, because.gitignore'sdist/coversui/dist. The root install putui/node_modules/electron/cli.jsin place, which is the filefield uilooks for before it starts the app shell, soINSTALL_UInamingfield upgrade cliholds. - The
ui-stalerow. The UI imports fromsrc/commands/ui-protocol.ts,src/time/tempo.ts, andsrc/audio/eq-response.ts, so the comparison over all ofsrc/is broad but not wrong. Vite rewritesui/dist/index.htmlon every build, sofield upgrade cliclears the row, unlike the daemon's case; the sandbox showedui-staleturn toui-currentafterinstall.sh cli. - No remedy left behind. No other message under
src/, and nothing inREADME.md,docs/, orexamples/bloom/README.md, still namespnpm build,pnpm --dir ui build, orpnpm build:nativeas the remedy.
What ran, and what did not:
- What ran. At this head, in a scratch worktree:
pnpm install --frozen-lockfile,pnpm typecheck,bash -n install.sh,project check,pnpm run build:ui, and vitest onsrc/install.test.ts,src/commands/upgrade.test.ts,src/workers/setup.test.ts,src/commands/generate.test.ts,src/commands/version.test.ts,src/schema/plan-limits.test.ts, andsrc/commands/ui.test.ts, where 7 files and 123 tests passed. The extra sandbox cases were removed afterwards. - CI. The
linuxjob passed. Thewindowsjob failed insrc/keys/voice-host.test.ts,src/commands/record-midi-daemon.test.ts, andsrc/audio/plugin-hosting.test.ts, none of which this pull request changes.main's own Windows runs at8472df5, this head's merge base, and at4467d6ffail as well, and the first two files fail in both the run at8472df5and this one.src/install.test.tsskips on Windows. The runnable part ofsrc/commands/upgrade.test.tspassed there, along withsrc/commands/version.test.tsandsrc/commands/ui.test.ts. - Not run.
install.shandfield upgradeagainst a real environment, a JUCE build offield-audiod,field uiwith a window, andfield setup --existingagainst real worker environments.shellcheckis not installed, so the script had onlybash -n.
Suggestions
install.sh:30copies 3.24 fromcmake_minimum_requiredinnative/audiod/CMakeLists.txtby hand. A test insrc/install.test.tsthat reads the CMake file and compares would catch a bump on one side only.docs/projects/install/readme.md:340is right about the VST3 SDK that JUCE 8.0.4 bundles. Steinberg released VST3 SDK 3.8 under the MIT License on 2025-10-29, though, so a JUCE release that bundles 3.8 would leave only JUCE's AGPLv3-or-commercial choice for §7.1 to settle. Which JUCE release first bundles it is not confirmed here.
…ts.txt `install.sh` copies 3.24 from `cmake_minimum_required` in `native/audiod/CMakeLists.txt` into `CMAKE_MAJOR` and `CMAKE_MINOR` by hand, so a bump on one side alone would let the installer pass a CMake the build refuses, or refuse one it accepts. The test reads both files and fails when they disagree. It reads files only, so it runs on Windows too.
Steinberg released VST3 SDK 3.8.0 under the MIT License, and JUCE's change list puts "Updated the VST3 SDK to 3.8.0 (MIT license)" under 8.0.11, the first release to bundle it; every `LICENSE.txt` in its `VST3_SDK` directory is MIT. JUCE 8.0.4, which the daemon pins, bundles 3.7.12 under GPLv3 or Steinberg's proprietary license. §7.1 now says a newer JUCE leaves only JUCE's own AGPLv3-or-commercial choice, with the sources, and leaves moving the pin to a change of its own.
Every project plan opened with a `# Plan: …` heading. The prefix says nothing the reader doesn't already know: each one lives under `docs/projects/`, and the `project` command already labels it as a project. Because Projector takes a project's title from its first heading, the prefix also filled every row of `project list` and the project site with the same word, which made the titles harder to scan. This change removes the prefix from all 51 plans that had it. `daw-features` never had one. Three headings started with an ordinary lowercase word once the prefix was gone, so they now start with a capital: "The UI, first version", "The TUI" and "Hosted plugins — AU and VST3 as inserts". Headings that start with a name the docs keep lowercase stay as they were: `bloom`, `prettier`, `src/engine` and the backticked `field` commands. Projector's own templates never add the prefix. It was a habit in this repository, and new plans picked it up by copying the existing ones. Once this merges, `main` has no plan left to copy it from. This change covers only plans that already exist on `main`. Two open PRs add new plans that still carry the prefix, because their authors copied it from `main`: #185 adds `install` (`# Plan: Install and upgrade`) and #202 adds `instrument-knobs` (`# Plan: Instrument knobs`). Each needs the same one-line fix on its own branch. The other open PRs that edit plans (#196, #197, #198, #201) change plan bodies but not headings, so they merge cleanly on top of this. ## Testing From the repository root, with nothing to build first: ```sh grep -rn "Plan: " docs/projects project list project check ``` `grep` should print nothing. `project list` should show titles such as `Arming` and `The UI, first version`. A title that still begins with `Plan:` means a heading was missed. `project check` should print `Project plans are valid.` It also prints a `site-workflow-outdated` warning, which `main` already shows and which this change does not touch. None of the commands change any files.
`main` dropped the prefix from every plan's heading in #200, and the install plan arrives with this branch, so it missed that sweep.
ninjudd
left a comment
There was a problem hiding this comment.
📽️ Projector review · 0.7.4 · model claude-opus-5-5 · effort xhigh · CLEAN · took 45m 29s over 2 heads
This change gives a Field checkout an installer and a way to keep it current. ./install.sh installs dependencies, builds the CLI and the field ui client, links field through pnpm, builds field-audiod, and re-syncs only the worker environments someone already set up. field upgrade [target] runs that installer from any directory, and its status target compares the checkout, the CLI build, the UI build, the daemon, and each worker with their sources. The CLI's remedies, collected in src/remedies.ts, name field upgrade cli or field upgrade audiod instead of pnpm scripts that do not exist inside a song project. Releases, the release installer, and the one-line curl install stay in chunks 2 to 4 of the install plan.
4 finding threads: 4 resolved, 0 open
Covered 25 of 25 changed files; none is generated. This builds on the clean full review of 70e2f92. The review started at 050aaaf, which qualified for an incremental review. It moved to bc3b546 when the branch merged main (2d24a3b), and with the merge base moved and no review.gate configured, that called for a full review. Apart from the merged base, three changes are this pull request's own:
- The CMake minimum is tested. A new test in
src/install.test.tscomparesCMAKE_MAJORandCMAKE_MINORwithcmake_minimum_requiredinnative/audiod/CMakeLists.txt. It passes, it fails whenCMAKE_MINORis set to 25, and it ran and passed on the Windows CI job too. - Plan §7.1 notes the MIT-licensed VST3 SDK. JUCE's change list gives "Updated the VST3 SDK to 3.8.0 (MIT license)" under 8.0.11 and 3.7.12 before it, and all four
LICENSE.txtfiles under itsVST3_SDKat the 8.0.11 tag are MIT. So are those at the SDK'sv3.8.0_build_66tag, and the cited forum post resolves. The ASIO line matches the change list, andnative/audiod/CMakeLists.txtsets noJUCE_ASIO. The license decision stays deferred to before chunk 2. - The plan's heading drops "Plan: ". That matches the sweep
mainmade in #200, andproject checkpasses.
The merge changed nothing else of this pull request's. Only docs/keys.md was touched on both sides, and its one changed line still reads in place. install.sh, src/remedies.ts, docs/install.md, and the commands this pull request edits are unchanged since 70e2f92. No message main added names a pnpm script as its remedy.
What ran, and what did not:
- What ran. At this head, in a scratch worktree:
pnpm install --frozen-lockfile,pnpm typecheck,bash -n install.sh,project check, and vitest onsrc/install.test.ts,src/commands/upgrade.test.ts,src/workers/setup.test.ts,src/commands/generate.test.ts,src/commands/version.test.ts,src/schema/plan-limits.test.ts, andsrc/commands/ui.test.ts, where 7 files and 124 tests passed. The sandbox checks of earlier heads still coverinstall.sh, which has not changed since70e2f92. - CI. The
linuxjob passed. Thewindowsjob failed insrc/keys/voice-host.test.ts,src/commands/record-midi-daemon.test.ts, andsrc/audio/plugin-hosting.test.ts, none of which this pull request changes. These are the same failures as at70e2f92, andmain's own Windows runs at8472df5and4467d6ffail too. The new constants test,src/commands/upgrade.test.ts,src/commands/version.test.ts, andsrc/commands/ui.test.tspassed there. - Not run.
install.shandfield upgradeagainst a real environment, a JUCE build offield-audiod,field uiwith a window, andfield setup --existingagainst real worker environments.shellcheckis not installed, so the script had onlybash -n.
Installing Field from a checkout has been four pnpm commands run inside it, and nothing says when the result goes stale. After a
git pull,fieldruns the olddist/until someone rebuilds,field-audiodstays the old build, and a worker's venv keeps its old packages. Each of those has already cost a debugging round. This adds the installer Projector has, in the same shape:./install.shin a checkout installs thefieldcommand (still a pnpm link to the checkout) and thefield uiclient it serves, buildsfield-audiod, and re-syncs each model-worker environment you already set up. It never sets up a new one, because that starts a multi-gigabyte weights download.field upgrade [target]runs that installer from any directory, andfield upgrade statusprints one row per piece, with the command that fixes anything out of date: the checkout against its upstream,dist/againstHEAD, the UI and the daemon against their sources, and each worker against its lockfile. The installer never pulls or switches branches, since the checkout may hold work in progress.Three smaller changes support it.
field setupgains--existingand--check, so the CLI, which owns the list of workers and the test for "set up", answers both questions instead of the installer guessing frompython/*/.venv. The CLI's remedies now name the upgrade instead of a pnpm script, which is not a script in the song projects where those messages fire: the eight daemon error messages namefield upgrade audiod, andfield --version's stale build,field ui's missing client, and its missing app shell namefield upgrade cli. They all come fromsrc/remedies.ts. Andpnpm gen:limitsnow writesplan-limits.honly when it changes. Everypnpm testwas rewriting it with identical bytes, so the next daemon build recompiled every file that includes it, and the new status row correctly reported the daemon stale.The branch merges
main, which gained a Windows CI job anddocs/cli.mdwhile this was in progress.install.shis bash and does not support Windows yet. So on Windows,field upgraderefuses and lists the steps to run by hand, each remedy names its pnpm script in the checkout, and the installer's tests skip.docs/cli.mdnow covers the installer,field upgrade, and the newfield setupoptions.The plan,
docs/projects/install/readme.md, carries the rest of the arc in §3: releases that publish a prebuilt CLI and daemon, a release installer that needs only Node 24, andcurl -fsSL https://field.one/install.sh | bashonce the repository is public, served by a rewrite inapps/field-onethe way projector.bot serves Projector's. Two open questions gate that. §7.1 is the daemon binary's license. Field's code is MIT (#184), butfield-audiodlinks JUCE, which is AGPLv3 or commercial, and compiles in Steinberg's VST3 SDK, which is GPLv3 or proprietary. So a published daemon either ships under those copyleft terms, with its license notices and its source at the release tag, or needs both a commercial JUCE license and Steinberg's proprietary one. JUCE 8.0.11 bundles VST3 SDK 3.8.0, which is MIT, so moving the daemon's JUCE 8.0.4 pin there would leave only JUCE's own choice; §7.1 cites the sources, and moving the pin is a separate change. §7.3 is where the macOS daemon builds, given the Actions spending cap.docs/install.mddocuments each target and every status row.Testing
Run these from a checkout of
install-and-upgrade, in the order given. Step 3 uses a throwaway pnpm global directory, so your realfieldstays linked to your main checkout throughout.Build first:
pnpm install --frozen-lockfile && pnpm buildRun the new tests:
pnpm exec vitest run src/install.test.ts src/commands/upgrade.test.ts src/workers/setup.test.tsYou should see 3 files and 63 tests pass.
src/install.test.tsruns the realinstall.shunder your/bin/bash, which is bash 3.2 on macOS, against a temporary clone, with stand-ins for pnpm, cmake, and the CLI and nothing else on PATH. Linux CI runs the same tests under bash 5, and Windows CI skips them. At the current head, after mergingmain, the full suite passed here: 83 files, 1079 tests passed and 1 skipped. A daemon built before the merge fails the daemon testsmainadded, so run./install.sh audiodfirst if your checkout's daemon predates it.Install for real into a throwaway pnpm global:
The first
cli, before pnpm's bin directory is on PATH, should exit 69 with a message that says to runpnpm setup, and print nothing frompnpm installor the build, because every prerequisite is checked before anything changes. The secondclishould end with alinkedrow,…/bin/field -> <this checkout>. The third should print the same row without pnpm's+ field 0.1.0 <-line, because a link that already points here is left alone.field upgrade status, run from/tmp, should first print+ <this checkout>/install.sh status, then rows includingclipointing at this checkout,cli-current, andui-current. Eachclirun builds the UI too:pnpm run build:uitakes about two seconds, and a wholeclirun took 4 to 5 seconds here. Expectaudiod-missingunless you also run./install.sh audiod, which compiles JUCE the first time; that took 3 minutes 8 seconds here. A branch with commits its upstream lacks showsrepo-ahead, notrepo-current. The change is wrong if the firstclibuilds anything, if a laterclirun prints novitebuild, iffield upgradenames a different checkout'sinstall.sh, or if the thirdclirun links again. Afterwards, close the shell and delete the$PNPM_HOMEdirectory.If you built the daemon, check that a rebuild clears the stale row even when CMake relinks nothing:
The first status should print
audiod-stalenamingdsp-check.cpp. The build should link onlyfield-dsp-check, and the second status should printaudiod-current. The change is wrong if the second status still printsaudiod-stale.Check the header fix:
It should print
…/plan-limits.h is current, and both listings should show the same modification time. Before this change it printedwrote …and the time moved.The commands leave behind a built
dist/in the branch checkout, the throwaway pnpm directory until you delete it, andnative/audiod/build/if you ran theaudiodtarget. Re-syncing a real worker environment throughfield upgrade workersis not exercised here, because it runsuv syncagainst your venvs.src/workers/setup.test.tscovers which workers it selects, and after this mergesfield setup --checkin your main checkout shows the state of the two you have set up.📽️ Projector summary of bc3b546: https://field.amnes.ac/reviews/185