Repository navigation
Harden harness path projection, executable lookup and profile init - #58
Merged
Merged
Conversation
- sealedRoleText rewrites host workspace/profile paths only as whole path components, in one pass, so /runs/w no longer corrupts /runs/w-profile, /runs/w2 or /mnt/runs/w, and a nested workspace maps correctly. - Research and sealed launches share locateHarnessExecutable: absolute, cwd-relative with a separator, else the first executable regular file on absolute PATH entries. Sealed lookup no longer accepts directories or non-executable files; a script run through runtime.interpreter still only needs to be a regular file. - bindWebWorkerProfile discards a profile copy left by an interrupted first binding instead of failing on mkdir forever. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #57 with the three smaller harness issues found in the same review.
Changes
sealedRoleText): host workspace and profile paths are replaced only as whole path components, in a single pass, longest first. Before,replaceAllturned/runs/w-profileinto/workspace-profilewhen the workspace was/runs/w, and also rewrote/runs/w2and/mnt/runs/w.locateHarnessExecutable. The sealed path usedfs.existsSync, so a directory or a non-executable file earlier on PATH could shadow the real binary. Scripts run throughruntime.interpreterstill only need to be regular files. The research path now ignores relative PATH entries, matching the sealed path.bindWebWorkerProfile): if a first binding was interrupted after the profile was created but before the binding file was written, every later bind failed onmkdirSync. With no binding file, nobody has used the profile yet, so the leftover copy is removed and initialization runs again.Tests
New cases in
tests/sealedHarness.test.ts(projection boundaries, nested workspace, lookup rules) andtests/webHarness.test.ts(recovery after an interrupted binding).Locally on h200: 51 passed, 4 skipped, 1 failed across the six harness test files. The one failure is
harnessProcess.test.ts"lets a Mathlib writer start a nested sandbox…" (bwrap: execvp bun), which also fails on main because that host has nobun.tsc --noEmitis clean.🤖 Generated with Claude Code