Repository navigation
Add field uninstall: the installer's uninstall target removes what the installer made (install.md §3.5) - #219
Conversation
install.sh uninstall removes a release install's shim, versions, current, release.conf, and JUCE cache, only what the installer can show it made, then the data directory if it is empty; in a checkout it removes pnpm's link and never the checkout. The model weights stay in the shared Hugging Face cache, and the uninstall says where. field uninstall runs the target as field upgrade runs the installer. The README and docs lead with field.one/install.sh now that it serves the installer, docs/release.md's example bumps patch, and plan §10.3 records the first real install.
ninjudd
left a comment
There was a problem hiding this comment.
📽️ Projector review of ef4ef2e · 0.7.10 · model claude-opus-5-5 · effort xhigh · CHANGES REQUESTED · took 9m 54s
This change adds field uninstall and an uninstall target to install.sh. In a release install, the target removes the shim, every version and download the installer can show it made, current, release.conf, and JUCE's download, then removes the data directory if nothing else is in it. Anything else stays, with a kept row. In a checkout install, it runs pnpm remove -g field only when pnpm's global field links that checkout, and it never deletes the checkout. field uninstall finds the installer the way field upgrade does. The change knowingly leaves field.one/uninstall.sh to okamnesiac/audiofield, after a release carries the target. It also points the README and docs at field.one/install.sh.
2 finding threads: 0 resolved, 2 open
Covered 10 of 10 changed files; no generated files.
The ownership tests hold up. A sandbox kept every decoy: an X.Y.Z directory without the marker, a symlinked X.Y.Z and its target, a .download-* without unpacked/, loose files, and another tool in the bin directory. Both findings are about what the uninstall tells you, or what it leaves without telling you.
Disclosures
shellcheckisn't installed on this machine, soinstall.shgotbash -nonly.- Windows CI failed on one test,
src/commands/push.test.ts"pushes, then offers every entry beneath main for HEAD", which timed out after 14 s. That is today's push timing flake, not this change's code. Linux and CodeQL passed.
What I ran at this head, in a scratch worktree
pnpm install --frozen-lockfile,pnpm typecheck,project check, andbash -n install.shall exited 0.pnpm exec vitest run src/install.test.ts src/commands/upgrade.test.tspassed 104 tests. Both files run against a temporaryHOMEand stand-ins, and the installer tests use aPATHthat holds only stubs and links.- A sandbox with a temporary
HOME, data and bin directories whose paths contain spaces, decoys, and refusingpnpmandcmakestubs, run underenv -i.field uninstallran through the shim, using the built CLI at this head, once withFIELD_OFFLINE=1and once downloading the installer from afile://FIELD_RAW_URL. Each time it removed the shim, both versions, the download,current,release.conf, and the cache, and exited 0 while running from the version it removed. A checkout whose path has a space was unlinked and left in place. The sandbox is deleted.
Readiness
The install plan stays in-progress, and this change opens no question in §3.5. §7.4, "Which domain serves the installer", is still open from before this change, although chunk 4 shipped field.one. It doesn't block.
Suggestions
README.md:108anddocs/install.md:239: field.one answers 404 foruninstall.shtoday, and will until a release carries the target and audiofield deploys the file.curl -fsSL https://field.one/install.sh | bash -s -- uninstallworks as soon as the release ships, with no second deploy, so the docs could give that form untiluninstall.shexists.install.sh:950: the uninstall neither stops nor names a runningfield-audiod. A daemon that is playing never exits on idle (native/audiod/src/main.cpp:128), so it keeps running from the deleted version, and nofieldis left to stop it. A row naming the running daemon, or a refusal while one from the data directory runs, would close that.src/commands/upgrade.ts:118: underfield uninstall, a failed download reportscannot upgrade: …. TheFIELD_OFFLINErow atdocs/cli.md:635namesfield upgradebut notfield uninstall, which downloads the installer the same way.docs/install.md:185and plan §7.5 also say the workers' weights live in the Hugging Face cache. That predates this change, and the first finding's fix applies there too.
ninjudd
left a comment
There was a problem hiding this comment.
📽️ Projector review of ef4ef2e · 0.7.10 · model gpt-6 · CHANGES REQUESTED · took 3m 15s
This change gives you field uninstall and an installer target that removes release files or a checkout's global pnpm link. It keeps foreign files and model weights, and records the uninstall design in the install plan. The separate field.one uninstaller still needs deployment after a release carries this target.
2 finding threads: 0 resolved, 2 open
Covered 10 of 10 changed files; no generated files skipped.
Both existing P2 findings remain valid at this head:
- Shim ownership. A temporary reproduction confirms that uninstall deletes a shim pointing into another data directory and prints
uninstalled, while that directory's version remains. - Model weights.
python/aced/src/field_aced/adapter.pyselectsFIELD_ACE_MODELSor~/.field/models/acestep; the new output and docs name only the Hugging Face cache.
The focused installer and upgrade tests, pnpm typecheck, project check, and bash -n install.sh pass. No new blocking finding was found. The install plan remains in-progress; its existing domain question predates this change and does not add a blocker here.
…ll.md §3.5) The uninstall removed `$BIN_DIR/field` whenever it carried the installer's marker. An install made with FIELD_DATA_DIR, uninstalled by `curl … | bash -s -- uninstall` without it, passed the "nothing installed" check on the shim alone, lost its shim, and printed `uninstalled` while every version stayed. The shim was the one record of where that install lived. The uninstall now removes the shim only when its exec line runs this data directory's `current`, read back from the quoting write_shim writes. `field uninstall` names the data directory by its real path and the shim keeps the path it was installed through, so the two compare as files when their text differs. Any other release shim stays, with a `kept` row that names its data directory and says to uninstall again with FIELD_DATA_DIR set to it.
…ows-portability.md §7.2) (#220) The `windows` CI job still fails every few runs after #197, on `main` and on branches alike, and every failure since is a vitest timeout in `src/commands/clone.test.ts`, `push.test.ts`, or `pull.test.ts`. Each test in those files sets up a project, a commit, and a bare remote, one git or git-lfs process after another, and several then clone, push, or pull. Starting a process is slow on the Windows runner, so on a run that passes vitest reports 3 to 7 s for one of these tests, setup included, against its 5 s test default and 10 s hook default. A process-start stall then tips one over. #197 gave `clone.test.ts`'s `beforeEach` 30 s for this reason, but left the test bodies and the other two files at the defaults. These are the six windows runs that timed out this way on 2026-10-11: - **`main` at `e791a11`** ([run](https://github.com/okamnesiac/field/actions/runs/38176898514)): clone's "accepts a full URL" and push's "pushes, then offers every entry beneath main", each at 5 s. - **#212** ([run](https://github.com/okamnesiac/field/actions/runs/38179875094)): clone's "expands the short name" at 5 s, reported at 9.1 s, and pull's `beforeEach` at 10 s, reported at 11.0 s. - **#219** ([run](https://github.com/okamnesiac/field/actions/runs/38189357197)): push's "pushes, then offers every entry beneath main" at 5 s, reported at 14.2 s. - **`live/monitor`** ([run](https://github.com/okamnesiac/field/actions/runs/38173858309)): push's "pushes without a remote" at 5 s. - **`projector-agents-v4`** ([run](https://github.com/okamnesiac/field/actions/runs/38173650201)): pull's `beforeEach` at 10 s. - **`install/release-installer`** ([run](https://github.com/okamnesiac/field/actions/runs/38171418583)): push's "offers nothing for a working tree with uncommitted changes" at 5 s. These read as slow runs rather than hangs. Vitest can fire a timeout only when the event loop is free, and these tests spend long stretches in synchronous git calls. So a test reported well past its limit, such as the 14.2 s push on #219, was still making progress until the timer fired. On that run the whole push file took 33 s against 17.6 s on `main`'s passing run, so the runner was slow across the board. All three files now give their `beforeEach` and every test in their `describe` 30 s, through one `GIT_HEAVY_MS` constant per file, as `release.test.ts` gives its git-heavy tests. `clone.test.ts`'s `SETUP_TIMEOUT_MS` becomes that constant. 30 s is twice the slowest timed-out test, so a timeout there now means a stall twice as long as any seen, or a real hang. This differs from the "runner stalls" #197 left alone in `project.test.ts` and `live-session.test.ts`, whose hooks are cheap and stalled once or twice. These tests use most of their budget on runs where nothing stalls. Raising vitest's `testTimeout` for the whole suite would also stop these failures, but it would hide real hangs everywhere else. The Windows plan records the item in §7.2 as done. The change touches tests and the plan, and no product code. ## Testing From the root of a checkout of `windows/remote-test-timeouts`, after `pnpm install --frozen-lockfile`. These three files need no native build. ```sh pnpm typecheck pnpm exec vitest run src/commands/clone.test.ts src/commands/push.test.ts src/commands/pull.test.ts project check ``` You should see `tsc --noEmit` print nothing, then `Test Files 3 passed (3)` and `Tests 22 passed (22)`, then "Project plans are valid." On macOS these tests pass with or without this change, so this only shows nothing broke. To see that the budget reaches both the hooks and the tests, shrink it and watch the timeout messages name the new value: ```sh sed -i '' 's/^const GIT_HEAVY_MS = 30_000;$/const GIT_HEAVY_MS = 100;/' src/commands/{clone,push,pull}.test.ts pnpm exec vitest run src/commands/clone.test.ts src/commands/push.test.ts src/commands/pull.test.ts 2>&1 | grep -oE '(Test|Hook) timed out in [0-9]+ms' | sort | uniq -c git checkout -- src/commands sed -i '' 's/{ timeout: GIT_HEAVY_MS }/{ timeout: 100 }/' src/commands/{clone,push,pull}.test.ts pnpm exec vitest run src/commands/clone.test.ts src/commands/push.test.ts src/commands/pull.test.ts 2>&1 | grep -oE '(Test|Hook) timed out in [0-9]+ms|Tests +[0-9].*' | sort | uniq -c git checkout -- src/commands ``` The first run should report only `Hook timed out in 100ms`, because every setup hook now fails first. The second should report `Test timed out in 100ms` and `Tests 9 failed | 13 passed (22)`, beside the tail of vitest's `Failed Tests 9` banner: the nine tests that wait on a real clone, push, or pull time out, and the rest finish synchronously. A `5000ms` or `10000ms` in either run means a hook or test still runs on vitest's default, and the change is wrong. The `sed -i ''` form is BSD sed, as on macOS. Each `git checkout -- src/commands` puts the files back, and the tests remove their own temp projects, so nothing is left behind. The real check is this pull request's `windows` CI job, which cannot run by hand here. Its `pnpm test` step should pass all three files. A `Test timed out in 5000ms` or `Hook timed out in 10000ms` naming `clone.test.ts`, `push.test.ts`, or `pull.test.ts` means the change is wrong. A `30000ms` timeout there would be a new finding: a stall longer than 30 s, or a hang. One green run proves little against a failure that came every few runs, so the evidence builds over the next runs on `main`. <!-- projector-summary v=1 sha=205b0caa95d297c0823c7746b262708791e78577 --> 📽️ **Projector summary** of 205b0ca: https://field.amnes.ac/reviews/220
The `models-kept` row named only the Hugging Face cache, and printed only when that cache existed. field-aced's ACE-Step, about 10 GB, never goes there: `models_root` in python/aced picks FIELD_ACE_MODELS or ~/.field/models/acestep, and ACE-Step's `snapshot_download(local_dir=…)` writes the files into it. On this machine that directory holds 9.4 GB, against 4 KB of ACE-Step metadata in the Hugging Face cache. Only field-voiced's Chatterbox weights are where the row said. The uninstall now prints a row for each worker that was set up: ACE-Step's directory for field-aced, which every Field install on the machine shares, and the Hugging Face cache for field-voiced, which other tools share, with HF_HUB_CACHE ahead of HF_HOME as huggingface_hub reads them. docs/install.md, plan §3.5, §4, and §7.5, and the installer's comment on setting workers up again said every worker's weights were in the Hugging Face cache, and now say where each one's are.
…release okamnesiac/audiofield#43 merged before a release carries the uninstall target, so until then the file runs 0.3.0's installer, which rejects the target with a usage error and changes nothing.
ninjudd
left a comment
There was a problem hiding this comment.
📽️ Projector review of 9b9357d · 0.7.10 · model gpt-6 · CLEAN · took 2m 23s
This change gives you field uninstall and an installer target that removes release files or a checkout's global pnpm link, while keeping foreign files and shared model weights. This head fixes the two earlier findings by checking which data directory a shim runs and reporting each worker's actual weights directory. The field.one uninstaller has shipped, but needs a release carrying this target to work.
2 finding threads: 2 resolved, 0 open
Covered 10 of 10 changed files; no generated files skipped.
Both earlier findings are fixed and verified at this head. No blocking finding remains.
- Shim ownership. The same temporary reproduction that deleted another install's shim at the earlier head now keeps it and names its data directory. The parser never evaluates shell text; the tests cover directory aliases and quoted paths.
- Model weights. ACE-Step's row matches
models_root, and Chatterbox's row respects its Hugging Face cache overrides. Worker detection occurs before versions are removed, and the new tests cover both workers and a single configured worker. - Integration. The command continues to delegate to the installer, preserves its exit status, and keeps checkout files. The full PR diff and the new commits were reviewed together.
- Validation.
pnpm typecheck,pnpm exec vitest run src/install.test.ts src/commands/upgrade.test.ts,project check, andbash -n install.shpass. - Plan state. The install plan stays
in-progress; its earlier domain question predates this change. The updated deployment reference matches merged okamnesiac/audiofield#43.
# Conflicts: # docs/projects/install/readme.md # install.sh
ninjudd
left a comment
There was a problem hiding this comment.
📽️ Projector review of ed7690c · 0.7.10 · model gpt-6 · CLEAN · took 3m 22s
This change gives you field uninstall and an installer target that removes release files or a checkout's pnpm link while keeping foreign files and shared model weights. This head merges main's prerequisite checks and resolves the installer and plan conflicts, retaining uninstall's shim-ownership checks and renumbering it to chunk 7.
2 finding threads: 2 resolved, 0 open
Covered 10 of 10 changed files; no generated files skipped.
This is a full review of the merged head. review.gate is unset, so incremental review cannot satisfy the gate required when the merge base moves.
- Merge resolution.
install.shretains main'srequire_toolscalls for build targets and keeps the new shim helpers. No caller of the removedrequire_fetch_toolsremains. Uninstall bypasses build prerequisites in both release and checkout modes. - Earlier findings. Both resolved P2 findings remain fixed: a shim for another data directory stays, and each configured worker's own weights directory is named before its version is removed.
- Integration. The full PR diff preserves the command's installer handoff and exit status, ownership checks, foreign files, and checkout contents. The plan records uninstall as chunk 7 alongside main's dependency-checking work.
- Validation.
pnpm typecheck,pnpm exec vitest run src/install.test.ts src/commands/upgrade.test.ts,project check, andbash -n install.shpass.
No blocking finding remains. The plan stays in-progress; the domain decision brought in from main is settled on field.one, and this change introduces no new question.
Field can now be installed with one command, so it should be removable with one too. Until now, removing a release install meant
rm -rf ~/.local/share/field ~/.local/bin/fieldfrom the docs, and removing a checkout install meant knowing to runpnpm remove -g field. This addsfield uninstall, which runs the installer's newuninstalltarget the same wayfield upgraderuns the installer. Likefield upgrade, it uses a checkout's owninstall.sh, or the newest release's.In a release install, the target removes only what the installer can show it made, using the same tests
pruneuses. That means the shim when it carries the installer's marker and runs this data directory'scurrent, every version and download the installer made,current,release.conf, and JUCE's download incache/fetchcontent. It then removes the data directory if nothing else is left in it. Anything else in the data or bin directory stays, with akeptrow, becauseFIELD_DATA_DIRcan point at a directory that holds other things. The shim goes first, sofieldnever runs a half-removed version. A shim that runs another data directory stays, with akeptrow naming that directory, so an install made withFIELD_DATA_DIRkeeps itsfield. The model workers' weights stay where each worker keeps them, and the uninstall names them per worker that was set up: ACE-Step's inFIELD_ACE_MODELSor~/.field/models/acestep(about 10 GB), and Chatterbox's in the Hugging Face cache, which other tools share. For an install that follows a fork, the closing "to install again" row names the fork's installer. In a checkout install, the target runspnpm remove -g fieldonly when pnpm's globalfieldlinks that checkout, and never deletes the checkout.curl -fsSL https://field.one/uninstall.sh | bashwill be the way to uninstall whenfielditself no longer runs. That is a static file in okamnesiac/audiofield'sapps/field-one/publicthat runs this target, so the logic stays in the one versioned, tested installer. It can merge only after a release that carries this change, because 0.3.0's installer rejectsuninstallas an unknown target. The README anddocs/install.mdmention it, and field.one's page doesn't. Plan §3.5 records the design, with a §4 decision listing the alternatives that lost: a seconduninstall.shhere, and a TypeScript-onlyfield uninstall.This change also brings a few lines up to date now that field.one serves the installer. The README,
docs/install.md, anddocs/cli.mdlead withcurl -fsSL https://field.one/install.sh | bash, and the installer's header comment does too.docs/release.md's example bumpspatch, since releases are patch bumps from here on. Plan §10.3 records the first real install from GitHub (0.3.0, 255 s on a Mac). Plan §6 marks chunks 3 and 4 shipped and adds this one. field#218 also edits §6 andinstall.sh, so whichever of the two merges second needsmainmerged in.Testing
From the repository root of a checkout of
install/uninstall, afterpnpm install --frozen-lockfile:Run
pnpm exec vitest run src/install.test.ts src/commands/upgrade.test.ts. It should report 110 tests passed, with no unhandled errors. The newinstall.sh uninstallblock runs the real installer under bash 3.2 against stand-ins and checks these cases:current,release.conf, the cache, and the data directory are all gone, and no pnpm or curl command runs.fieldin the bin directory and other things in the data directory, such as3.11.4/bin/python3, are kept and named.FIELD_ACE_MODELSandHF_HUB_CACHEmove them to.pnpm remove -g fieldfor its own link, and the checkout's files stay.src/commands/upgrade.test.tschecks thatfield uninstallhands the installeruninstalland returns its exit status, and that it refuses on Windows by namingpnpm remove -g field. If an uninstall test fails with the data directory "kept" though it's empty, the tests' PATH has lostrmdir, which this change adds to the harness's tool list.At the first head,
ef4ef2e, the full gatepnpm typecheck && pnpm build && pnpm test && project checkgave 91 files, 1277 passed and 1 skipped, no unhandled errors, and valid plans. At9b9357d,pnpm typecheck,project check, and step 1 pass, and CI runs the full suite.To run it end to end, without GitHub or your own
~/.local, use the harness steps from Install a release without a clone: the release installer, and field upgrade for release installs (install.md chunk 3) #214's Testing section: setFIELD_DATA_DIR,FIELD_BIN_DIR,FIELD_RAW_URL, andFIELD_ARCHIVE_URLto a temporary directory,cuta version from this commit, install it, and then run:I upgraded a harness install from 0.93.0 to a stand-in 0.95.0 cut from this commit, then ran
field uninstallthrough its shim. It printed+ curl -fsSL file://…/v0/install.sh | bash -s -- uninstall, thenremoved …/bin/field,removed 0.93.0,removed 0.95.0,removed …/data, anduninstalled to install again: curl -fsSL https://field.one/install.sh | bash, and exited 0. Bothlstargets were gone. Iffieldcrashes after removing its own version, or the data directory survives with nothing foreign in it, the change is wrong.Not run:
field uninstallagainst your real~/.local/share/field. That would remove your 0.3.0 install, which another session's tests currently use throughFIELD_AUDIOD.📽️ Projector summary of ed7690c: https://field.amnes.ac/reviews/219