Repository navigation
refactor: split experiment/benchmark content into rossoctl/moca-experiments (RA1 Phase 2) - #344
Conversation
…iments
Also adds docs/specs/2026-09-24-ra1-density-cutover-and-repo-rearchitecture-design.md (the RA1
plan this executes Phase 2 of) and registers it in docs/specs/README.md. §0.8 amends the spec
to note it predates this execution: its §3.5/§6 'no experiments/ exists' claim was true when
written; §7's migration-map table is left as the original planning-time scope rather than
retro-edited (this repo's own 'don't retro-edit, note the correction' convention) -- the
authoritative final scope is this commit's own message and moca-experiments' README, not §7;
and a stale §11 claim that vmpoolctl was moving is corrected (it doesn't -- §0.7 already
established that, §11 just never got updated to match). The registry row and this track's
intro paragraph are updated to reflect that Phase 2 has executed.
Moves 57 files to a new repo, git history preserved via git filter-repo:
- deploy/knative/{e1,e3,e4,e6,e7}*.sh + EXPERIMENTS.md + run-experiments.sh (E1/E3/E4/E6/E7
cluster experiments and their orchestrator)
- deploy/knative/{build-swebench-sandbox.sh, measure-swebench-runtimes.sh} (SWE-bench eval
scripts, moved alongside the experiments/swebench/ harness that drives them)
- deploy/microvm/{e10-e13}*.sh + EXPERIMENTS.md + METAL-RUNBOOK.md + predictions.json + their
tests (E10-E13 microVM experiments)
- experiments/ in full (the @sh/experiments workspace: M6's E2/E5 runners, the E11
density-analysis module consumed by microvm/e11-density.sh, and the swebench/ eval harness)
- scripts/gen_swebench_deck.py (generates content that moved; relocated to
experiments/swebench/gen_swebench_deck.py in the new repo)
On the moca-experiments side (not this diff, but landed as part of this same change, across
five review-and-fix rounds, each verified by actually running the previously-broken code in a
fresh clone rather than trusting the diff): every moved script's relative-path assumptions were
audited and fixed for the one-level-deep knative/ and microvm/ layout, including
REMOTE_WORKER_DIR/PROTO_FILE/PROTO_IMPORT_PATH/VMPOOLCTL now being real ${VAR:-default}
overrides that actually chain together (VMPOOLCTL derives from REMOTE_WORKER_DIR rather than
computing its own independent default -- two separate re-review rounds caught two separate ways
this was still wrong before it was actually right, both re-verified by exporting the env vars
and checking the result, not just reading the diff). Both EXPERIMENTS.md-style write-ups
(microvm/METAL-RUNBOOK.md and experiments/swebench/RUNBOOK.md) and every actionable Usage:/Run:
comment got the same path-correction pass, and every '[main repo]' marker is a real bash
comment, not bare text that would be parsed as shell arguments on copy-paste (caught once,
mid-fix, before it shipped). remote-worker/, proto/, and pnpm's workspace resolution (which
needs and no environment variable can substitute for) do not
exist in that repo -- documented explicitly, same honesty as the existing knative/ and
experiments/ standalone-runnability caveats, rather than implied to work.
Leaves breadcrumb stubs at all three old locations (deploy/knative/, deploy/microvm/,
experiments/) pointing to the new repo, fixes both broken README.md links this creates plus
docs/experiment-results.md's stale references (including correcting its own inaccurate claims:
that E2/E5 reproduce standalone from moca-experiments, that E2 has a driver script at all, an
ambiguous commit-parent reference now pinned to a stable pre-split SHA, and pointers to
nonexistent docs). Removes 'experiments' from pnpm-workspace.yaml and regenerates
pnpm-lock.yaml. Fixes stale experiments/ references in CLAUDE.md, CONTRIBUTING.md and
package.json, and drops dead .gitignore/.prettierignore entries for output directories the
moved scripts used to write to (their moca-experiments equivalents are added there instead).
Updates two stale path comments in files that stay (deploy/knative/swebench-sandbox-
buildconfig.yaml, harness/src/swebench-setup.ts). Reformatted with prettier (this worktree has
no node_modules of its own to run make fmt directly, so ran the main checkout's binary against
it -- confirmed clean on a full recheck after every round).
Does NOT move remote-worker/cmd/vmpoolctl or internal/relaytest (real dependents in this Go
module), the demo-*.sh consumer walkthroughs (paired with docs that stay), or two swebench
manifests + harness/src/swebench-setup.ts + session-usage.py (deploy/knative/swebench-sandbox-
pool.yaml is validated by a real production test, packages/knative-server/test/swebench-sandbox-
pool.test.ts -- swebench-sandbox-buildconfig.yaml stays for the same reason without a test
depending on it; swebench-setup.ts is real production code imported by harness/src/run-leaf.ts;
session-usage.py is referenced by the lib.sh that stays) -- see
docs/specs/2026-09-24-ra1-density-cutover-and-repo-rearchitecture-design.md §0.7.
Assisted-By: Claude Sonnet 5 <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
mrsabath
left a comment
There was a problem hiding this comment.
Complimenti — a genuinely careful split. The class of bug that usually sinks these PRs is the dangling reference, so I verified the mechanical claims instead of trusting them, and the ones that matter hold up.
No CI or build breakage. I fetched the full tree at 1d2f557 and grepped all 660 files, not just the diff:
- All five workflows (
ci.yml,build.yaml,microvm-kvm-gates.yml,security-scans.yml,scorecard.yml) — zero references to any deleted path. CI leans onpnpm -randfind deploy/ -name '*.sh'rather than named lists, so the deletions are self-healing. Makefile:25was my main worry: it globsdeploy/microvm/tests/*.test.sh, and this PR deletes five files from that directory. Butbuild-snapshot.test.shandsystemd-units.test.shsurvive, so the glob stays non-empty andmake test-deployis sound. (The greendeploy-scriptsjob agrees.)harness/test/typecheck-coverage.test.tsreadspnpm-workspace.yamldynamically rather than hardcoding a package list — its own comment says a hardcoded list "would be the very thing this suite exists to prevent" — so dropping theexperimentsentry is handled by design.pnpm-lock.yaml's importers list has noexperimentsentry, so--frozen-lockfilewon't break.- All 12
tsconfig.json, everyvitest.config.ts,.pre-commit-config.yaml: clean.
All cross-repo links resolve. I pulled the moca-experiments tree and checked each of the ~20 new link targets individually, including gen_swebench_deck.py at its new experiments/swebench/ path (it moved directories, not just repos — and experiments/MOVED.md says so precisely).
History preserved. The new repo's main paginates to exactly 206 commits, matching the PR body.
File accounting reconciles. The diff shows 60 zero-addition files, which initially didn't match the stated 57 — three are config/lockfile trims (.prettierignore, pnpm-lock.yaml, pnpm-workspace.yaml) that happen to be deletion-only, leaving exactly 57 moved. The destination's 58 is 57 + the lib.sh point-in-time snapshot the breadcrumb explicitly discloses; I confirmed lib.sh exists in both repos, as intended. Set-differencing the two lists, nothing was deleted here without landing there.
The reproducibility caveat is the best part. I checked the deleted experiments/package.json: workspace:* deps on @sh/harness and @sh/session-backend, plus two link:../pi-fork/... paths. So the "preserved as a historical record, not standalone-runnable" disclosure is technically accurate rather than hedging — and pinning 3057c5f as the last pre-split commit is exactly the detail that makes it actionable. Most splits quietly leave a broken pnpm test instruction; this one names the limitation. Which is what makes finding 1 below a touch ironic.
Findings in the body (uncommentable — untouched files)
Two dead relative links to the deleted deploy/knative/EXPERIMENTS.md. Both are in files this PR does not modify, so GitHub will not accept an inline anchor there:
docs/specs/2026-09-08-p6-vm-process-manager-design.md:763—[`EXPERIMENTS.md`](../../deploy/knative/EXPERIMENTS.md)docs/specs/2026-09-09-p4-microvm-sandbox-design.md:1026—[`deploy/knative/EXPERIMENTS.md`](../../deploy/knative/EXPERIMENTS.md)
I verified the relative paths resolve to nothing at this commit, and that these are the only two broken relative links repo-wide (a repo-wide grep for relative links into any deleted path returns exactly these two). Both sit in frozen historical specs, so "leave them as period record" is defensible — but they render as dead links on GitHub today. Repointing them at deploy/knative/EXPERIMENTS-MOVED.md would preserve the historical claim and land the reader somewhere real, which is what the breadcrumbs are for.
Worth noting these are uncommentable precisely because nothing touched them — the same reason they were missed.
One observation, not a finding
remote-worker/cmd/e12-guest-client/ now has no surviving executable consumer: its header names deploy/microvm/e12-vsock-egress-probe.sh as its reason to exist, and that driver moved. Only docs reference it now. This is not a defect in this PR — keeping the Go module whole is your stated and correct rationale (§0.7, plus Go's internal/ rule) — but it's a loose end the next phase may want to decide on deliberately rather than inherit.
On the spec
Eight amendment sections appending corrections rather than retro-editing is the right call, and §0.8 citing the repo's own "don't retro-edit, note the correction" convention is what makes it legible rather than just long. I checked §2's unchecked gate items (#336/#337/#338/#274/#261) — they gate Phases 3–4, and Phase 2 is explicitly exempted and authorized per §0.5–§0.6. Self-consistent.
Areas reviewed: repo-wide reference audit (all 660 files at HEAD), CI workflows, Makefile, pnpm/tsconfig/vitest config, cross-repo link resolution, file-count reconciliation, docs
Commits: 1 commit, signed off (DCO pass)
CI status: passing (13/13)
| # In-process (no LLM key): E2 + E5 structural | ||
| # In-process (no LLM key): E2 + E5 structural -- needs this repo's workspace (see caveat above) | ||
| docker run -d --rm --name sh-redis -p 6379:6379 redis:7-alpine | ||
| pnpm -C experiments test # E2, E5 structural, fixtures |
There was a problem hiding this comment.
suggestion — this line is copy-paste-runnable and fails at this commit.
experiments/ now contains only MOVED.md, so there is no package manifest for pnpm -C to resolve:
$ ls experiments/
MOVED.md
$ pnpm -C experiments test
ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND
To be fair to the block: it is annotated needs this repo's workspace (see caveat above), and the caveat eight lines up is unusually precise — it names the workspace:*/link: dependencies and even pins 3057c5f as the last pre-split commit. So this is disclosed, not hidden, which is why I am not calling it a must-fix.
The gap is that the fenced block is the part people copy, and on its own it reads as a command to run now, in this checkout. "Needs this repo's workspace" is also ambiguous in a way the caveat is not: the workspace it needs is this repo's as it was before the split, not as it is at HEAD. Line 163 right below it solves exactly this problem for the cluster drivers, with an inline comment scoping them to moca-experiments — line 154 is the one command in the block that did not get the same treatment.
Cheapest fix is to make the block self-contained, so the reader never has to have retained the caveat:
# In-process (no LLM key): E2 + E5 structural -- requires a PRE-SPLIT checkout of this
# repo (at or before 3057c5f); experiments/ moved to moca-experiments and is not
# standalone-runnable there. See the caveat above.
git checkout 3057c5f # or skip this block on a current checkout
docker run -d --rm --name sh-redis -p 6379:6379 redis:7-alpine
pnpm -C experiments test # E2, E5 structural, fixturesNot blocking — nothing in CI runs this, and the surrounding prose is honest about the constraint.
There was a problem hiding this comment.
Fixed in 10cd82d. The fenced block now says it needs a pre-split checkout (at or before 3057c5f) and includes the git checkout 3057c5f line, so it works without reading the caveat above it.
| /** | ||
| * SWE-bench per-leaf provisioning inside the shared pool pod (mirrors the merged | ||
| * deploy/knative/measure-swebench-runtimes.sh mechanism — see that file's header for the rationale | ||
| * measure-swebench-runtimes.sh mechanism (moved to rossoctl/moca-experiments, knative/measure-swebench-runtimes.sh, 2026-09-25) — see that file's header for the rationale |
There was a problem hiding this comment.
nit — the appended provenance note pushes this comment line to 173 chars, against 81/101/99/95 for the other lines in the same block:
81 * SWE-bench per-leaf provisioning inside the shared pool pod (mirrors the merged
173 * measure-swebench-runtimes.sh mechanism (moved to rossoctl/moca-experiments, ...
101 * behind every choice). Clones the baked bare mirror cross-device (--no-hardlinks: ...
99 * /workspace EBS), checks out base_commit, layers a per-leaf system-site venv ...
Prettier does not reflow prose inside a JSDoc block, which is why lint stays green — so this is cosmetic only. Wrapping to match its neighbours would read better:
* SWE-bench per-leaf provisioning inside the shared pool pod (mirrors the merged
* measure-swebench-runtimes.sh mechanism — moved to rossoctl/moca-experiments as
* knative/measure-swebench-runtimes.sh on 2026-09-25 — see that file's header for
* the rationale behind every choice). Clones the baked bare mirror cross-deviceSame pattern at deploy/knative/swebench-sandbox-buildconfig.yaml:18, where the equivalent edit lands at 144 chars inside a block whose other lines wrap near 75. Keeping the annotation is right — it is the breadcrumb that makes the cross-repo move traceable from the consumer side; only the wrapping needs attention.
There was a problem hiding this comment.
Fixed in 10cd82d. Rewrapped both the JSDoc block here (every line is now ≤ ~90 chars, and the following over-long line is reflowed too) and the header in swebench-sandbox-buildconfig.yaml (now ≤ ~75 chars). The breadcrumb text itself is unchanged.
…p provenance notes, repoint dead links - experiment-results.md: the E2/E5 fenced block now carries the pre-split checkout (3057c5f) inline, so it is not copy-paste-runnable against HEAD. - swebench-setup.ts / swebench-sandbox-buildconfig.yaml: rewrap the moved-to-moca-experiments provenance notes to their blocks' width. - p6/p4 design specs: repoint the two dead links to the deleted deploy/knative/EXPERIMENTS.md at the EXPERIMENTS-MOVED.md breadcrumb. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Paolo Dettori <[email protected]>
|
Addressed the review in 10cd82d:
|
…d it on every Exec (MI1 R5) e10-lifecycle.sh and e11-density.sh each generate a fresh 32-byte hex MOCA_RELAY_EXEC_TOKEN per run (SH_E10_EXEC_TOKEN / SH_E11_EXEC_TOKEN supply a reused stack's), pass it to every relay they launch, and send `authorization: Bearer` on every grpcurl SandboxExec call: E10's rung-1 Exec, E11's timed Exec and its converge. E11's Go exec-driver is launched with the token in its environment. The shell tests pin every relay launch and every grpcurl Exec call site, evaluate the generator line (64 hex characters, different each run, overridable), and the e11 seam test runs the real exec-driver both without the token (it refuses, naming MOCA_RELAY_EXEC_TOKEN) and with it. METAL-RUNBOOK.md documents the token and the reuse override. Ports this from rossoctl/moca#350's development, where it was written against deploy/microvm/. It was dropped from that PR because rossoctl/moca#344 moved these drivers (e10-lifecycle.sh, e11-density.sh, their tests, and METAL-RUNBOOK.md) out of the main repo into this repo's microvm/, so the change belongs here instead. Requires rossoctl/moca#350 to matter in practice: the relay it starts refuses to boot without MOCA_RELAY_EXEC_TOKEN and refuses every SandboxExec without it once #350 merges, and exec-driver refuses to start without it. Before #350, an older relay and exec-driver simply ignore the variable and the header, so this change is harmless to run against main today. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Paolo Dettori <[email protected]>
Summary
rossoctl/moca-experiments,with git history preserved via
git filter-repo(206 commits; per-file history spot-checkedintact, e.g.
e11-density.shande1-benefit.shretain their original commit counts).EXPERIMENTS.md/METAL-RUNBOOK.md/predictions.json/tests underdeploy/knative/anddeploy/microvm/(24 files), plus thefull
@sh/experimentsworkspace underexperiments/including the SWE-bench deck generator(32 files), plus
scripts/gen_swebench_deck.py(1 file). The original plan scoped 19-21files; a mid-execution check found the P6 (microVM) experiments and the SWE-bench content had
been missed, and the scope was expanded to cover both — see amendment log in the linked spec.
deploy/knative/EXPERIMENTS-MOVED.md,deploy/microvm/EXPERIMENTS-MOVED.md,experiments/MOVED.md) pointing to the new repo.README.md,docs/experiment-results.md,CLAUDE.md,CONTRIBUTING.md,package.json,.gitignore/.prettierignore,pnpm-workspace.yaml(removes theexperimentsworkspace entry), and two path comments indeploy/knative/swebench-sandbox-buildconfig.yaml/harness/src/swebench-setup.ts.remote-worker/cmd/vmpoolctlorremote-worker/internal/relaytest(realdependents in this Go module — Go's
internal/import rule, plus two production test files),or the
demo-*.shconsumer walkthroughs,deploy/knative/lib.sh,session-usage.py, theswebench sandbox-pool YAML/test, or
harness/src/swebench-setup.tsitself (all paired withdocs/tests that stay in this repo) — see the corrected scope in
docs/specs/2026-09-24-ra1-density-cutover-and-repo-rearchitecture-design.md§0.7.bugs (broken
${VAR:-default}env overrides, aVMPOOLCTLpath that didn't actually followREMOTE_WORKER_DIR, wrong doc cross-references, a corrupted historical comment) that werefixed and re-verified by running the scripts, not just reading the diff.
Part of RA1 (Repository Re-architecture) Phase 2 of 4 — see
docs/specs/2026-09-24-ra1-density-cutover-and-repo-rearchitecture-design.md.Test plan
make lint-equivalent (prettier) passes on the worktree — no references to removed paths remaingh repo view rossoctl/moca-experimentsshows the full moved tree underknative/,microvm/, andexperiments/git logon moved files in the new repo shows pre-split history preservedgit status --shortempty, diff scoped to the 57 deletions + breadcrumbs + reference fixes)main's two commits since this branch's base (supervisor: SH_WORKERS default reads host CPU count via cpus().length, blind to container/cgroup CPU limits #341/fix(supervisor): default W from availableParallelism(), not the host's core count (#341) #343 — unrelated supervisor fix)🤖 Generated with Claude Code