abhigyanpatwari/GitNexus · error · SandboxError
pinned GitNexus runtime metadata is invalid: {exc}
Error message
pinned GitNexus runtime metadata is invalid: {exc} What it means
Raised by trusted_gitnexus_runtime_mounts() when either lstat on gitnexus/dist/cli/index.js fails (OSError) or parsing gitnexus/package.json fails (json.JSONDecodeError). The harness refuses to mount a runtime whose entrypoint or manifest cannot be inspected, because the sandbox's reproducibility contract depends on a known-good pinned CLI.
Source
Thrown at eval/workflow_bench/runtime_mounts.py:233
shared,
"package.json",
f"{SANDBOX_GITNEXUS_SHARED}/package.json",
directory=False,
),
_validated_runtime_component(
runtime,
"hooks/claude",
f"{SANDBOX_GITNEXUS}/hooks/claude",
directory=True,
),
)
entrypoint = mounts[0].source / "cli" / "index.js"
try:
entrypoint_mode = entrypoint.lstat().st_mode
package = json.loads(mounts[1].source.read_text())
except (OSError, json.JSONDecodeError) as exc:
raise SandboxError(f"pinned GitNexus runtime metadata is invalid: {exc}") from exc
if stat.S_ISLNK(entrypoint_mode) or not stat.S_ISREG(entrypoint_mode):
raise SandboxError(f"pinned GitNexus runtime entrypoint must be regular and non-symlink: {entrypoint}")
if package.get("version") != PINNED_GITNEXUS_VERSION:
raise SandboxError(
"pinned GitNexus runtime version drifted: "
f"expected {PINNED_GITNEXUS_VERSION}, got {package.get('version')!r}"
)
linked_shared = mounts[2].source / "gitnexus-shared"
if not linked_shared.is_symlink() or linked_shared.resolve(strict=True) != shared:
raise SandboxError("pinned GitNexus runtime has an unexpected gitnexus-shared dependency")
try:
shared_package = json.loads(mounts[5].source.read_text())
except (OSError, json.JSONDecodeError) as exc:
raise SandboxError(f"pinned GitNexus shared runtime metadata is invalid: {exc}") from exc
if shared_package.get("name") != "gitnexus-shared":
raise SandboxError("pinned GitNexus shared runtime has an unexpected package identity")
return mountsView on GitHub (pinned to d540b00184)
Solutions
- Run `cd gitnexus && npm install && npm run build` so dist/cli/index.js exists and is up to date.
- Validate the manifest: `node -e "JSON.parse(require('fs').readFileSync('gitnexus/package.json'))"` and fix any syntax error.
- Confirm read access: `ls -l gitnexus/dist/cli/index.js gitnexus/package.json` as the harness user.
Defensive patterns
Strategy: validation
Validate before calling
import json, stat
from pathlib import Path
def gitnexus_runtime_metadata_ok(root: Path) -> bool:
entry = root / "dist" / "cli" / "index.js"
pkg = root / "package.json"
try:
mode = entry.lstat().st_mode
json.loads(pkg.read_text())
except (OSError, json.JSONDecodeError):
return False
return stat.S_ISREG(mode) Try / catch
from .proposer_sandbox import SandboxError
try:
mounts = trusted_gitnexus_runtime_mounts()
except SandboxError as exc:
# surface to operator; do not retry without fixing the runtime
raise SystemExit(f"runtime setup failed: {exc}") from exc Prevention
- Always run `cd gitnexus && npm install && npm run build` before invoking the benchmark.
- Treat package.json and dist/ as build artifacts — restore them from git rather than hand-editing.
- Run the benchmark as a user with read access to the whole gitnexus/ tree.
When it happens
Trigger: Calling trusted_gitnexus_runtime_mounts() when gitnexus/dist/ has not been built (no cli/index.js), when package.json has been hand-edited into invalid JSON, or when file permissions deny the harness user read access to either file.
Common situations: Fresh checkout where `cd gitnexus && npm install && npm run build` was skipped; a botched merge that left package.json truncated; running the benchmark as a user without read perms on the gitnexus/ tree.
Related errors
- pinned GitNexus runtime component is unavailable: {source}:
- pinned GitNexus runtime component must be a real {kind}: {so
- pinned GitNexus runtime entrypoint must be regular and non-s
- Analyzer build changed while its identity was being computed
- Invoked analyzer artifact is absent from the validated build
AI-assisted analysis of abhigyanpatwari/GitNexus@d540b00184 (2026-08-12).
Data as JSON: /api/errors/3b63992e1566b0c6.
Report an issue: GitHub.