feat(v1): integrate nano-RLM training over ACP - #2439
Conversation
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR changes the training-critical RLM execution path, including ACP session metadata, provider credential propagation, concurrency policy, dependency pinning, and metric collection. The combined runtime and sensitive-data impact warrants human review. Not approved because:
Review your spending limits in Billing settings. You can add or adjust custom eligibility rules. Learn more. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ea4935b. Configure here.
Pull Request is not mergeable
Pull Request is not mergeable
Pull Request is not mergeable
Pull Request is not mergeable
3bebc7b to
a15fcc6
Compare
## Summary - update the RLM harness to consume the ACPTurn type exported by the merged ACP base - restore built-in harness discovery after stacked PR #2439 was restacked onto PR #2438 ## Root cause PR #2439 retained the earlier ACPTurnResult name while PR #2438 landed the public type as ACPTurn. Importing the built-in harness package therefore raised ImportError. ## Validation - exact deterministic V1 CI command: 71 passed - full test suite: 915 passed, 75 credential-gated skips - uv run ty check verifiers - uv run ruff check --fix . - changed-file pre-commit hooks The all-files Markdown hook still reports the pre-existing inline-HTML table in verifiers/legacy/envs/experimental/composable/tasksets/swe/README.md, as already documented in PR #2438. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Type-name alignment only; no change to RLM turn handling or metrics recording logic. > > **Overview** > Updates the **RLM harness** so it imports and uses **`ACPTurn`** from `verifiers.v1.acp` instead of the obsolete **`ACPTurnResult`** name on the import and on **`acp_turn_result`**. > > This matches the public ACP base type from the merged stack and fixes **`ImportError`** when built-in harness discovery loads the RLM package. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 3d87235. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
## Summary - add Prime Agent over the same generic typed ACP prompt lifecycle as nano-RLM - pass `--autonomous` explicitly from harness configuration - preserve MCP programs, resume state, skills, Chat reasoning lineage, and isolated per-rollout state - trust Prime Agent's completed `session/prompt` boundary from [Prime Agent PR #1612](PrimeIntellect-ai/prime-agent#1612) - record response-boundary and terminal-quiescence telemetry for evidence without making it a second completion gate - enforce single-branch lineage for the ordinary two-turn resume case ## Stack PR 3 of the three-PR Verifiers stack. This targets nano-RLM integration PR #2439, which targets typed ACP base PR #2438. Prime Agent PR #1612 is merged and included in the pinned beta used here. It makes `session/prompt` wait for recursive terminal quiescence and returns the final autonomous stop reason. ## Validation - full Verifiers suite on the combined stack — 919 passed, 77 credential-gated skips - Prime Agent Prime VM MCP/resume E2E — passed against `0.8.0-beta.548.1.9bc0055` - single-branch assertion enabled and passed for the resumed conversation - Seth's full feature canary against current Prime Agent `main` (`9bc0055`) — passed - reward `1.0`; all 13 feature checks true - retained-child follow-up acknowledged and child deleted - terminal quiescence after response boundary - zero outstanding subagents and autonomous continuations - Docker container removed - changed-file pre-commit hooks and push-hook CI-parity type check <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Introduces network-fetched agent binaries and a new ACP harness on the eval critical path; the RLM default pin change can shift behavior for existing RLM rollouts. > > **Overview** > Adds a **Prime Agent** v1 harness that runs Prime Agent in native **ACP mode** on the shared `ACPHarness` path, with MCP, resume, skills, and optional **`autonomous`** continuation via config. > > The harness **bootstraps a pinned beta** from GitHub releases (checksum-verified tarballs, global npm install under a commit-keyed prefix), wires the **intercept** provider to the eval endpoint, and keeps **per-rollout state** (models config, daemon socket, wrapper). After each ACP turn it **records lifecycle telemetry** (`responseBoundary`, `terminalQuiescence`, infrastructure status) under `trace.info["acp_lifecycle"]` for evidence without gating completion on it. > > **E2E** gains a Prime VM row for `prime-agent` in the ACP resume+MCP test, asserting two turns show OK infrastructure and zero outstanding subagents at terminal quiescence. **nano-RLM**’s default install ref is bumped to a newer commit. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 9af8996. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->

Summary
PromptResponse._meta, notsession/closeStack
PR 2 of the three-PR Verifiers stack. This targets typed ACP base PR #2438. Its exact nano-RLM dependency is
11dcb9c353f1f7c89c8c6f1bc0ddea33b3cffa19from nano-RLM #144.Validation
Note
Medium Risk
Moves API keys and execution policy from env vars into ACP session metadata and changes the metrics contract; mis-validation or metadata drift could break rollouts or drop training signals.
Overview
The RLM harness stops wiring nano-RLM through
RLM_*environment variables and instead supplies a typedai.prime.rlm/runtime-v1payload onACPConfig.session_metaat session creation (model, provider credentials, policy, skills, kernel env, etc.).prepare_acpnow keeps onlyresolved_envplusRLM_HOMEin subprocess env.Compaction policy is expressed as
int | Nonein that metadata (including per-task random thresholds) instead of string env values.Rollout metrics no longer come from a
@metrichelper that shells out to readsessions/*/meta.json.acp_turn_resultvalidatesai.prime.rlm/session-v1with_SessionSnapshot, checkssession_idagainst the trace, and callstrace.record_metrics.The default nano-rlm install pin is updated to
5ee1c34024a183bbbd3a38a6129995f5b982631d.Reviewed by Cursor Bugbot for commit a15fcc6. Bugbot is set up for automated code reviews on this repo. Configure here.