Repository navigation
v0.8.0
Binding a tracker now costs only what it changes. Switching on a branch
database no longer reinstalls anything, a drop takes down what the tracker
brought, a re-bind gets its old ports back, and several resources can
render into one file. status tells a crashed dev server from a stopped one
and a compiling one from a broken one. newgit.dev gives a clone the
project's own commit ids, signatures included, and newgit tracker repair
fixes history split before that. On macOS, spawn clones source with
clonefile, and capture no longer follows a symlink out of the workspace.
See Upgrading.
Added
-
newgit tracker repair [--dry-run]rewrites code tracker commits split
before newgit kept each original's message ending and signature, so a
clone from newgit.dev gets the project's own commit ids again.It moves every code tracker branch here and, on the remote, each
branch's list, the way a merge does: a force push of tracker history.
Instance forks and checkpoints there keep the commits they were made
with. Run it once after upgrading; running it again changes nothing.
Changed
-
On macOS,
spawnclones a workspace's source from a template checkout
withclonefileinstead of runninggit clone
(#235).git clonespent almost all of its time checking files out: 2.7–3.1s
per spawn on T3 Code's 28.6k files. newgit now keeps one clean checkout
of the project beside the workspaces (.source-templateunder the
workspace root), brings it to the instance's revision, and clones the
whole tree in one call, in 0.67s. The first spawn builds the template
and is slower once. Workspaces are set tocore.checkStat=minimaland
core.trustctime=false, which letgit statustrust the cloned files
instead of re-hashing every one; the only edit Git then misses is one
that keeps a file's size and has its mtime set to the exact second Git
recorded, astouch -rcan. Checkpoints hash every file, so they
capture it regardless. Anything that stops the template from working,
such as a workspace root on another volume, falls back togit clone,
andspawnsays why. -
Checking a built tree for its workspace path, before it is stored, now
reads the tree in parallel
(#235).Every install that could be stored is scanned for the workspace's path
first, and the scan read the whole tree on one thread: on T3 Code's
3.8 GB ofnode_modulesthat took 17–34s, longer than the install it
was checking. It now walks the tree on every core and searches with
memchr, and takes 3.4–3.8s on the same tree, about what
rg -uuu -Ftakes. -
Several resources may now
[[render]]into the same file, each declaring
only the values it owns
(#245).One file often needs values from several resources: an app's
.env.local
wants its own port and the database's URL. With one owner per file, every
rule had to live on whichever resource got the file, so adbdefinition
ended up knowing every app's env files. Now the file is one simultaneous
batch over every resource's rules, located in committed content, so it
does not depend on which resource bound first; capture, undo, and drift
work on all of them, andtracker droptakes back only the dropped
resource's values. Two resources claiming the same text are still refused,
and the error now names both resources and bothfinds and points at
{{exports.NAME}}.
Fixed
-
The
supabasetemplate says what to do about aconfig.tomlthat lacks
a service's section, and offers a monorepoworkdir
(#242).The Supabase CLI uses a built-in default port for a service with no
section, so every instance shared it. A renderfindthat matches 0 times
now says so in its error and says to add the line rather than delete the
rule. The template comments explain it, and a commentedworkdirnotes
that[[render]] pathchanges with it. -
A dev server that is still compiling is no longer reported as not ready
(#243).spawnandstatusused to call a running process whose port had not
answered yet a problem, so a healthy Next.js spawn looked like a
failure. That is now its own state,starting: it does not count as not
ready, and the message says the process is still starting and that
newgit statusshows when it is up. After the autostart,spawnwaits up
to five seconds for the ports to answer and reports only what is still
unanswered;spawn --jsonlists it understarting. -
The
processtemplate says its port is optional
(#244).A worker, watcher, or
supabase functions servehas no port of its own.
The template comments now say to delete[ports],[exports]and
[[render]]for those, instead of leaving you to work it out. -
tracker drop, andtracker useon a role alternative, work for a
tracker with nopaths, andstatuslists only the trackers an instance
binds (#246).Dropping a secret tracker captured it from the workspace first, and a
tracker with nopaths(deposit-only, or one that only brings resources)
has nothing there, so the capture refused and the tracker could be bound
but never unbound — the branch database you switch on for a migration and
off afterwards needed aremoveand respawn. There is now no capture step
for such a tracker: its deposits are already in its lane, and a checkpoint
covers them.dropstops what it brings, and--stash/--discardhave
nothing to act on. An explicittracker capturestill says there is
nothing to capture.statusshowed every tracker in a role, including the
dropped alternatives; it now shows what the binding record binds. -
tracker listshows trackers with nopaths
(#247).The list is a tree by ownership, and a tracker that owns no paths had no
place in it, so it was silently left out — although the list is where you
check what--useaccepts, and thesupabasetemplate creates one. Such
trackers now come after the tree with their role, and PATHS says what they
are for:(no paths; deposits from db; brings db, functions). A spawn
from a checkpoint also saysdeposit-onlyfor them rather than
(0 files), matchingspawnandtracker pull. -
Binding a tracker that cannot change an install no longer rebuilds it
(#248).Since #153 the install store keyed a tree on the whole binding, and since
#206tracker use/droprebuilt every install when the binding moved.
So switching on a branch database (a secret tracker withpaths = [])
cost a fullnpm cifor an identical tree,--use branch-dband the
default binding each installed once at spawn, and creating or renaming
any tracker re-keyed every install.The key now holds only what of the binding can reach the install: which
paths the dropped code trackers leave out of the checkout (what an
unfilterednpm cireads by finding members on disk), plus the bound
tracker names and paths only when the install is told them through
{{bound…}}, in its own definition or in any resource's exports or
renders.use/dropand undo'srecomputeskip compare that same
material, so an install the change cannot reach is kept and not listed.An install that reads a secret tracker's file (an
.npmrc, say) should
name it in[identity] paths. Store entries keyed under the old scheme
stop matching, which costs one reinstall per key;newgit cleanup
reclaims them. -
tracker useanddropno longer leave a running dev server on a
rendered file they rewrote without saying so
(#249).Binding a tracker binds the resources it brings, and their
[[render]]
rewrites files such asapps/admin/.env.localthat a process already
running read when it started. That process kept the old port, and the
output gave no hint. A resource can now declarereads = [...], the
files and directories its process reads; when a use or drop changes the
bytes of one, the process is restarted, asundorestarts what it
restores. A running process whose resource declares nothing is named in
a warning with the command that restarts it. A re-render that writes the
same bytes says nothing. -
Dropping a tracker takes down the resources it brings, and
remove
tears down what a drop left behind
(#254).A drop, or a
tracker useswitching a role, used to stop supervised
processes and forget the rest: a Supabase stack or Compose project a
dropped tracker brought kept running, andremoveonly cleaned up what
was still bound, so it leaked them for good. A drop now parks each
resource it takes away, the waynewgit stoptakes one down: its process
is signalled and itssuspendruns (or its[cleanup], when it has no
suspend), and the output names the hook that ran, or why none could.
removeandcleanuprun[cleanup]for parked bindings too. -
Binding a resource again hands back the ports it had, so a resource
whosepreparefinds its old stack still up is not reported ready on
ports nothing listens on
(#255).A drop used to release a resource's ports and the next
useallocated
new ones, re-rendered, and ranprepare;supabase startsaw the old
stack and exited 0 without reading the new config. Ports are for the
instance's lifetime now: a parked binding keeps its claim (newgit ports
shows it as(parked), andports --checkcounts it), andusebrings
the resource back on it, throughresumewhen the drop ransuspend. -
The
supabasetemplate'spreparestops the stack before starting it
(#255).supabase startagainst a stack still running from an earlier binding
exits 0 without re-reading the rendered ports, so the resource reported
ready on ports nothing listened on.supabase stopkeeps the volume, so
the branch's data comes back on the new ports. -
Claude Code worktrees start from the project branch as it stands, not
the project root's checked-outHEAD
(#256).The
WorktreeCreatehook ran a plainnewgit spawn, so every subagent
started from the root's localmain. When nobody had pulled, that was
stale: in one run it was 20 commits behindorigin/main, and each agent
rebased itself by hand. The hook now does what Claude Code's own
worktrees do. By default it uses the project branch, fetching its
upstream if the root has not fetched in a day, and takes whichever of
the two is newer. A root branch that is ahead or has diverged wins. The
choice is made under a store-wide lock, so subagents launched together
start from the same commit. A failed fetch is not retried by the rest
of the burst.worktree.baseRef = "head"keeps the old behaviour.The first spawns in a project, run at once, no longer fail on each
other while creating the publish outbox. -
A checkpoint taken while the workspace is on another branch no longer
moves the instance's branch to it, and undo no longer resets whichever
branch happens to be checked out
(#259).Agents
git checkout -b try-xinside a workspace all the time. A
checkpoint used to treattry-x's HEAD as the instance's source and
silently move the instance's branch in the project repository to it, and
undothen resettry-xto the instance's old commit. Now a checkpoint
holds the workspace as it stands and records which branch was checked
out (or that HEAD was detached). The instance's branch moves only when
the workspace is on it, and the checkpoint says so when it is not,
naming both branches. Undo puts HEAD back on the checkpoint's branch and
moves only that one.mergerepeats the warning,statusshows
feature-a@1a2b3c4d (workspace on `try-x`), andcheckpointsmarks
the checkpoints taken off the branch. Refusing the checkpoint instead
would have blockedgit pushandundoexactly while an agent is
experimenting, which is when they matter most. -
tracker captureno longer rewrites text you typed that happens to equal
a rendered value
(#260).Capture reversed every occurrence of a rendered value, so a
MIRROR=127.0.0.1:18002line written by hand came back as:8000. The
tracker then held thefindtwice, and every instance spawned from it
failed to render until someone fixed the lane by hand. Capture now
reverses only the spans the render wrote, recomputed from committed
content. Where it cannot tell which occurrence it wrote, or the captured
content would no longer render,tracker capturerefuses and names the
lines instead of recording a lane nobody can use. -
A dev server that crashes is no longer shown as
stoppedon aready
instance (#261).Nothing waited on a supervised process, so one that exited, was
OOM-killed or waskilled looked exactly like onenewgit stoptook
down, and an agent waiting forreadywould test against a dead port.
Each long-running action now runs under a smallshwrapper that waits
on it and appends how it ended to its log ([newgit] exited 1,
[newgit] killed by SIGKILL, or[newgit] stopped by newgit).status
shows one that ended on its own asexited(1),killed(SIGKILL)or
crashed; anautostartaction in that state makes the instance not
ready, withnewgit action <resource>.<action>as the retry; and
newgit startrestarts it along with whatnewgit stopstopped.
newgit cleanupnow retires a dead pid toexitedrather than
stopped. -
spawnandstatussay why a resource failed to render or to resolve an
export, and no longer suggest an action it does not have
(#262).The reason was only in
spawn --json, and the retry hint always named
<resource>.prepare, which a resource without one refuses. The error is
now kept in the binding record and printed bystatusand under the
last line of a failedspawn, which used to promise "see below" with
nothing below it. The hint follows the failure: a render or export
points at the file or the definition and the newnewgit resource rebind <resource> [instance], which binds it again as spawn did; any
other hint names only an action the resource defines. -
Instance names are limited to 40 characters, and
render --checknow
reports environment-name collisions
(#263).A 300-character name used to fail with a raw "File name too long" from the
lock file, and a 200-character one spawned and then broke Docker container
names and Supabaseproject_ids built from{{branch.slug}}. The limit is
40, which leaves 23 characters of prefix under a 63-character DNS label.
render --checksaid nothing when two resources declared the same port
envor export name; it now prints the same warning asresource list,
from the same checkspawnrefuses on. -
A deploy now reaches a project's Git endpoint that had already slept.
The endpoint came back from a snapshot of its whole container, old
newgit
binary and composed views included, so newgit.dev kept serving views
composed by whatevernewgitit first started with. A snapshot or running
container from an earlier image is now dropped, and the endpoint starts
fresh from the image deployed now. -
A commit split into trackers comes back from newgit.dev, a clone, or
spawn --from-checkpointas the commit it was made as, signature and id
included, for anyone who can read every tracker it touched.Composing a split commit back always ended its message with a newline,
and never had the original's signature to put back. GitHub writes merge
commits without a final newline and signs them, so everything cloned
from newgit.dev had a new id from the first such merge on, and looked
diverged from the same history on GitHub. Split commits now keep the
original's message ending and its headers in their trailers, and a
rebuilt commit takes the signature back only when its id comes out as
the original's, so a signature only ever sits on what it covers. Commits
split before this fix keep their rebuilt ids until their history is
repaired. -
The remote logs an unexpected error's code and stack, not only its
message, so a failing Artifacts call says which call it was. -
newgit tracker useputs a secret tracker's content in the workspace
when the instance has never bound it, asnewgit spawn --usedoes.A tracker dropped at spawn, because another tracker filled its role, has
no content of its own in the instance, anduserestored only content
the instance held. So it bound the tracker with none of its files, and a
resource the tracker brings failed: its render had nothing to land in.
usenow checks out the tracker's main first, records it as the
binding's revision, and the resources it brings come up ready, rendered,
in the one command. If you worked around it withnewgit tracker pull
andnewgit action <resource>.prepare, you no longer need to.
Security
-
Capture no longer follows a symlink at a tracked path
(#258).A link at a tracked path was read through, so
tracker captureand the
capture insidecheckpointstored the target's contents — even a file
from outside the workspace — in a lane that may sync to a remote. Anything
that could plant a link (a script, a tool, a force-added path) could copy
any file you can read into the lane, silently. Now a link that stays
inside the workspace is stored as a link (mode120000), as Git stores
one, and checked out as one; a link that leaves the workspace, or a
tracked path under a symlinked directory, is refused with the path and
its target. Checkout likewise refuses a lane rev holding a link out of
the workspace, whoever wrote it. The safety capture,tracker drop,
--from-store, deposits, install keys, and export follow the same rule.
If a capture now fails on a link you meant, replace it with the file or
with a relative link inside the workspace.
Documentation
newgit reference agentsis a guide for an agent asked to set newgit up.
It covers reading the project for tracker and resource candidates,
explaining them to the user, asking which trackers they want, and proving
the setup with a real spawn.newgit --helpandnewgit initpoint to it.
Otherwise an agent tends to stop atinit, and the user never sees what
newgit is for.