bump prime-agent to v0.9.1 - #2502
Conversation
df4e5af to
c649037
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c649037. Configure here.
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — Although the repository diff only updates a Prime Agent version, commit, and checksums, the pinned upstream release contains substantial runtime and protocol changes, including a kernel/runtime replacement and worker lifecycle updates. The existing Prime Agent execution path will adopt those changes by default, so the upgrade merits human review. You can add or adjust custom eligibility rules. Learn more. |
Stacked on #2505 → #2503 → #2496. Every third-party harness installed its program with the same routine: `mkdir -p <dir>`, take a lock on `<dir>/install.lock`, run `[ ready ] || ( install )`, raise `RuntimeError("<name> install failed: " + stderr[-500:])`. Nine copies, and they had drifted into three different locks: | lock | harnesses | |---|---| | `"$(command -v flock \|\| command -v lockf)"` | claude_code, codex, kimi_code, openclaw, pool, prime_agent | | hand-rolled symlink spinlock with dead-owner check + `EXIT` trap | pi, `node.py` (shared Node install) | | bare `flock` | rlm | Around it: the `version: str = Field(default=..., pattern=...)` field nine times, and an `rm -rf` + raise cleanup six times. **After this PR** - `harnesses/utils/install.py`: `ensure_installed(runtime, directory=, install=, env=, label=, ready=None, lock=None, shell=("sh","-c"))` and `remove_dir(runtime, path, label)`. `ready` is the optional skip test (openclaw passes none: its `SETUP` script from #2485 self-guards and must always run the transcript patch), `lock` lets the Node installer keep its lock beside the directory it replaces, `shell` lets pool and openclaw keep `bash -o pipefail`. Directory and lock paths are `shlex.quote`d, as #2485 started doing for openclaw. - `configs/harness.py`: `PinnedVersion = Annotated[str, Field(pattern=r"^[A-Za-z0-9._+-]+$")]`; the nine configs declare `version: PinnedVersion = "<default>"` and keep their own docstrings. rlm keeps its git-ref field. - claude_code, codex, kimi_code, pool, openclaw, prime_agent, pi, rlm and `ensure_node` install through the helper; claude_code, codex, openclaw, prime_agent and hermes_agent clean up through it. hermes_agent, terminus_2 and mini_swe_agent install via `prepare_uv_script` and only pick up `PinnedVersion`. **Intended behaviour changes** (all in the lock and error path, none in install scripts): 1. Every harness locks with `flock || lockf` when one is present (they release on holder death natively; every common base image ships one, Alpine via busybox) and falls back to the symlink spinlock that pi and the Node installer used before when neither is. The fallback records its owner as `pid:starttime` (from `/proc`, pid alone where unreadable) so a reused pid is not mistaken for the live holder, and reaps a lock that is a regular file or whose owner is gone; the original spinlock spun forever on a regular lock file because `kill -0 ""` succeeds under busybox ash, and would wait on a reused pid until that process exited (e19f2c8). 2. rlm gains the lockf fallback it lacked. 3. Install failures report stdout when stderr is empty or whitespace-only (three harnesses already did the former). Cleanup failures share one phrasing, `failed to clean up <label>: …`. 4. `mkdir -p /var/tmp/vf-node` now precedes the Node install; its script creates the directory itself anyway. Rebased onto main after #2496 merged; the OpenClaw 2.0 (#2485), RLM (#2507) and prime-agent (#2502) changes on main are preserved. **Verification.** I replayed `setup()` and `cleanup()` for all nine harnesses plus `ensure_node` against a recording fake runtime on the base branch and this branch and diffed every command and environment. Against the rebased base, 17 of 23 replays are byte-identical (openclaw included, since #2485 already uses `flock || lockf`); the six that differ (the four Node installs, pi, rlm) differ only in the lock prefix and are identical from `sh -c` onward. `PinnedVersion` rejects `""`, `"a/b"` and `"bad version!"` and accepts `"0.147.0"`. Also `ruff check`, `ruff format --check`, `ty check verifiers`, `pytest tests/v1 -m "not e2e"` (82 passed). Both lock branches were exercised on `alpine:latest`: two concurrent installs serialize, the install's exit code propagates, a dead-owner symlink, a leftover regular lock file and a live process holding a lock with a stale identity (pid reuse) are reaped, a live owner with its true identity is waited on (a4f4ea5). The docker e2e job runs on this PR as well. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- Macroscope's pull request summary starts here --> <!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. --> <!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. --> > [!NOTE] > ### Consolidate harness install-lock and cleanup into shared helpers > - Adds `ensure_installed` and `remove_dir` to [install.py](https://github.com/PrimeIntellect-ai/verifiers/pull/2506/files#diff-5ddaf01b8cbb0ded4d3d42b42549b45ad9866136f071e72e14cde15c105d8417); `ensure_installed` handles directory creation, optional readiness checks, `flock`/`lockf` serialization with a PID/start-time symlink fallback, stale-owner cleanup, and label-specific errors. > - Adds a shared `PinnedVersion` type alias in [harness.py](https://github.com/PrimeIntellect-ai/verifiers/pull/2506/files#diff-c5b409466f272f39cbab9228a91d9b6de6c8a0cdd33ad73f05e7fd690966e478) and replaces inline version field declarations across all harness config classes. > - Migrates `setup` installers and `cleanup` handlers in the Claude Code, Codex, Hermes, Kimi Code, Node, OpenClaw, Pi, Pool, Prime Agent, and RLM harnesses to the shared helpers, passing through their existing scripts, environments, and labels. > - Risk: all harnesses now share one locking and removal implementation; verify per-harness lock paths and readiness conditions passed to `ensure_installed`, especially `ensure_node` in [node.py](https://github.com/PrimeIntellect-ai/verifiers/pull/2506/files#diff-4117aae0a7b4023c32f09206611f0bf2149b2a51e264157bd24339df2166dfa8) where the lock lives outside the installed directory. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 93a2100.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here --> <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > All harness program installs and several cleanups now share one locking and error path; lock location and readiness checks (especially Node’s external lock) affect every concurrent rollout on a shared runtime. > > **Overview** > Introduces **`ensure_installed`** and **`remove_dir`** in `harnesses/utils/install.py` and routes harness `setup`/`cleanup` through them instead of nine copy-pasted `mkdir`, lock, `[ ready ] || install`, and `rm -rf` blocks. > > **`ensure_installed`** centralizes concurrent install serialization (`flock` / `lockf`, with an improved symlink spinlock fallback using `pid:starttime`), optional readiness skips, configurable shell (`bash -o pipefail` where needed), and consistent install failure messages (stderr or stdout). **`remove_dir`** standardizes cleanup errors as `failed to clean up <label>: …`. > > Harness configs that pin npm/release versions now use shared **`PinnedVersion`** in `configs/harness.py` instead of repeated `Field(..., pattern=...)` declarations (RLM keeps its git-ref field). > > Migrated installers: Claude Code, Codex, Kimi Code, Pool, OpenClaw, Prime Agent, Pi, RLM, and shared **`ensure_node`**. Cleanup via **`remove_dir`**: Claude Code, Codex, Hermes, OpenClaw, Prime Agent (plus OpenClaw staged-skills clear). Hermes, mini-swe-agent, and Terminus 2 only pick up **`PinnedVersion`**. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 93a2100. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

