Skip to content

fix: isolate arena runs and clean up candidate artifacts - #201

Merged
mdsmithaustin merged 10 commits into
mainfrom
fix/arena-sync-and-scratch-leak
Oct 13, 2026
Merged

mdsmithaustin merged 10 commits into
mainfrom
fix/arena-sync-and-scratch-leak

Conversation

@mdsmithaustin

@mdsmithaustin mdsmithaustin commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

What Changed

  • Give each Arena run fresh scratch directories, keep the rubric outside candidate-readable paths, and clean up candidate worktrees, branches, and scratch files after completion or before reruns. Save outputs at the task's destination and return synthesis notes in the reply.
  • Require native isolation to produce linked git worktrees, use explicit worktrees for Grok standalone-clone configurations, and record the cleanup rules in PORTING.md and content conventions.
  • Correct poteto-help links to use full repository paths, including the skills/ prefix.
Validation

Risk Assessment

✅ Low: This is a text-only change to the skill docs, the porting note and the retired-text config. It adds what the intent requires: in arena step 4, the git-common-dir check with --path-format=absolute, git worktree add --detach in the run's mktemp dir, and spawning on Grok without native isolation. It also corrects the Grok wording in pstack-harness, adds the sign-off rule to Outputs and updates the PORTING note. All recorded human decisions are applied verbatim, and evals/promises/oracles.py is untouched.

Testing

The five reference tests passed and the worktree remained clean. The operator reports relay-rij6hlqz covered live behavior with 5/5 PASS; this run exercised no live scenarios and produced no artifacts. Lint was excluded by this phase's explicit prohibition.

  • Live validation: ⚠️ inconclusive - 0 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Run candidates with native isolation and retain only project-linked git worktrees ⏸️ untested no Inspected the instructions and ran permitted reference tests. Fresh behavioral validation requires an agent invocation, which the recorded operator decision prohibits. The operator reports prior cover…
Encounter standalone Grok isolation and create detached project worktrees instead ⏸️ untested no The operator supplies prior live coverage but prohibits Grok invocations, other agent CLIs, paid calls, and validation scratch setups. Reference checks cannot exercise this fallback. Fresh validation…
Complete or reframe an arena run without leaking candidate state into the next run ⏸️ untested no Reviewed cleanup instructions and confirmed prohibited scratch directories are absent. Driving completion and a subsequent run requires the live arena runs and disposable setup that the operator prohi…
Preserve shipped code while keeping an unsigned design sketch outside the project ⏸️ untested no Inspected the output-placement rule. Demonstrating agent interpretation requires a live calling task, prohibited by the recorded decision. No permitted reference test establishes output-placement beha…
  • Outcome: ⚠️ 1 warning across 1 run (1m29s)

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

⚠️ **Test** - 1 warning
  • ⚠️ live validation verdict: inconclusive (0 of 4 scenarios were driven live against the product); untested: Run candidates with native isolation and retain only project-linked git worktrees, Encounter standalone Grok isolation and create detached project worktrees instead, Complete or reframe an arena run without leaking candidate state into the next run, Preserve shipped code while keeping an unsigned design sketch outside the project
  • Live validation: ⚠️ inconclusive - 0 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Run candidates with native isolation and retain only project-linked git worktrees ⏸️ untested no Inspected the instructions and ran permitted reference tests. Fresh behavioral validation requires an agent invocation, which the recorded operator decision prohibits. The operator reports prior cover…
Encounter standalone Grok isolation and create detached project worktrees instead ⏸️ untested no The operator supplies prior live coverage but prohibits Grok invocations, other agent CLIs, paid calls, and validation scratch setups. Reference checks cannot exercise this fallback. Fresh validation…
Complete or reframe an arena run without leaking candidate state into the next run ⏸️ untested no Reviewed cleanup instructions and confirmed prohibited scratch directories are absent. Driving completion and a subsequent run requires the live arena runs and disposable setup that the operator prohi…
Preserve shipped code while keeping an unsigned design sketch outside the project ⏸️ untested no Inspected the output-placement rule. Demonstrating agent interpretation requires a live calling task, prohibited by the recorded decision. No permitted reference test establishes output-placement beha…
  • git diff 5c40398a31e2d9ed8e1ef2e3d6a81e09db362fe5 6456188818e1b2f7486a5ca8af6817c8617de4f6
  • PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s tools -p test_skill_references.py -v
  • Confirmed .arena-validation/, checkpoint-small/, and fallback-repeat/ are absent.
  • Confirmed the change leaves evals/promises/oracles.py and skills/architect/SKILL.md unchanged.
  • git status --short confirmed no testing changes remain.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@mdsmithaustin

