# Round 3 process-count harness

This three-source-file harness exports read-only snapshots from the existing jj/Git-backed T3 Code checkout and links its installed dependencies. It never checks out or edits the working copy/history. No extra jj workspace, dev server, or real user T3 state is used. Fixture repositories and jj registrations are isolated under each evidence directory.

## Prerequisites

Linux with Node 24, jj 0.46, Git, tar, ionice, nice, and `numen run` on PATH; an existing jj-backed T3 Code checkout with the stack bookmarks below and dependencies installed (including the server/client-runtime workspace link). Select Node 24 explicitly: a login shell on this host otherwise selects Node 26, which this wrapper rejects. Keep at least 10 GiB free on `/`; the harness refuses to start below this threshold. Each output path must be fresh and under `/var/tmp`. `numen run` serializes heavy commands host-wide. The wrapper sets `RAYON_NUM_THREADS=2`, `TMPDIR=/var/tmp/t3-jjtest`, `GIT_CONFIG_GLOBAL=/dev/null`, and `GIT_CONFIG_NOSYSTEM=1`.

The publish directory contains only `measure.sh`, `parity-runner/run.mjs`, `parity-runner/measure.mjs`, and this README; no private dependencies or checkout files are bundled. You may unpack it at any path. The wrapper finds sibling sources, reads the checkout from `T3_COUNTS_CHECKOUT` (default current directory), and the base from `T3_COUNTS_BASE_REV` (default `5d4c202e3f5b`).

## Exact rerun commands

Run the following in a login shell, replacing local paths if installed elsewhere. The Node path is the exact installed Node 24.21.0 used for these measurements. The suffix creates unique fresh evidence directories. Do not run simultaneous copies outside the serialization wrapper.

```bash
export PATH=/home/jacob/.local/share/mise/installs/node/24.21.0/bin:$PATH
export T3_COUNTS_CHECKOUT=/home/jacob/Documents/Developer/t3code
export T3_COUNTS_BASE_REV=5d4c202e3f5b
h=/var/tmp/round3/parity-publish/measure.sh
run=$(date -u +%Y%m%dT%H%M%S)-$$
bash "$h" dormancy "/var/tmp/round3-rerun-$run-owner1" feat/jj-driver
bash "$h" dormancy "/var/tmp/round3-rerun-$run-owner2" feat/jj-checkpoints
bash "$h" dormancy "/var/tmp/round3-rerun-$run-owner3" feat/jj-status
bash "$h" dormancy "/var/tmp/round3-rerun-$run-owner4" refactor/change-request-step
bash "$h" dormancy "/var/tmp/round3-rerun-$run-owner5" feat/jj-workflow
bash "$h" dormancy "/var/tmp/round3-rerun-$run-owner6" feat/jj-clients
bash "$h" all "/var/tmp/round3-rerun-$run-parity" feat/jj-cleanup
bash "$h" jj-ticks "/var/tmp/round3-rerun-$run-jj-ticks" feat/jj-cleanup
```

The default tip is `feat/jj-cleanup`; explicit arguments above make the measured revisions visible. `manifest.json` records full resolved commit IDs and tool versions. Preserve stderr/stdout if a command fails; no result is claimed for a failed run.

## Assertions and boundaries

- **Dormancy:** genuine automatic selection in a real colocated jj repository, with no requested-kind pin or config mutation. Requires Git kind, rejected `get('jj')`, real Git local status without a `vcs` descriptor (and no Unsupported failure), zero jj processes within routing/status, and discovery `implemented=false`. Discovery may separately probe executable availability/version; its processes are reported in a separate row, not misrepresented as routing. Earlier prefixes export `makeVcsDriverShape`; later prefixes export `makeJjVcsDriver`; the harness accepts the actual production factory.
- **Parity:** 68 distinct main/tip measurement pairs, all process-count deltas zero and identical normalized command multisets. Normalization removes only independent fixture roots and fixture HEAD OIDs; retains command multiplicity and ignores concurrent launch order/PIDs. `comparison.json`, `command-parity.json`, and `results.json` retain evidence. Colocated Git parity uses the supported real `VcsProjectConfig.resolveKind(requestedKind='git')` seam on both versions; this is not a substitute for the separate unpinned six-prefix dormancy proof.
- **jj counts:** fresh real fixture/services for each case; cold `GitWorkflowService.status()`, warmed `VcsStatusBroadcaster.refreshLocalStatus()`, and the exact warmed remote refresh closure with `refreshUpstream=true`. Only the exported snapshot exposes that closure; no production implementation is replaced. Timer/policy dispatch is outside the measured tick boundary and spawns no processes. Local filesystem bare origin, no external network. `jj-process-counts.json` includes actual successful app-spawned processes, full commands and separate VcsProcess/ProcessRunner calls; those call counts are not added to child counts, and transitive Git helper descendants are not counted.

Every run snapshots real `~/.config/jj/repos` names before/after and fails on any change. Never delete registrations. Fixtures use isolated `JJ_CONFIG`, `XDG_CONFIG_HOME`, and `APPDATA`; the existing checkout is read via `jj --ignore-working-copy` and read-only Git archive.
