feat(bench): execute restart-safe runtime candidates through Pier#512
Conversation
tangletools
left a comment
There was a problem hiding this comment.
✅ Auto-approved drewstone PR — 23bf4991
This PR was opened by the trusted drewstone account.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.
tangletools · auto-approval · reason: drewstone_author · 2026-07-11T15:56:31Z
tangletools
left a comment
There was a problem hiding this comment.
🟢 Value Audit — sound
| Verdict | sound |
| Concerns | 2 (2 low) |
| Heuristic | 0.2s |
| Duplication | 0.0s |
| Interrogation | 179.1s (2 bridge agents) |
| Total | 179.3s |
💰 Value — sound
Adds Pier (Datacurve's harness) as a restart-safe transport for the existing immutable candidate-execution spine, correctly reusing the runtime's executor port and atomic execution path — no equivalent existed and no better approach found.
- What it does: Extends the runtime's frozen candidate-execution pipeline (prepare → execute → finalize → grade) to run through Pier's official task container and verifier. A new Pier executor implements the runtime's existing AgentCandidateExecutorPort: it stages the runtime's exact canonical execution-plan and materialization-receipt bytes to disk, a Python custom agent (TangleCandidateAgent) rechecks those sig
- Goals it achieves: (1) Open Pier's official verifier as a deployable grading path for frozen Tangle candidates, widening the benchmark set the eval flywheel can score against. (2) Preserve the tamper-evidence invariant: the runtime stays the sole authority for verification, model access, trace capture, and settlement; Pier only replays signed bytes and cannot self-author a score. (3) Make an interrupted candidate at
- Assessment: Architecturally sound and in the grain of the codebase. The change implements AgentCandidateExecutorPort (src/candidate-execution/types.ts:479) — the runtime's documented extension seam — and delegates to executePreparedAgentCandidate (src/candidate-execution/execute.ts:75), so it rides the single existing atomic execution path rather than forking a second executor. The Python bridge (candidate_co
- Better / existing approach: none — this is the right approach. Searched for an existing container/docker executor implementing AgentCandidateExecutorPort (grep'd src/ and bench/src/): none exists beyond test mocks and this Pier implementation, so there is nothing to reuse or extend. Checked whether pier-workspace-archive.ts duplicates runtime workspace logic: it does not — the runtime's artifacts.ts scans live directories ag
- Model: opencode/zai-coding-plan/glm-5.2
- Bridge attempts: 2
- Bridge warning: opencode/kimi-for-coding/k2p7: bridge stream ended without value-audit content
🎯 Usefulness — sound
A Pier transport adapter for the runtime's existing candidate-execution port, with a serious restart-safe recovery story; reuses the atomic execution path rather than duplicating it, and is exercised end-to-end against a real Pier checkout.
- Integration: Cleanly wired. bench/src/pier-agent.ts:538 constructs an
AgentCandidateExecutorPortwhose execute/stopAndCapture delegate to a Pier trial controller, and pier-agent.ts:616 calls the runtime's existingexecutePreparedAgentCandidate(the same atomic path the improvement-cycle uses at src/intelligence/improvement-cycle.ts:253). Everything is exported from bench/src/index.ts:57-81. The Python `Tan - Fit with existing patterns: Matches the codebase's adapter-implements-port grain exactly. The runtime owns
AgentCandidateExecutorPort(src/candidate-execution/types.ts:479) and stays domain-clean; the bench package owns the Pier-specific transport — consistent with CLAUDE.md's layering rule that domain behavior enters by injection. The recovery executor (pier-agent.ts:128) implements the samestopAndCapture-only contract - Real-world viability: Designed for realistic crash/restart conditions. FilePierCandidateTrialController (pier-trial-controller.ts:411) persists only non-secret process/container identity (pid, process-group, session, start-tick, Docker compose project labels) via atomic fsync'd writes, so a fresh evaluator process can locate and kill an abandoned trial. Process-identity verification via /proc/pid/stat start-tick matchi
- Model: opencode/zai-coding-plan/glm-5.2
- Bridge attempts: 1
🔎 Heuristic Signals
🟡 Cruft: console debug added bench/scripts/run-package-tests.mjs
+console.log(
package tests passed: ${tests.length}/${tests.length} TypeScript files + Pier bridge)
🟡 Cruft: magic number added bench/pier_agents/tangle_candidate.py
timeout_seconds = self._contract.timeout_ms / 1000
What this audit checks
It judges the change on its merits — not whether it was tasked out in an issue. Unticketed, fast-moving work is fine; the question is whether the change is good and whether a better or existing approach should be used instead.
| Pass | What it asks |
|---|---|
| Heuristic | Vague title? Whitespace-only or cruft-bearing diff? (content signals only) |
| Duplication | Do added function/class names already exist elsewhere in the repo? |
| Value Audit | What does it do? What goal does it achieve? Is it good? Better architecture or already-exists? |
| Usefulness Audit | Does it integrate and fit? Will it hold up in real use and actually get used? |
Findings are concerns, not blocks — the human reviewer decides what to do with them.
✅ No Blockers —
|
tangletools
left a comment
There was a problem hiding this comment.
✅ Approved — 12 non-blocking findings — 23bf4991
Full multi-shot audit completed 8/8 planned shots over 37 changed files. Global verifier still owns final merge decision.
Full immutable report for this review: trace
Summary comment for this run: full summary
tangletools · 2026-07-11T16:25:31Z · immutable trace
tangletools
left a comment
There was a problem hiding this comment.
✅ Auto-approved drewstone PR — 3cc6622e
This PR was opened by the trusted drewstone account.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.
tangletools · auto-approval · reason: drewstone_author · 2026-07-11T16:57:30Z
Summary
@tangle-network/agent-benchand update the bench package to the published runtime/eval/interface/sandbox releasesGrep-before-build result: this reuses
prepareAgentCandidateExecution,executeAgentCandidateAtomically, protectedTraceStorecapture, and the existing benchmark adapters; it does not add a second candidate executor or grader path.Verification
pnpm typecheck:publicpnpm test— 21/21 TypeScript test files plus the Python Pier bridgepnpm verify:package— packed consumer installed@tangle-network/agent-runtime@0.92.1and prepared/disposed a real candidatePIER_REPO=/home/drew/code/pier pnpm verify:pier— failure control 0/1, fresh-process recovery removed process and container, success control 1/1; both controls recorded 0 model calls, 0 input/output tokens, and $0git merge-tree --write-tree origin/main HEADNo model inference was used by the verification fixtures.