Skip to content

feat(hardware-runner): add benchmark-gate.v1 and outbound hardware runner - #40

Merged
thxCode merged 16 commits into
mainfrom
feat/phase3-2-hardware-runner-benchmark-gate
Nov 22, 2026
Merged

thxCode merged 16 commits into
mainfrom
feat/phase3-2-hardware-runner-benchmark-gate

Conversation

@thxCode

@thxCode thxCode commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind feature
/area core
/area controller
/area github-app
/area cli
/area docs

Summary

Implements Phase 3.2 (hardware_execution, benchmark-gate.v1, and outbound remote hardware runner) across the Loopwright workspace per specs/2026-11-21-hardware-execution-benchmark-gate-and-remote-runner.md:

  • @loopwright/hardware-runner (11th workspace package): Adds an outbound-only pull-lease HTTP/TLS relay server, SQLite/in-memory lease queue with monotonic leaseEpoch fencing and preemption requeue (leased/running -> preempted -> queued), hardware probe collectors (CUDA, ROCm, Ascend, CPU/synthetic), and a two-stage blind evaluator:
    • Stage A (build): Compiles candidate overlays with zero access to held_out_workloads, verifies LWTREE01 base trees and SecretScrubber binary safety, and uploads SHA-256-verified CAS build artifacts (.cubin, .o, .sass, etc.).
    • Stage B (blind benchmark): Mounts private held_out_workloads read-only under OS confinement (macOS Seatbelt with (deny process-fork), Linux bwrap + socket-denying BPF, or Docker with --init, --user, exact GPU device pinning, and socket-denying seccomp), enforces networkMode: 'none', exports zero Stage B files, and returns HMAC-signed verdicts with physical hardwareProvenance and numeric metrics.
  • @loopwright/core: Extends target.matrix cells with accelerator hardware metadata, hardwareProvenance, metricThresholds (bounds and comparative including finite negative ratios), and verifierArtifactBudget (MAX_LIMITS up to 16 GiB / 16,384 files); enforces provenance and metric thresholds inside evaluateAcceptance.
  • @loopwright/controller: Unlocks hardware_execution checks strictly when bound to a host-owned benchmark-gate.v1 handler and hardware matrix cell; adds 1 MiB streaming CAS staging/ingestion, LWTREE01 bundling, preemption exhaustion settlement as blocked (BENCHMARK_PREEMPTED, zero LLM repair retries), and offline recovery/reconciliation parity without relaxing external_write reconcile_required fences.
  • @loopwright/taskpack & @loopwright/github-app: Compiles hardware matrix cells and host-owned benchmark-gate.v1 gates while forbidding manifest-level url, signingCredentialRef, or authCredentialRef overrides; enforces strict cross-consumer credential isolation across benchmark endpoints, local command gates, GITHUB_TOKEN/GH_TOKEN, decisions, MCP, and publication; projects hardware target cells in memory finalization.
  • @loopwright/cli & closure ledger: Adds loopwright runner relay --config FILE [--json] and loopwright runner worker --config FILE [--once] [--json] (bundled into @gpustack/loopwright) and registers @loopwright/hardware-runner evidence paths while preserving the honest 23-row closure split (18 closedLocal, 5 unprovisionedExternal).
  • Documentation & specs: Updates README.md, AGENTS.md, docs/, skills, and specs/2026-11-21-hardware-execution-benchmark-gate-and-remote-runner.md (Status: Shipped).

Contract & upgrade impact: Purely additive. Existing Taskpack, TaskContract, TrustedRegistry, gate.v1, and command.v1 (parameters.mounts / allow-host-mounts) workflows continue unchanged; hardware_execution remains fail-closed unless explicitly bound to a hardware cell and host-owned benchmark-gate.v1 endpoint.

