E0-3/E0-4 groundwork: provider options, pinned docs, Track A/B in the protocol
- providers: per-model request extras (e.g. reasoning_effort), key_env, token_param (max_completion_tokens on api.openai.com); recorded - docs pinned to the toolchain being run: Rust offline docs from the sysroot, Zig langref and std source of the same installation; several mounts under a read-only /docs; hashes recorded (cached for big trees) - protocol: neutral model labels and calibration before classes (§2); smoke gates, fixed Aji commit, fixed per-model reasoning mode, slope of degradation (§39a); Track A controlled vs Track B native agents (§39b) - plan: E-C calibration, E-G gates, E-N native-agent run
This commit is contained in:
1 parent
b49003bdb9
commit
d7bb9273f3
14 files changed
+250
-60
No files matched your search
@@ -16,18 +16,18 @@ LINKS = [("usr/lib", "/lib"), ("usr/lib64", "/lib64"), ("usr/bin", "/bin"), ("us
|
||||
|
||||
|
||||
class Sandbox:
|
||||
def __init__(self, kind, workspace, toolchain_binds, path_dirs, docs=None, env=None):
|
||||
def __init__(self, kind, workspace, toolchain_binds, path_dirs, docs=(), env=None):
|
||||
if kind == "bwrap" and shutil.which("bwrap") is None:
|
||||
raise SystemExit("sandbox bwrap requested but bubblewrap is not installed")
|
||||
self.kind = kind
|
||||
self.workspace = os.path.realpath(workspace)
|
||||
self.binds = toolchain_binds
|
||||
self.path = ":".join(path_dirs + ["/usr/bin", "/bin"])
|
||||
self.docs = os.path.realpath(docs) if docs else None
|
||||
self.docs = [(name, os.path.realpath(p)) for name, p in docs]
|
||||
self.env = dict(env or {})
|
||||
|
||||
def describe(self):
|
||||
return {"kind": self.kind, "network": self.kind != "bwrap", "toolchain_binds": self.binds, "docs": self.docs}
|
||||
return {"kind": self.kind, "network": self.kind != "bwrap", "toolchain_binds": self.binds, "docs": [{"mount": "/docs/" + n, "path": p} for n, p in self.docs]}
|
||||
|
||||
def argv(self, command):
|
||||
if self.kind == "none":
|
||||
@@ -43,8 +43,12 @@ class Sandbox:
|
||||
for d in self.binds:
|
||||
a += ["--ro-bind", d, d]
|
||||
if self.docs:
|
||||
target = "/docs" if os.path.isdir(self.docs) else "/docs/" + os.path.basename(self.docs)
|
||||
a += ["--ro-bind", self.docs, target]
|
||||
# A tmpfs mount point, remounted read-only after the binds, keeps
|
||||
# /docs read-only as a whole.
|
||||
a += ["--tmpfs", "/docs"]
|
||||
for name, p in self.docs:
|
||||
a += ["--ro-bind", p, "/docs/" + name if name else "/docs"]
|
||||
a += ["--remount-ro", "/docs"]
|
||||
a += ["--bind", self.workspace, "/work", "--chdir", "/work", "--clearenv"]
|
||||
env = {"PATH": self.path, "HOME": "/tmp", "TMPDIR": "/tmp", "LANG": "C.UTF-8"}
|
||||
env.update(self.env)
|
||||
|
||||
Reference in new issue
Block a user