Copy link
Copy Markdown
Owner Author

Verdict: FAIL
Head: c2742b1
Patch-id: 457346a3f2a4efc836a953f67393f5ad44aadd13
Docs: needs changes

Round 1 swarm at this head: gates + live scratch + regression (sonnet@high), upstream-parity review and consumer review (opus@xhigh each; work model sonnet@high).

Gates: PASS (lint 5/5, skill-ci lint and check 0 findings, ledger audit 0 problems; only known host noise). Live: each run gets a distinct 0700 dir, no RUBRIC.md reachable; the new retired-text rule fails on trunk's arena text and matches nothing else. poteto-help: head wording yields 200 links where trunk's produced the 404.

Fix-forward (in scope):

  1. skills/arena/SKILL.md:16: the end of step 3 is still upstream's pre-#538 fragment ("Spawn more when…", "Same model N times when…"); #538 made them "Spawn more runners when…" / "Use the same model N times when…". Take it, so sync 978ca6e: take or record the arena intro and Start-list hold #194's parity goal holds and no unexplained drift remains in this file.
  2. Leak fix claims more than it does. A later run can still list and read an earlier run's sibling ${TMPDIR}/arena-<slug>.* dir (same uid); the PR's own recorded run shows run-2 candidates reading run 1's candidates and synthesis.md with judge scores (~/.no-mistakes/evidence/01M4RSFQN4DHSVJGH8QPNF5G6X/arena-artifacts/run-2/candidate-1/reachability.md), and Phases E/F re-runs land beside the earlier run. Add the step that removes (or moves out of the scratch root) a finished run's directory before the next run starts, and make PORTING.md:71 claim only what the text now prevents.

Routed elsewhere (not this PR): the eval oracle grades a graft under the run's own tmp/ as a project edit (evals/promises/oracles.py classify) and the poteto-help 404 check accepts any blob/main/ link; both go to the #175 oracle PR, which lands before this one. The todolist-to-worklist substitution and Phase C's "or capability tier" have no PORTING row (pre-existing); filed with the PORTING substitution-map work.

@mdsmithaustin
mdsmithaustin force-pushed the fix/arena-sync-and-scratch-leak branch from 347988b to 0e7bd82 Compare October 12, 2026 20:35
@mdsmithaustin mdsmithaustin changed the title fix: isolate arena scratch runs and correct help links fix: isolate Arena scratch runs and correct help links Oct 12, 2026
@mdsmithaustin

Copy link
Copy Markdown
Owner Author

Verdict: FAIL
Head: 0e7bd82
Patch-id: d9cda833a8b26d477aca15d02463440930cd3a5e
Docs: needs changes

Round 2 swarm at this head: gates + literal two-run replay + upstream diff + merge simulation (sonnet@high), fix review and consumer review (opus@xhigh each; work model sonnet@high). This is the second FAIL; a third stops the PR.