Verification boundaries: Verified locally on macOS across all 11 workspace packages (unit, integration, loopback relay/worker, Seatbelt isolation, packed CLI tarball, and closure failure matrix). Hugo HTML/llms.txt generation (npm run site), Linux bwrap, Docker GPU passthrough, and live SSH physical GPU hosts (LOOPWRIGHT_CUDA_SSH_HOST / LOOPWRIGHT_ROCM_SSH_HOST) remain external CI/host boundaries not executed on this local macOS machine.

Related Issues

NONE

Verification

  • npm run build passed cleanly
  • npm run typecheck passed cleanly
  • npm run lint passed cleanly
  • npm run lint:docs passed cleanly (27 docs pages, 37 linked sources, 0 errors)
  • npm run site built and verified with zero broken links (hugo is not installed on this local macOS host; check-docs.mjs passed locally and full Hugo site generation runs in CI)
  • Focused and full tests passed (npm test: 1,643 tests, 1,638 passed, 0 failed, 5 skipped — 3 Linux-only sandbox tests and 2 opt-in live SSH smokes; loopwright closure --verify-failures --json: 18 closedLocal, 5 unprovisionedExternal, 14/14 failure matrix, 56 checked files)
  • OS sandbox diagnostics verified on local macOS Seatbelt ((deny process-fork) and write/network containment); Linux bwrap, Docker GPU, and live SSH CUDA/ROCm execution remain unexecuted external boundaries
  • Verified .github/workflows/ maintains least-privilege permissions and remains protected against untrusted taskpack/sandbox writes (zero workflow files modified)
  • Signed-off-by: thxCode <thxcode0824@gmail.com> Developer Certificate of Origin (DCO) included on all commits

Does this PR introduce a user-facing change?

Added `hardware_execution` verification via host-owned `benchmark-gate.v1` gates, hardware `target.matrix` provenance and quantitative `metricThresholds`, the `@loopwright/hardware-runner` package, and `loopwright runner relay|worker` CLI commands. No migration is required for existing taskpacks or registries.

…wiring

- Add private @loopwright/hardware-runner package depending only on core and taskpack
- Wire 11-package build, test, lint, and npm tarball bundling scripts
- Register hardware-runner in self-upgrade unmanaged workspaces and digest lockfile
- Verify scaffold exports, incremental build, and global tarball resolution

Task 1 of hardware-execution-benchmark-gate-and-remote-runner.

Signed-off-by: thxCode <thxcode0824@gmail.com>
…, and verifier CAS budget

