Repository navigation
Add login, clone and the read-through cache against an audiofield remote (remote.md chunks 2–3, clone half of 4) - #171
Conversation
…ote (remote.md chunks 2–3, clone half of 4) The CLI half of audiofield.io begins here. The remote is a second action cache keyed by the action key that already exists: a local miss in build asks it before rendering, a hit is hashed on the way down and lands in the same CAS and index a local render would, and clone warms the closure of every song's main so the first build on a fresh machine renders nothing. login mints a token by device code and keeps it in the keychain or ~/.field/credentials; clone expands owner/project, refuses without git-lfs, and configures Git to share the token. One git helper replaces the two spawns init and version each had. One pull request rather than three because the warm is the read-through with git clone in front of it and login is what makes a private clone possible, so none of the three was verifiable without the others. The site does not serve the API yet; everything is tested against an in-process stub and a bare repository, and against audiofield.io today every verb says so and stops. Claude-Session: https://claude.ai/code/session_015bwFCc1p8PvPiykdhhCWVs
minjudd
left a comment
There was a problem hiding this comment.
🔭 Projector review · model claude-opus-5[1m] · effort xhigh · CHANGES REQUESTED · took 2m 04s
1 finding thread: 0 resolved, 1 open — this review opens it.
The thing #168's plan said had to happen, happens. That review turned on §2's claim that CAS reads are unverified and that a fetched output must be hashed before it lands at casPath(), with the hash check on the fetch path rather than inside materialize. fetchAction does exactly that: it downloads to a per-process temp name, compares both sha256 and bytes against the entry, rmSyncs and returns a miss on any disagreement, and only then renameSyncs into the CAS. A wrong remote costs a render and cannot poison the cache, which is the property the tamper-guard comment was worried about. materialize is untouched, so the swap invariant it carries is intact.
Two details there worth crediting. Presigned URLs never reach the index — the stored ActionEntry is rebuilt from sha256/bytes alone, so an expiring credential is not persisted. And existsSync(target) continue skips bytes this machine already holds under that hash, with a comment naming the real case (a stem and a mix of one silent input being the same bytes).
Credential handling is careful in the places it is easy to be careless. The file fallback writes 0600 into a 0700 directory via tmp-plus-rename, and follows writeFileSync's mode with an explicit chmodSync because the mode argument is masked by umask — a real subtlety, correctly handled. FIELD_TOKEN overrides storage and is never written back. Errors name this.base and never the token. And the one genuine weakness is disclosed rather than hidden: the comment on add-generic-password says the secret rides argv where ps can see it for the length of the call, and why the alternative was declined.
Tooling: tsc --noEmit clean, full suite 747 passed / 25 skipped / 0 failed, merges cleanly with main at 24b7499.
The one finding is below, and it is the gap between §4's first sentence and what the code accepts.
remote.md §4 says every conversation is HTTPS, and nothing enforced it: parseCloneUrl accepted http for any host, so an origin of http://git.example.com/owner/project yielded an API base the client then sent a bearer to, and `login --remote http://…` reached the same place by a shorter route (minjudd on #171). RemoteClient now refuses any base that is not https or loopback http before the first request, whichever route produced the URL, so neither a token nor a device-code exchange can cross in the clear. An origin on cleartext yields no remote at all rather than a remote every build fails against, since its scheme was inherited from `git remote get-url`; a typed FIELD_REMOTE or --remote on cleartext is refused loudly. Loopback stays open, which is how a site on this machine and the test stub are reached. Claude-Session: https://claude.ai/code/session_015bwFCc1p8PvPiykdhhCWVs
minjudd
left a comment
There was a problem hiding this comment.
🔭 Projector review · model claude-opus-5[1m] · effort xhigh · APPROVED · took 2m 16s
1 finding thread: 1 resolved, 0 open.
5b206c1 is clean, and the fix is placed better than the one I proposed. I suggested tightening parseCloneUrl, which would have covered the origin route and left FIELD_REMOTE and --remote reaching the same network with the same token. cleartextReason in the client constructor is the chokepoint all three routes pass through, so the rule holds however the URL was produced.
I exercised the classifier rather than reading it, because loopback checks are exactly where a plausible-looking predicate quietly admits something:
ALLOW https://audiofield.io REFUSE http://git.example.com
ALLOW http://localhost:3000 REFUSE http://example.com
ALLOW http://127.0.0.1:9 REFUSE http://localhost.evil.com
ALLOW http://127.1.2.3:80 REFUSE http://127.0.0.1.evil.com
ALLOW http://[::1]:3000 REFUSE http://0.0.0.0:80
ALLOW http://2130706433/ REFUSE not a url
http://git.example.com is the case from the finding, now refused. The two suffix-confusion attempts are refused because both comparisons are exact or anchored. The IPv6 bracket stripping is real and needed — http://[::1]:3000 reads back as [::1]. And http://2130706433/ allowing is correct rather than a hole: URL normalises the decimal form to 127.0.0.1 before the regex sees it, so the obfuscation that defeats naive checks resolves to the loopback it actually is.
The judgement I said I would leave to you is resolved, and in both directions rather than one. A cleartext scheme inherited from git remote get-url yields no remote at all — the project simply has none, with a reason that now says why — while FIELD_REMOTE and --remote are typed and refuse loudly through the constructor. That distinction is the right one: the first was never a decision anyone made, and failing every build against it would punish someone for their origin URL.
I checked the throw is caught where it matters. remoteReads sits inside the build action's try at cli.ts:518, and login and logout construct inside theirs, so a typed cleartext base is a clean CLI error rather than a stack trace.
Tooling: tsc --noEmit clean, full suite 749 passed / 25 skipped / 0 failed — up from 747, the difference being the cases added to origin.test.ts and client.test.ts. Docs moved with the code: the plan records the amendment and docs/remote.md says the rule.
The rest of the pull request stands as reviewed at the previous head — the fetch path hashes and length-checks before renameSync into the CAS, presigned URLs never enter the index, and the credentials store is 0600 with the umask subtlety handled.
Merging is still yours.
git.audiofield.io went live before the API did, and a read-only probe showed what clone's config would have done to an anonymous clone: with http.proactiveAuth=basic set and no credential, Git asks for a username before its first request, even against a public repository (git/git answers an anonymous ls-remote and aborts the proactive one). So a public project cloned without logging in would have prompted. clone now configures the credential helper always and proactive auth only when resolveToken finds a token for the remote at clone time. A login after an anonymous clone costs that checkout one 401 probe per push until push sets the option itself. The plan's decision 13 carries the amendment and §10 records what the live host answered. Claude-Session: https://claude.ai/code/session_015bwFCc1p8PvPiykdhhCWVs
minjudd
left a comment
There was a problem hiding this comment.
🔭 Projector review · model claude-opus-5[1m] · effort xhigh · APPROVED · took 1m 17s
1 finding thread: 1 resolved, 0 open.
8ddd321 is clean. Re-approving because the push dismissed the approval on 5b206c1 — reviewDecision went back to REVIEW_REQUIRED, which is the ruleset working as intended rather than anything wrong with the commit.
This one is a fix for a bug nobody had reported, found by probing rather than reasoning, and the comment says which: with http.proactiveAuth=basic set and no credential to answer with, Git asks for a username before its first request, so an anonymous clone of a public project turned into a prompt. Making the option conditional on actually holding a token is the right shape — the credential helper is still set unconditionally, so the pairing survives a later field login.
I checked the mechanism rather than taking the comment's word for it. field git-credential writes nothing when it has no answer (cli.ts:183, if (answer !== undefined)), so with proactive auth on and no token Git gets an empty helper response and falls through to prompting — exactly the failure described. The token lookup is keyed by remote.api, so holding a token for a different site does not switch it on for this one.
One consequence worth knowing rather than fixing: a repository cloned anonymously keeps the helper but not the option, so after a later field login its pushes pay a 401 probe before the helper answers. That is correct and cheap, and re-deriving the config on login would be a larger change than it earns.
Tests pin both branches — withToken: true yields both pairs, withToken: false yields the helper alone — and docs/remote.md now states the rule with its reason, so the next reader does not re-derive it.
Tooling: tsc --noEmit clean, full suite 749 passed / 25 skipped / 0 failed. gitConfigForRemote's signature changed and the only non-test caller moved with it.
Everything from the earlier heads stands: the cleartext refusal at the client constructor covering all three routes, the fetch path hashing and length-checking before renameSync into the CAS, presigned URLs never entering the index, and the 0600 credentials store with the umask subtlety handled.
Merging is still yours.
Three findings about Git's side of the token, from audiofield's read of #171 against the live host, sharing one cause: clone configured Git's credential handling from what it could see at clone time, and Git's credential machinery reaches further than that. The helper answered any https git.* host — `git.sr.ht` derives an API like anything else, and clone registers the helper for whatever it cloned — and resolveToken handed back FIELD_TOKEN or the FIELD_REMOTE token for any API, so a fetch from sr.ht with FIELD_TOKEN set would have sent the audiofield token there. Now only the remote the shell points at gets the full resolution, environment included; any other host gets a token someone logged in to it by name, or nothing. The helper was appended after whatever global helper the machine had, and osxkeychain stores a credential on the first success and serves it first ever after — a copy logout never erases. The helper now sits behind an empty value that resets the list for the host. And http.proactiveAuth, set when a token was held at clone time, was a snapshot: after logout that checkout would prompt for a username on every fetch. clone no longer persists it; push and pull will pass it per invocation, the only moment the fact is known to be true. Claude-Session: https://claude.ai/code/session_015bwFCc1p8PvPiykdhhCWVs
…sage Three client findings from audiofield's read of #171, sharing one cause: the client trusted the transport to fail fast and to answer in kind. No request had a timeout, and cache.ts promised one line "once per build" as if the wait before it were short; undici's default is about five minutes, so a black-holed remote would have held a build that long. API requests now carry a 15 s deadline and downloads a 30 s idle timer that re-arms per chunk, so a slow link is fine and a stalled one is not. fetch followed redirects, and the live apex 307s every path to field.one; the CLI would then have talked to whatever the redirect pointed at and reported the wrong host's answer. API requests are now redirect: manual and a 3xx is a protocol error naming the destination. A 400 from any endpoint was parsed against the success schema, since the token poll needs that, and every other endpoint's message vanished behind "a shape this CLI does not know". Only the poll tolerates a 400 now; elsewhere the server's message is the error. Claude-Session: https://claude.ai/code/session_015bwFCc1p8PvPiykdhhCWVs
minjudd
left a comment
There was a problem hiding this comment.
🔭 Projector review · model claude-opus-5[1m] · effort xhigh · APPROVED · took 2m 00s
1 finding thread: 1 resolved, 0 open.
0e0630c is clean. Two commits since the head I approved, both hardening nobody asked for, and one of them closes a leak I did not catch.
b255d46 is the one I want to name first, because it fixes something I reviewed past twice. Git credential helpers are a list, and a global osxkeychain — configured on more or less every Mac that has ever used GitHub — sits ahead of a per-host addition and would be handed the Field token to store a copy of. The reset-then-set pair closes that:
credential.https://git.audiofield.io.helper = ''
credential.https://git.audiofield.io.helper = '!field git-credential'
The empty value first resets the list for that host, so only Field's helper answers. I had looked at this config twice and read it as a straightforward addition, which it was not.
The test that pins it is the right kind. It does not assert on gitConfigForRemote's return value alone — it writes the pairs into a real repository with git config --add and reads them back NUL-separated, so what is being verified is Git's treatment of an empty value as a reset, not this codebase's belief about it. That is the assumption worth testing, since it belongs to another program.
Dropping http.proactiveAuth entirely supersedes the conditional I approved two heads ago, and the reasoning is better than mine. I accepted "set it when a token is held"; the argument here is that it is a property of now and any clone-time value goes stale — an anonymous clone prompts, and so does any checkout after field logout. Push and pull pass the token per invocation instead, which cannot go stale. That is the right correction to a decision I signed off on.
0e0630c's three changes each hold up. redirect: 'manual' with an explicit 3xx refusal matters because following one would hand the bearer to whatever the Location points at; the live case in the comment is an apex sending every path to a marketing site. I went to check whether Node returns an opaque status-0 response for manual redirects the way browsers do — which would make the check dead — and the test settles it against a real in-process server, asserting the message names /api/hello and the target.
The timeout split is the correct one: a flat 15s deadline for small JSON, and a 30s idle timer for downloads that re-arms per chunk, so a large artifact on a slow link is not mistaken for a stall. And allow400 is now scoped to the device-token poll alone, where RFC 8628 really does put authorization_pending behind a 400 — everywhere else a 400's message reaches the user instead of being hidden behind a shape complaint.
One thing I checked and it is fine: download deliberately does not set redirect: 'manual', which presigned object-storage URLs need. It carries only a user-agent and no authorization, so a redirect there cannot leak the token, and the bytes are hash-and-length checked before they reach the CAS regardless of where they came from.
Tooling: tsc --noEmit clean, full suite 755 passed / 25 skipped / 0 failed, up from 749 with the new redirect, timeout, 400 and git-config cases. Merges cleanly with main at ca065ec.
Merging is still yours.
…ck the destination first Four clone findings from audiofield's read of #171, sharing one cause: clone reported and guarded on what it assumed rather than what it had checked. After the warm's first lookup failed, RemoteReads printed "building locally" — nothing is built — and every song then said "nothing cached on the remote yet", which was false. RemoteReads now prints that suffix only for a caller that will build, and records the failure for the warm to report per song as "not warmed — <reason>". The LFS refusal ran `git lfs version`, which answers on a machine where `git lfs install` never ran, and the checkout then landed pointer files anyway — the thing decision 6 exists to prevent. Every clone now carries the four filter.lfs.* settings as `clone -c` config, so the initial checkout smudges regardless of global config, and runs `git lfs install --local` afterwards for the hooks a push needs. The clone test asserts the transfer wherever the binary exists instead of skipping when the global filter is absent. FIELD_REMOTE=off still expanded a short name against the default site; that expansion is a read, so it is refused with a pointer at the URL form. And the destination-exists check moved ahead of the resolve call, so a refusal costs no round trip. Claude-Session: https://claude.ai/code/session_015bwFCc1p8PvPiykdhhCWVs
minjudd
left a comment
There was a problem hiding this comment.
🔭 Projector review · model claude-opus-5[1m] · effort xhigh · APPROVED · took 1m 19s
1 finding thread: 1 resolved, 0 open.
d349fb6 is clean. Four independent corrections, each with a test that pins the thing that was actually wrong rather than the code that changed.
The LFS filters as -c is the one with real teeth. Decision 6 refuses to clone without git-lfs, but the binary being on PATH is not the filters being configured, and the initial checkout happens inside git clone — before anything can be run in the new repository. So a machine where git lfs install had never been run would have passed the refusal and still checked out pointer files into audio/, which is exactly the failure decision 6 exists to prevent. Carrying the four filter pairs on the clone makes the first checkout smudge; the --local install afterwards makes it permanent and adds the hooks a later push needs. The test reads filter.lfs.smudge and filter.lfs.required back out of a real clone, which is the right assertion — it checks Git's resulting state, not this function's return value.
FIELD_REMOTE=off expanding a short name against the default site was a genuine contradiction, and refusing with a message that points at the URL form is the right resolution rather than silently falling back.
Moving the destination check ahead of the network is small and correct, and the test names the property — "before any request" — rather than just the refusal, so the ordering is what is pinned.
The fallback/failure split fixes an honesty bug I would not have thought to look for. RemoteReads hard-coded "building locally" into its notice, which is true for a build and false for a warm, where nothing is built — and worse, the warm then reported "nothing cached on the remote yet" for a song whose remote had stopped answering. Now the suffix is the caller's to supply, and a warm with no fallback reads failure and says why per song. That the same object serves two callers with different truths is the kind of thing that stays wrong for a long time because each caller looks right on its own.
One behaviour change worth noting rather than filing: the clone directory for a short name now comes from the name you typed rather than the basename of the URL the API resolved it to. If those ever disagree — a renamed project answering with a canonical URL — the directory follows what you asked for. That seems the better of the two, and it is what makes the destination check possible before the request.
Tooling: tsc --noEmit clean, full suite 757 passed / 25 skipped / 0 failed, up from 755. Merges cleanly with main at ca065ec.
Everything from the earlier heads stands — the credential-helper reset, the cleartext refusal at the constructor, redirect refusal, the request and idle deadlines, and the hash-and-length check before anything reaches the CAS.
Merging is still yours.
The merge of main brought in recording (#166 to #170) and the remote (#171, #172), and the manual predated both. It now has a "Record a take" section and a "Share a project through a remote" section, rows for record, login, logout, clone, push and pull, `fetched` in the build vocabulary, `choose --take`, the input device list, and FIELD_REMOTE and FIELD_TOKEN. The play section said a live song refuses `--click` and `--from` with `--loop`. Both work: the engine synthesizes the click, and `--from` with `--loop` is a region loop on the live session. The section now says what each does. The `--version`, `devices`, `transport status`, `export` and `import` transcripts are rerun at this head, and the install section says every stem renders through field-audiod, not only effect inserts.
The CLI half of audiofield.io begins here, per
remote.md(#168): the remote is a second action cache keyed by the action key that already exists, never a second source of truth, and nothing in Field renders remotely or edits collaboratively. This lands chunks 2 and 3 and theclonehalf of chunk 4 together, because the warm is the read-through withgit clonein front of it andloginis what makes a private clone possible, so none of the three was verifiable without the others. Chunk 1 (--json,license) andpush/pullremain; the plan's §10 records the split.What is here
src/git.ts(decision 10): one way to spawn Git, throwing Git's own stderr as the message.initandversionmove onto it; they had disagreed on whether a failure throws or returnsundefined.src/remote/:protocol.tscarriesREMOTE_API_VERSION = 1, the paths, and the request and response shapes as zod schemas so the site's tests can import the same file;client.tsis one request per method over Node's globalfetchwith a hello checked once per client and four error kinds;credentials.tsis the keychain store throughsecurityon macOS and~/.field/credentials(mode0600) elsewhere, behind one interface with thesecuritycall injected;origin.tsreads the remote from Git;cache.tsis the read policy the engine sees.build()andexplain()(§3.4): a local miss asks the remote, a hit downloads each output to a temp file, hashes it, compares against the entry's hash and size, and only then renames it into the CAS and writes the entry. The build saysfetchedwhere it saidcached;explainreports the same. A miss is silent; an unreachable remote, a refused token, or a protocol skew prints one line on stderr once per build and the remote is not asked again that build; a download whose hash disagrees is discarded and reported.--no-remoteskips it for one build or explain.playandexportread through;--watchand the live session do not (decision 15, §9.12).login,logout,git-credential(§3.1): the RFC 8628 device flow, the token stored per remote and never printed,FIELD_TOKENas the override that is read and never written,--versiongrowing a line that names the remote, where its URL came from, and whether a token is held. The hiddengit-credentialcommand answers Git'sgetfor agit.<site>host with the token filed under<site>.clone <owner>/<project> [dir](§3.2): refuses before touching the network withoutgit-lfs, resolves the short name through the API, clones withhttp.proactiveAuth=basicand the credential helper configured in the new checkout (only for an audiofield git host), then warms every song'smainand every rule node beneath it — the index as well as the bytes, becausereadActionis what makes a hit and a key is computed from its dependencies' output hashes. A full URL is accepted anywhere a short name is. The warm writes only under.field/, so a warmed checkout is a clean one.docs/remote.mdis new and linked from the README,AGENTS.md,architecture.md, andbuild-graph.md. The plan flips toin-progressatpriority: now, gains decisions 12–15 in §5, the path table in §4, an answer under each §9 question, two new questions (§9.11, §9.12), and a §10 progress log.Decisions this PR makes, for the record
Which remote (decision 12): the origin's host
git.<site>implies the API at<site>, and the last two path segments name the project.FIELD_REMOTEreplaces the API base and nothing else, which is what lets a test clone from a bare repository at/remotes/howlo/chemicals.gitand talk to an in-process stub abouthowlo/chemicals.FIELD_REMOTE=offdisables reads. An origin Field does not recognize has no remote, so nothing about an ordinary project changes.The engine's default is no remote (decision 14, refining 11):
build()andexplain()take aRemoteReadsand do nothing without one;remoteReads()insrc/commands/build.tsis the command layer's resolution. The alternative would have had every build test spawngit remote get-url.A recipe-only song cannot be warmed (§9.11, the one question for the sync): a generative request with no takes mints no node, so nothing above it has an action key and the remote cannot be asked.
clonereports it per song in the wordsbuilduses (tall-grass: not warmed — //songs/tall-grass/gen:topline has no takes yet). Decision 9 assumed the remote could answer for such a project; by key it cannot, and by label it would need aplaythat skips the graph walk. The honest v1 answer isfield generate, which is what bloom-in-tree.md §7 already says.Priority (§9.1): set to
nowbecause implementation began the night the plan merged, at Justin's ask; flip it back if that is wrong, the plan notes why it moved.Git's side of the token, after the live host and a second read (decisions 6 and 13 amended, plan §10):
clonepersists nohttp.proactiveAuth— with it set and no credential, Git asks for a username before its first request, so an anonymous clone or any checkout afterlogoutwould prompt;pushandpullwill pass it per invocation. The credential helper is registered behind an empty value that resets the helper list for the host, so a global osxkeychain helper never caches a copy of the token, and it answersFIELD_TOKENor theFIELD_REMOTEtoken only for the remote the shell points at, never for some othergit.*host it happens to be asked about. Every clone carries the LFS filters as-cconfig and runsgit lfs install --local, so pointer files cannot land even wheregit lfs installwas never run globally. The client bounds every request (15 s) and download (30 s idle), refuses to follow an API redirect, and surfaces a 400's message. A failed warm reportsnot warmed — <reason>per song;FIELD_REMOTE=offrefuses to expand a short name; the destination check runs before any request.What this does not do yet
The site does not serve the API: against
audiofield.iotoday every verb sayshttps://audiofield.io is not an audiofield remote (no /api/hello)and stops, which is the protocol check refusing rather than a crash. Every path is tested against an in-processnode:httpstub (src/testing/fake-remote.ts) and a real bare Git repository.push,pull, the artifact offer,--json, andlicenseare the next PRs. Thesecurity add-generic-passwordcall takes the secret on argv, visible topsfor the instant of the call; the tool has no stdin form, and a native binding was what decision 5 declined.Testing
From the checkout, on this branch:
pnpm buildmakes thefieldon your PATH current.pnpm testruns 781 tests (721 on main); the daemon tests needfield-audiodbuilt (pnpm build:native) orFIELD_AUDIODpointing at one, which is unchanged by this PR. The new files alone:The one to watch is
src/commands/clone.test.ts: it builds a project with a fake runner, commits it (LFS audio included), pushes to a bare repository under a temp directory, serves the short name from the stub, clones throughfield clone, and then builds the clone with a runner that throws if anything renders.src/graph/remote-cache.test.tshas the tamper test the plan asks for: a blob whose bytes disagree with its entry never appears under.field/cache/cas/. The clone test also asserts the LFS audio arrived intact through thefile://remote wherever thegit-lfsbinary exists, since the clone carries its own filters; only a runner with nogit-lfsat all printsclone.test: git-lfs is not installed here; skipping the LFS transfer assertion— the CI log for this PR says which.The version line, in the example project:
The third line is new:
remote https://audiofield.io (default) not logged in. Before this PR there was no such line.FIELD_REMOTE=off field --versionsaysremote off (FIELD_REMOTE=off), andFIELD_TOKEN=x field --versionsaystoken from FIELD_TOKENwithout printingx.The verbs against the site as it stands, from any directory:
Both stop at the protocol check and exit 1, and
clonecreates no directory. Today the apex redirects every path to field.one, so the line ishttps://audiofield.io redirects /api/hello to https://field.one/api/hello — the API must be served directly; once the redirect is gone and before the API lands it becomeshttps://audiofield.io is not an audiofield remote (no /api/hello).FIELD_REMOTE=http://127.0.0.1:1 field loginprintshttp://127.0.0.1:1 is unreachable. If either hangs or creates achemicalsdirectory, that is the bug.FIELD_REMOTE=http://staging.example field loginis refused before any request:refusing to send a token in the clear to http://staging.example — a remote must be https (plain http is allowed only for localhost); before5b206c1it would have tried to connect.Unchanged behaviour to confirm: in
examples/bloom,field explain //songs/creek/track:drumsprints what it did before with noremote:line, because the example's origin is GitHub and Field has no remote for it, andfield checkstill saysok.field build --helpandfield explain --helpeach list--no-remote;field --helplistslogin,logoutandcloneand does not listgit-credential, which is hidden because only Git calls it.Nothing here writes outside the checkout unless a site answers a
field login, which none does yet; the tests write only under temp directories.https://claude.ai/code/session_015bwFCc1p8PvPiykdhhCWVs