Minimal version bump (+8/-8 lines):
PRIME_AGENT_VERSION:"0.8.1"→"0.9.1"PRIME_AGENT_COMMIT: SHA updated to81ae3cb34d27d38ee37f9e205a1e73694993b344(v0.9.1 release tag)Verified by downloading all four tarballs from GitHub releases and computing SHA256 locally.
Note
Low Risk
Dependency pin and install checksum updates only; behavior changes come from the external prime-agent v0.9.1 release, not from harness logic edits.
Overview
Bumps the Prime Agent harness from 0.8.1 to 0.9.1 so verifier runs install and execute the newer release.
The pinned commit (
PRIME_AGENT_COMMIT) andPrimeAgentHarnessConfig.commitLiteraldefault move to81ae3cb34d27d38ee37f9e205a1e73694993b344. The embedded install script’s SHA256 checksums for the four release tarballs (prime-agent,prime-agent-ai,prime-agent-core,prime-agent-tui) are updated to match v0.9.1 artifacts downloaded from GitHub releases.Reviewed by Cursor Bugbot for commit 3119b16. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Bump
PrimeAgentHarnessConfigto Prime Agent v0.9.1Updates the pinned Prime Agent commit to
81ae3cb34d27d38ee37f9e205a1e73694993b344and release version from 0.8.1 to 0.9.1 in harness.py. Replaces SHA-256 checksums for the agent, AI, core, and TUI release tarballs to match the new artifacts.Macroscope summarized 3119b16.