8.5 KiB
8.5 KiB
Git and tooling rules (scars)
(Moved verbatim from SKILL.md on 2026-11-11 so the skill loads small; SKILL.md keeps a pointer.)
- Stage explicit paths. Never
git add -A. It swept an untracked local settings file into history. - Never amend or force-push a shared branch. In the Ghostlight play-agent pass, a Hands agent amended its pushed kernel commit and force-pushed it while Self was pushing map commits to the same branch. Nothing was lost, only because Hands had rebased on those commits. Fix a commit with a new commit.
- Never
git archiveto export source for a byte comparison. It applies text conversion. An export used for a reproducibility check carried 1,459 inserted carriage returns against the worktree, which poisons every byte count built on it. Read raw blobs and verify against the worktree's hash before comparing anything. - A shared build output directory belongs to one checkout of a repository.
Two worktrees of the same crate get the same artifact hash. Cargo decides
whether to rebuild by comparing modification times, so a plain
cargo testin the checkout with older sources ran the other checkout's last mutant binary. A surviving mutant can make an unmutated tree look green this way. A second checkout, such as Soul's clone or a parallel Hands worktree, gets its own target subdirectory. The stopgap's containers each build in their own scratch clone, so they are immune. - Heavy verification runs on Yggdrasil, not on the operator's workstation.
Heavy verification means builds, test suites and mutation tools. The owner
is Idunn's verify transaction (a campaign in progress, ruled 2026-09-22).
Until it lands, use the stopgap
tools/stopgap/ygg-verify.sh. It pushes an exact revision to a mirror on Yggdrasil and runs one command in a container capped at 4 CPUs and 6 GiB, niced, with at most 5 jobs at a time. The script owns these numbers (CPUS,MEM,SLOTS); where this text andygg-verify.shdisagree, the script is right — this line was already stale once. Every Hands and Soul brief says so. Starfire runs only what has to run on Windows, such as the QUIC win32 scenarios: one job at a time, never burners. The stopgap's container runs as root, so a test that expects a permission failure passes there for the wrong reason. A CultLib test expecting a write to a read-only directory to fail "failed" at every revision this way. Treat a permission-dependent result from the stopgap as unproven. Idunn's verify runner refuses uid 0, so it will not inherit this. - The operator's workstation has a load budget, and Self owns it. Running
stress under load there, with CPU burners, is forbidden: use a dedicated
host, or a container capped with
--cpus. Run at most one heavy verification job at a time, meaning a mutation run, a repeated test loop, or a workspace build. Parallel agents are sized to that limit, not to the pipeline's appetite. On 2026-09-22 the operator had to force a shutdown. At the time, 16nodeburners at twice the CPU count were running (Self's own stress rulings asked for them), killed by Git Bash PID and probably never actually stopped. A 30-run test loop and a workspace build were running beside them. - Kill processes by the PID you started, never by image name. A Hands pass
cleared its CPU burners with
taskkill /IM node.exe /T. That killed every Node process on the shared workstation, including other agents' and the operator's. Record the PID of every process you launch, and stop only those PIDs. Over ssh,pkill -fkills its own carrier shell, whose command line holds the pattern: bracket the first character (pkill -f '[o]din-watch.sh') or kill the captured PID. - Remove only paths you created, by exact name. Never
rma glob in a shared directory such as%TEMP%: a Soul pass deleted other agents' scratch and job markers that way. Keep scratch under the session scratchpad. - Clean scratch build output before a Self run ends. Cargo
targetdirectories run 5 to 20 GB each, and Soul and Hands scratch builds left about 345 GB of them in one Mind's workspace until/reached 97% (2026-11-13). Build in a scratch dir named for the pass, and at run end delete that pass'starget*dirs by exact name unless a root list or an open run pins them (CACHEDIR.TAGmarks a cargo target). A build run by docker is root-owned: put its dir on a root list in/opt/commons/handoffinstead of failing therm. - Name the repo on every git command:
git -C <abs repo>. The shell cwd resets between calls, and a chainedgit add && git commit && git pushonce ran in the wrong repo and pushed its dirty tree. Read the branch line ofgit status -sbbefore committing;--shorthides it. - A cheap check that answers is not evidence about the whole.
idunn validate --recipeprintedrecipe okwhile the recipe was unadmittable, because the cross-document rules run only with--binding; an unprivilegeddocker psorjournalctlreturns a false empty or zero at a permission boundary. Name the object the check looked at, and check the artifact that actually runs, not one beside it. - Commit from Git Bash with
git commit -F- <<'MSG'. PowerShell 5 here-strings break-mquoting, and itsOut-File/Set-Contentwrite a BOM into message files. - Push at most three tags per push. GitHub skips tag-triggered workflows when one push carries more tags, so the npm and PyPI publish jobs silently never ran.
- Keep release byte checks commit-independent. Exclude the source revision
and Source Link from the version, build non-incrementally, and use
/Breprofor native code. A committed DLL otherwise always carries its parent's SHA. - Operator-side builds run detached, with a log and a PID. Unity batchmode and similar builds must never be one attached call. Agents waiting on a job do so in the foreground, in calls of at most 270 s (briefs, Hands). Revert incidental asset churn afterwards, such as Unity's SDF font asset.
- Before a mass-spawn or process-launching probe, read how the child chooses its role. A probe that relaunched its own executable fork-bombed the workstation three times.
- Before a merge, verify every test project that consumes the changed package, not only the package's own. CultMath Phacelle merged on CultMath's green suite (2026-09-30); Caching checks every public CultMath value type for a converter, formatter and dictionary key, and main went red.
- A merge of a long-lived branch can break semantically with no textual conflict (the LookDirection to Aim rename, 2026-10-07). Dispatch a merge Hands that verifies and fixes mechanical adaptations only.
- Pin sibling checkouts with a guard that checks revision and cleanliness. Scope the guard to projects that actually reference the sibling.
- Self removes a cut's worktrees in the turn the cut merges or is abandoned,
Unity copies and job and probe directories included. Before removing one,
park any head no ref contains under a local
keep/<name>tag. Never defer cleanup to a handoff. On 2026-10-23C:\aeth-wtheld 255 GB of merged-cut worktrees that a handoff had put off "until idle". C: fell to 1.4 GB free during an operator flight, and a new checkout died mid-write. Operator: "you really gotta start cleaning up after yourself". Check free space before creating a worktree. Remove only worktrees this session's agents created, by name. Never sweep a root by path prefix. The same day's sweep found another Self's live tree "clean and pushed", andgit worktree remove --forceemptied it mid-build. "Clean" says nothing about who is working in a tree. - A Self's HOME is read-only: run dotnet through
tools/dotnet-self. Setting onlyDOTNET_CLI_HOMEandNUGET_PACKAGESstill fails with anIOExceptionon the NuGet-Migrations mutex, because NuGet and MSBuild keep other state underHOME.tools/dotnet-self build ...runs one dotnet command withHOME, both of those and the node-reuse and build-server switches pointed at a per-user 0700 directory outside the worktree (DOTNET_SELF_HOMEoverrides; inside a repo it needs a.git/info/excludeentry). If you sourcetools/dotnet-self-env.shinstead, do it in a subshell or per command: an exportedHOMEmoves git and gh config and credentials for the rest of the shell. Never changeHOMEin the unit. Hit by Nibu, Aqua and Libby on 2026-11-07. A long job needsrun_in_background:nohupand&die with the call that started them.