- Add optional hardware specs, targetCellId, and metricThresholds while preserving legacy hashes
- Enforce unmixed hardware_execution checks and Evidence hardwareProvenance with CAS URI binding
- Evaluate hardware provenance and bounds/comparative thresholds independently in evaluateAcceptance
- Budget .loopwright-verifier/<slotId>/* CAS descriptors separately and block candidate smuggling

Task 2 of hardware-execution-benchmark-gate-and-remote-runner.

Signed-off-by: thxCode <thxcode0824@gmail.com>
… server

- Load bounded YAML and JSON configs via taskpack helpers with symlink guards.
- Enforce pull-lease fencing, monotonic drift checks, expiry sweeps, and single-owner preemption.
- Serve authenticated controller benchmark jobs, worker leases, SSE cancel, and 1 MiB CAS.
- Persist exclusive SQLite CAS ownership, durable recovery fences, and signed receipts.

Task 5 of hardware-execution-benchmark-gate-and-remote-runner.

Signed-off-by: thxCode <thxcode0824@gmail.com>
…ecovery

- Enforce bidirectional hardware_execution and benchmark-gate.v1 compile, registry, and lease bounds.
- Add streaming CAS staging, LWTREE01 base-tree bundling, and binary SecretScrubber verifier ingestion.
- Settle preemption exhaustion as blocked BENCHMARK_PREEMPTED with zero repair or rework retries.
- Wire offline reconcile, crash recovery, async acceptance verification, and mode parity checks.
- Allow untouched classic baseline executables in the pre-Pi native executable guard.

Task 3 of hardware-execution-benchmark-gate-and-remote-runner.

Signed-off-by: thxCode <thxcode0824@gmail.com>
- Compile hardware target.matrix cells, thresholds, and host-owned benchmark-gate.v1 bindings.
- Enforce cross-consumer credential isolation across preflight, MCP, publishers, decisions, and GitHub auth.
- Project hardware target cells to id, platform, and variant in turnkey memory finalizers.

Task 4 of hardware-execution-benchmark-gate-and-remote-runner.

Signed-off-by: thxCode <thxcode0824@gmail.com>
…nd evaluator

- Add trusted CUDA, ROCm, and Ascend hardware provenance probes and workload snapshots.
- Implement two-stage native_os and Docker blind sandbox evaluation with kernel containment.
- Add zero-inbound-port pull-lease worker, NAT loopback E2E, and optional live SSH smoke suites.

Task 6 of hardware-execution-benchmark-gate-and-remote-runner.

Signed-off-by: thxCode <thxcode0824@gmail.com>
…dger

- Add loopwright runner relay and worker CLI commands with signal and exit mapping.
- Register hardware-runner package and evidence paths in the 23-row closure ledger.
- Preserve 18 closedLocal and 5 unprovisionedExternal counts and packed binary help parity.

Task 7 of hardware-execution-benchmark-gate-and-remote-runner.

Signed-off-by: thxCode <thxcode0824@gmail.com>
… workspace

- Update module map, configuration, CLI, internals, and closure docs for hardware-runner.
- Sync AGENTS.md, README.md, and loopwright skills to the 11-package workspace layout.
- Mark Phase 3.2 specification as Shipped with all eight tasks completed.

Task 8 of hardware-execution-benchmark-gate-and-remote-runner.

Signed-off-by: thxCode <thxcode0824@gmail.com>
…ire bounds

- Bound Stage A diagnostic truncation to 2048 chars without splitting UTF-16 surrogates.
- Cap Stage B threshold-denial findings at 64 entries while preserving the threshold finding.
- Allow finite negative comparative ratio thresholds and enforce baseTreeBundle invariants in relay.

Signed-off-by: thxCode <thxcode0824@gmail.com>
@gpustack-code-review

gpustack-code-review Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

✅ OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s).

Reviewed 0fb437c..5eb830e only; earlier commits in this PR were reviewed in a previous run.

Comment thread packages/cli/src/main.ts Resolved
Comment thread packages/cli/src/main.ts Resolved
Comment on lines +423 to +425
: input.source?.version === 1
? rawCandidateArtifacts.map(item => ({ ...item, mode: '100644' as const }))
: rawCandidateArtifacts;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
Exec-bit policy is inconsistent between source versions. For v2 sources, a candidate file whose effective mode differs from what Pi can materialize is refused fail-closed in controller.ts (piMaterializedMode check), but here for v1 sources every candidate file's mode is unconditionally overwritten with 100644 — including files that decodeDelegatedWorkspace now captures with an explicit 100755 (see artifacts.push({ name, bytes, mode }) above). A v1 agent that legitimately chmod'd a file +x will have its exec bit silently stripped, and the run proceeds with a non-executable file, which the hardware runner then stages with mode 100644 in buildCandidateArtifactsDescriptor — a build/exec mismatch instead of a refusal. Either preserve an explicitly captured mode and let the controller's fail-closed check reject it (v2 behavior), or document why silent degradation is acceptable for v1.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not changed (false positive). decodeDelegatedWorkspace returns early at packages/controller/src/capture.ts:384-389, preserving every delegated overlay mode. Lines 411-425 execute only for native Pi decodePiCapture, where classic v1 workspaces are always materialized read-only (0o444 / 100644).

Comment thread packages/controller/src/credentials.ts Resolved
Comment thread packages/controller/src/reconcile.ts Resolved
Comment thread packages/hardware-runner/src/worker.ts Resolved
Comment thread packages/taskpack/src/models-config.ts Resolved
Comment thread packages/taskpack/src/taskpack.ts Resolved
Comment on lines +2173 to +2179
if (
existing.endpointId !== spec.endpointId
|| existing.purpose !== spec.purpose
|| existing.destinationRef !== spec.destinationRef
|| existing.envName !== spec.envName
) {
if (isBenchmark) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · high
Behavior regression: two ordinary gate.v1 external gates that share the same signingCredentialRef (or the same authCredentialRef) identifier but bind to different endpoints previously compiled fine — gateCredentialSpecs.set silently deduplicated the credential entry. With recordGateCredentialSpec, existing.endpointId !== spec.endpointId now triggers manifestInvalid('external gate credential ... conflicts with an existing endpoint binding'). A host reusing one gate signing credential across multiple endpoints is a legitimate topology (e.g. one shared relay signing key); it is only rejected here, not for a documented isolation reason. Consider permitting the reuse when envName matches and only the derived destinationRef differs, mirroring what the old code effectively allowed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not changed (intentional security invariant). In TrustedRegistry, each CredentialBinding maps one credential id to a single endpoint-scoped destinationRef (gate-sign-<endpointId> / gate-auth-<endpointId>). Silently deduplicating a shared id across distinct endpoints would clobber the first endpoint's destination binding and allow cross-endpoint credential aliasing; this invariant is explicitly tested in packages/taskpack/test/benchmark-gate-compile.test.ts (lines 1510-1599).

- Support linux-landlock fallback with blockAllSockets seccomp when bwrap is unavailable on Linux.
- Lower MAX_STAGE_B_RESULT_BYTES to 48 KiB and use OVERLAY_LIMITS.maxMaxBytes for grant bounds.
- Preserve parseStrictJsonBytes error codes, parse SSE cancel frames strictly, and drop dead code.

Signed-off-by: thxCode <thxcode0824@gmail.com>
- Fail closed when derived credential stream overlap exceeds 256 KiB and rethrow lstat errors.
- Reject empty saved verifierArtifacts on passing replay and seed rate-limited progress at -Infinity.
- Propagate non-syntax workspace read errors and deduplicate settlement and verdict-detail helpers.

Signed-off-by: thxCode <thxcode0824@gmail.com>
…nostics

- Reject GITHUB_TOKEN and GH_TOKEN on ordinary gate.v1 credential bindings and quote metric keys.
- Exclude models.json apiKeyEnv variables from command.v1 checks and deduplicate scrubber helpers.
- Document provider credential precedence and replace nested ternary check capability mapping.

Signed-off-by: thxCode <thxcode0824@gmail.com>
- Track sticky unknown and fenced worker settlements across runs and prioritize fenced over SIGINT.
- Source runner secret env fields from @loopwright/hardware-runner and remove nested diagnostic ternary.

Signed-off-by: thxCode <thxcode0824@gmail.com>
@thxCode

thxCode commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the Ubuntu CI failure and all 31 OpenCodeReview Round 1 findings (14 inline threads + 17 summary-routed items) across commits 8462447, cdc8d4a, 2c7c0f2, and 64bdd5e.

CI Failure Fix (Ubuntu 24.04 x64 & arm64)

  • Root cause: All 4 failing Ubuntu 24.04 jobs failed with linux-bwrap binary is missing or untrusted (/usr/bin/bwrap) because Ubuntu 24.04 CI runners do not pre-install bubblewrap and prepareStageSandboxInvocation only listed ['linux-bwrap'] on Linux.
  • Fix (8462447): Added additive blockAllSockets: true support to LANDLOCK_BOOTSTRAP_SCRIPT in packages/taskpack/src/sandbox.ts (denying socket, socketpair, connect, bind, listen, accept, accept4 + x32 + dangerous syscalls at the kernel boundary with EPERM) and enabled ['linux-bwrap', 'linux-landlock'] fallback in packages/hardware-runner/src/evaluator.ts with strict positive read allowlists (LINUX_LANDLOCK_POSITIVE_READ_ROOTS), overlap refusal, disjoint Stage A/B write masks, and sanitized env. Added unit coverage in packages/hardware-runner/test/evaluator.test.ts.

Inline Review Threads (14 total: 10 fixed & resolved, 4 not changed / left open)

Thread Location Verdict Outcome
#4657423888 packages/cli/src/main.ts:1725-1733 Engineering fix Track sticky unknown/fenced settlements across all jobs (64bdd5e)
#4657423890 packages/cli/src/main.ts:1734-1746 Engineering fix Prioritize fenced exit 7 over SIGINT/SIGTERM + regression test (64bdd5e)
#4657423902 packages/controller/src/capture.ts:423-425 False positive Early return at L384 already handles decodeDelegatedWorkspace; L411-425 is native Pi v1 only (left open)
#4657423904 packages/controller/src/credentials.ts:82-83 Engineering fix Fail closed (CONFIG_CREDENTIAL_INVALID) when derived overlap exceeds 256 KiB (cdc8d4a)
#4657423908 packages/controller/src/reconcile.ts:444-445 Engineering fix Enforce savedVerifierRefsRaw.length === expectedOutputs.length on passing replays (cdc8d4a)
#4657423910 packages/controller/src/reconcile.ts:1087 False positive Intentional fail-closed reconcile; resumeCycleWithPorts settles expired unconfirmed proof as blocked (benchmark-reconcile.test.ts:1743-1778, left open)
#4657423911 packages/github-app/src/action.ts:1728-1730 False positive resolveBoundProviderCredentialEnv already honors credentialEnvMap.provider on single/pinned runs; multi-model fallback intentionally prefers per-model manifestApiKeyEnv (left open)
#4657423916 packages/github-app/src/action.ts:2051-2053 Engineering fix Include modelsJsonApiKeyEnvs in scrubber and command.v1 forbidden env sets (2c7c0f2)
#4657423919 packages/hardware-runner/src/config.ts:224-226 Engineering fix Preserve caller error code in parseStrictJsonBytes + regression test (8462447)
#4657423923 packages/hardware-runner/src/evaluator.ts:67 Engineering fix Lower MAX_STAGE_B_RESULT_BYTES to 49_152 (48 KiB) for 16 KiB :complete control headroom + test (8462447)
#4657423928 packages/hardware-runner/src/worker.ts:1192 Engineering fix Replace 17_179_869_184 literal with OVERLAY_LIMITS.maxMaxBytes (8462447)
#4657423930 packages/taskpack/src/models-config.ts:823-824 Engineering fix Documented intentional host byProvider > explicitProviderTokenEnv precedence (2c7c0f2)
#4657423932 packages/taskpack/src/taskpack.ts:2062-2063 Engineering fix Reject GITHUB_TOKEN/GH_TOKEN in ordinary gate.v1 resolveGateCredPair + test (2c7c0f2)
#4657423935 packages/taskpack/src/taskpack.ts:2173-2179 False positive Intentional 1-to-1 credential-to-endpoint destination invariant covered by benchmark-gate-compile.test.ts:1510-1599 (left open)

Summary-Routed Items (17 total: 15 fixed, 2 not changed)

  • Fixed (15):
    • packages/cli/src/main.ts:1544-1546 & 1754-1758 (64bdd5e): Exported RUNNER_SECRET_ENV_FIELDS / RUNNER_SECRET_ENV_LIST_FIELDS from @loopwright/hardware-runner as the single schema source (keeping malformed-YAML fallback scrubbing) and replaced the nested diagnostic ternary.
    • packages/controller/src/controller.ts:625-635 (cdc8d4a): Extracted shared extractGateVerdictDetail helper.
    • packages/controller/src/benchmark-gate.ts:1326-1327 (cdc8d4a): Seeded lastRenewMs = -Infinity so the first progress renewal fires immediately.
    • packages/controller/src/reconcile.ts:763-765 (cdc8d4a): Extracted shared buildBenchmarkSettlement builder across all three settlement paths.
    • packages/controller/src/step.ts:363-366 & reconcile.ts:593 (cdc8d4a): Narrowed catch to CONFIG_SYNTAX so oversize/artifact errors propagate instead of falling back to v1 100644.
    • packages/github-app/src/action.ts:1322-1327 (2c7c0f2): Extracted registerEnvSecrets helper.
    • packages/controller/src/storage.ts:378-381 (cdc8d4a): Rethrow unexpected non-ENOENT lstat errors in unlinkIfOwnedInode.
    • packages/controller/src/acceptance.ts:370-374 (cdc8d4a): Replaced nested ternaries with authenticateCheckByImpl and expectedProducerByImpl.
    • packages/hardware-runner/src/queue.ts:528-534 (8462447): Removed dead intermediate job.state = 'preempted' assignment.
    • packages/hardware-runner/src/provenance.ts:1065 (8462447): Removed unused fallbackCard0Used variable.
    • packages/hardware-runner/src/config.ts:332 (8462447): Dropped duplicated at ${path} interpolation.
    • packages/hardware-runner/src/worker.ts:1035 (8462447): Replaced includes('"cancel"') with exact event: cancel / JSON desiredState === 'cancel' parsing.
    • packages/taskpack/src/taskpack.ts:3198-3202 (2c7c0f2): Replaced nested ternary with capabilitiesForNonGateCheck.
    • packages/taskpack/src/schema.ts:1741-1743 (2c7c0f2): Quoted invalid metric keys with JSON.stringify(value).
  • Not changed (2):
    • packages/core/src/contracts.ts:190-193: >= intentionally requires pure dotted numeric versions to avoid ambiguous pre-release/build-tag ordering (535.104.05-rc1 >= 535.104.05); exact string equality supports tagged versions.
    • packages/hardware-runner/src/evaluator.ts:3009-3017: When maxChars <= 14, the 14-char ...(truncated) marker cannot fit within maxChars; returning a clean slice <= maxChars preserves the strict bound.

Verification

  • npm run build && npm run typecheck && npm run lint && npm run lint:docs && npx tsc -p tsconfig.test.json — passed (0 errors).
  • node packages/cli/dist/main.js closure --verify-failures --json — passed (18 closedLocal, 5 unprovisionedExternal, 14/14 failure matrix, 56 checked files).
  • Focused test suites passed (evaluator.test.js, worker.test.js, benchmark-gate-compile.test.js, runner-cli.test.js, turnkey-memory-hardware-projection.test.js, plus controller and taskpack suites).

Comment thread packages/controller/src/reconcile.ts Resolved
Comment thread packages/controller/src/step.ts Resolved
…sandboxes

- Allow read-only /etc/ssl/openssl.cnf, certs, ca-certificates, and pki in Linux Landlock and bwrap.
- Keep /etc/ssl/private denied so Node 26 initializes cleanly on Ubuntu 24.04 without exposing keys.

Signed-off-by: thxCode <thxcode0824@gmail.com>
…escape CLI regexes

- Catch ARTIFACT_INVALID alongside CONFIG_SYNTAX when falling back from JSON workspace parsing in step and reconcile.
- Keep artifacts.read outside JSON fallback catch so missing or oversized workspaces still propagate.
- Restore createRateLimitedProgress initial timestamp anti-flood invariant and escape CLI secret field regexes.

Signed-off-by: thxCode <thxcode0824@gmail.com>
@thxCode

thxCode commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the Round 2 Ubuntu CI failures and all 3 Round 2 OpenCodeReview findings (2 inline threads + 1 summary-routed item) in commits e873def and 0fb437c:

CI Failure Fixes (Ubuntu 24.04 x64 & arm64)

  • Linux Landlock/bwrap Node 26 startup (e873def): Ubuntu 24.04 linux-landlock runs failed on fopen(/etc/ssl/openssl.cnf, rb) (Permission denied) during Node 26 OpenSSL initialization. Added read-only /etc/ssl/openssl.cnf, /etc/ssl/certs, /etc/ca-certificates, and /etc/pki to LINUX_LANDLOCK_POSITIVE_READ_ROOTS and buildStrictLinuxBwrapArgs (packages/hardware-runner/src/evaluator.ts), keeping /etc/ssl/private denied.
  • Controller createRateLimitedProgress anti-flood invariant (0fb437c): Restored lastRenewMs = performance.now() in packages/controller/src/benchmark-gate.ts because callers already renew the lease right before constructing the rate-limited callback and benchmark-gate.test.ts explicitly enforces that immediate bursts within minIntervalMs do not flood SQLite renewals.

Round 2 OpenCodeReview Findings (3 total: 3 fixed)

  • Inline #4657532630 (packages/controller/src/reconcile.ts:594-599) & Inline #4657532645 (packages/controller/src/step.ts:363-368) (0fb437c): Fixed (resolved). Kept artifacts.read outside the JSON fallback try/catch and caught ARTIFACT_INVALID alongside CONFIG_SYNTAX from parsePrivateJson so native Pi non-JSON workspaces fall back cleanly while missing/oversized workspace reads still propagate.
  • Summary item (packages/cli/src/main.ts:1546-1547) (0fb437c): Fixed. Escaped RUNNER_SECRET_ENV_FIELDS and RUNNER_SECRET_ENV_LIST_FIELDS via escapeRegExp before joining into RegExp alternations.

Verification

  • npm run build && npm run typecheck && npm run lint && npm run lint:docs && npx tsc -p tsconfig.test.json — passed (0 errors).
  • step-engine.test.js, benchmark-gate.test.js, evaluator.test.js, runner-cli.test.js — 60/60 passed.
  • node packages/cli/dist/main.js closure --verify-failures --json — passed (18 closedLocal, 5 unprovisionedExternal, 14/14 failure matrix).

…cket probe path

- Narrow /etc/pki in Linux bwrap and Landlock read roots to public trust-store subpaths only.
- Use a short relative ./p.sock probe path in evaluator.test.ts to stay under Linux UNIX_PATH_MAX.

Signed-off-by: thxCode <thxcode0824@gmail.com>
@thxCode

thxCode commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the single Round 3 OpenCodeReview finding and the last remaining Ubuntu 24.04 shard 3/3 test failure in 5eb830e:

  • Inline #4657572091 (packages/hardware-runner/src/evaluator.ts:1928-1932): Fixed (resolved). Narrowed /etc/pki to /etc/pki/ca-trust, /etc/pki/tls/certs, /etc/pki/tls/cacerts, and /etc/pki/tls/openssl.cnf in both buildStrictLinuxBwrapArgs and LINUX_LANDLOCK_POSITIVE_READ_ROOTS so /etc/pki/tls/private and /etc/pki/CA/private remain unreadable on RPM-based distros; added assertions in packages/hardware-runner/test/evaluator.test.ts.
  • Ubuntu 3/3 Unix socket probe (packages/hardware-runner/test/evaluator.test.ts:242): Shortened the Unix listen probe path from 113 bytes (which exceeded Linux's 108-byte UNIX_PATH_MAX and triggered EINVAL in libuv before reaching kernel socket denial) to ./p.sock inside $TMPDIR.

Verification

  • npm run build && npm run typecheck && npm run lint && npm run lint:docs && npx tsc -p tsconfig.test.json — passed (0 errors).
  • evaluator.test.js (12/12 passed) and loopwright closure --verify-failures --json — passed.

@thxCode
thxCode merged commit 9fc93a1 into main Nov 22, 2026
15 checks passed
@thxCode
thxCode deleted the feat/phase3-2-hardware-runner-benchmark-gate branch November 22, 2026 10:14
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