Item 1 (upstream #538 step-3 wording): fixed. The Phase F to E graft carve-out is unambiguous. Gates pass; a run that follows the text leaves nothing for the next run in the mktemp branch; no oracle or harvest reads arena's scratch; merges clean with #202 and #203.

Fix-forward (in scope; the leak fix still claims more than the text does):

  1. skills/arena/SKILL.md:17, :51: "save the synthesized artifact and synthesis note outside it" names no place. Recorded: the Codex lead wrote synthesis.md inside its run folder, and a run-2 candidate read the earlier judge scores (~/.no-mistakes/evidence/01M4RSFQN4DHSVJGH8QPNF5G6X/arena-artifacts/run-2/candidate-1/reachability.md). In architect-checkpoint-run, saving the sketch into the project now FAILs the checkpoint oracle (results/2026-10-04-pr136.md:38 shows the same shape). Say: put the synthesized artifact where the calling task says, or if it names none, in a fresh mktemp -d outside the project; give the synthesis note (judge scores) in the reply rather than a file under the scratch root.
  2. Same line: the preferred per-candidate git worktree branch is never cleaned up, so run 2 sees run 1's candidates via git worktree list (reproduced). Remove candidate worktrees at run end under the same rule as the mktemp dir.
  3. The delete rule appears only in Phase A step 4; repeat it where the lead finishes (Phase F) and where it re-frames (Phase E), so a lead working from its worklist meets it.
  4. PORTING.md:71: claim only what the text now prevents for a run that completes. Name what it does not cover: a run cut off before the delete (recorded Claude headless and Grok 2400 s cap deaths, results/2026-10-08-sync-df58112.md:143,145) and runs happening at the same time. Stronger isolation needs a sandbox: filed as a follow-up.

Merge order: #201 lands immediately before #202 (#202's README describes #201's path; #201 alone misgrades a run root outside the default temp paths, which no recorded run uses).

@mdsmithaustin
mdsmithaustin force-pushed the fix/arena-sync-and-scratch-leak branch from 0e7bd82 to 97b3866 Compare October 12, 2026 21:31
@mdsmithaustin mdsmithaustin changed the title fix: isolate Arena scratch runs and correct help links fix: isolate Arena scratch files and correct help links Oct 12, 2026
@mdsmithaustin

Copy link
Copy Markdown
Owner Author

Verdict: FAIL
Head: 97b3866
Patch-id: 3191bb686b85e86c1ececbad523e5958879d106a
Docs: needs changes

Round 3 swarm at this head: gates + independent 24-scenario two-run replay + oracle checks (sonnet@high), directive review and consumer review (opus@xhigh each; round-3 work on opus@high, so these may be same-family reviews).

This is the third FAIL. Per the autopilot playbook the owner is stopped and the PR goes to the operator.

What holds: gates pass; across 24 replayed scenarios no candidate, worktree, arena branch, judge score or scratch dir of run 1 reaches run 2 (main leaks on every branch); git refuses to delete the main checkout or a branch checked out elsewhere, so cleanup cannot delete shipped code or the user's branch; round-2 items 1-4 fixed on Claude Code, Codex and Hermes; merges clean with #202, #203, #205.

Blocking (recorded run reaches it): Grok Build isolates candidates as standalone repo copies, which git worktree remove cannot delete (recorded grok arena-run relay-go6dzbwe), so PORTING's arena note overclaims on Grok. Also open: the architect-checkpoint sketch placement wording. Both filed as #214 with the oracle-side items (#207, #208).

@mdsmithaustin

Copy link
Copy Markdown
Owner Author

Fail-count reset: the operator approved one more round in chat on 2026-10-12, scoped to making candidates real git worktrees on every harness and proving it with a live Grok arena run.

@mdsmithaustin
mdsmithaustin force-pushed the fix/arena-sync-and-scratch-leak branch from 97b3866 to 3b2f6d6 Compare October 13, 2026 02:56
@mdsmithaustin mdsmithaustin changed the title fix: isolate Arena scratch files and correct help links fix(arena): isolate run scratch files and clean up candidates Oct 13, 2026
@mdsmithaustin mdsmithaustin changed the title fix(arena): isolate run scratch files and clean up candidates fix: isolate Arena scratch files and correct help links Oct 13, 2026
@mdsmithaustin

Copy link
Copy Markdown
Owner Author

Verdict: PASS+NOTES
Head: 3b2f6d6
Patch-id: 1bd6485cf71d5781c5205178d1bd17071d39e47b
Docs: pass

Round 4 (operator-granted final round; candidates as real git worktrees on every harness) at this head: gates + independent replay + recorded live Grok evidence (sonnet@high), directive review and documentation-impact / consumer review (opus@xhigh each; work on opus@high, so these may be same-family).

The round-3 blocker is fixed. Recorded paid Grok run relay-rij6hlqz (at cecfe487, procedure word-for-word identical to this head) passed 5/5: the lead made five detached git worktrees itself, skipped Grok isolation, and removed all of them; no Grok clones were made. An independent replay (84 checks, four isolation scenarios, two consecutive runs) found no run-1 leak and only main left each time. The common-dir check holds across /var vs /private/var, case differences and worktrees of worktrees. Gates pass; CI 7/7; merges clean onto main 5c40398 and with #203, whose PORTING arena rows then match the arena text.

Notes (follow-ups, #219): the documentation-impact lane flagged opening-a-pr.md:24's "link the arena directory" now that arena deletes it (the agent finds the directory gone, a loud and recoverable miss, so it is a note here); create worktrees one at a time; pass isolation: none on Grok; the "linked otherwise" claim rests on one probe; pstack-harness:64 vs arena's fallback; architect:48 wording. Oracle items stay in #207 and #208.

… run

Closes #194. Arena's intro and Start list collapse to upstream's one worklist
line, and Phase C takes upstream's wording. Phase A step 4 replaces the fixed
/tmp/arena-<slug> fallback with a mktemp -d made per run and keeps the rubric
outside candidate-readable paths. A retired-text rule bans the fixed path.
poteto-help now says to link the repository path, such as skills/how/SKILL.md,
so the printed links resolve.
…tep 3 ending

Phase A step 3 ends with upstream #538's wording ("Spawn more runners when",
"Use the same model N times when"). Step 4 now deletes the run's scratch
directory when the run ends, after the synthesized artifact and note are saved
outside it, and before any re-run from Phase E or F. Without that, a later run
could still list and read an earlier run's sibling arena-<slug>.* directory.
The PORTING note now claims only what the text prevents.
"Save the synthesized artifact and synthesis note outside it" named no
place, and a Codex lead kept synthesis.md in its run folder. Outputs now
puts the artifact where the calling task says, or in a fresh mktemp -d
outside the project, and gives the synthesis note in the reply.

The preferred git worktree branch was never cleaned up, so the next run
saw earlier candidates through git worktree list. Cleanup now removes
each candidate worktree and its branch as well as the scratch directory,
and Phase E and Phase F repeat the rule where the lead re-frames or
finishes.

PORTING claims only what this prevents for a run that completes and
names what it does not cover (#209).
Grok Build's isolation: worktree makes a standalone clone under
~/.grok/worktrees/, which git worktree list omits and git worktree
remove refuses with exit 128, so arena's cleanup left every Grok
candidate behind (grok arena-run relay-go6dzbwe left five).

Arena step 4 now counts a native isolation option only when
git rev-parse --git-common-dir on its path prints the project's. Every
other candidate worktree is made with git worktree add --detach inside
the run's mktemp -d, so cleanup is the same on every harness.
pstack-harness states the same rule and corrects its Grok Build row.
Arena's Outputs keeps a sketch awaiting sign-off outside the project
(#214 item 2). PORTING's arena note now holds on all four harnesses.
@mdsmithaustin
mdsmithaustin force-pushed the fix/arena-sync-and-scratch-leak branch from 3b2f6d6 to 6456188 Compare October 13, 2026 03:31
@mdsmithaustin mdsmithaustin changed the title fix: isolate Arena scratch files and correct help links fix: isolate arena runs and clean up candidate artifacts Oct 13, 2026
@mdsmithaustin
mdsmithaustin merged commit 33d6cd0 into main Oct 13, 2026
7 checks passed
@mdsmithaustin
mdsmithaustin deleted the fix/arena-sync-and-scratch-leak branch October 13, 2026 03:38
mdsmithaustin added a commit that referenced this pull request Oct 13, 2026
Settles the six arena follow-ups from #201 left in #219. Worktrees are made one at a time and Grok writers get isolation none. When git worktree add fails, writers whose output the lead collects get a shared clone detached at each briefed commit. Opening a PR posts the swarm or arena note without findings Shipping keeps off the PR.

Closes #219
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant