Skip to content

Lock RLM harness to a run-start commit, keep nano-rlm rename - #2376

Open
samsja wants to merge 3 commits into
mainfrom
lock-rlm-version-at-run-start
Open

Lock RLM harness to a run-start commit, keep nano-rlm rename#2376
samsja wants to merge 3 commits into
mainfrom
lock-rlm-version-at-run-start

Conversation

@samsja

@samsja samsja commented Aug 16, 2026

Copy link
Copy Markdown
Member

Summary

Replaces the #2374/#2375 stack as a single PR on main. Net effect vs current main:

  • default RLMHarnessConfig.version goes from pinned commit 41739cf back to main
  • branch/tag versions are resolved to a commit SHA host-side, once per run (guarded by a lock, cached on the harness instance); all rollouts then check out that exact commit
  • full 40-char commit version overrides skip resolution and pass through untouched
  • the rlm-harness -> nano-rlm rename from Pin RLM harness to nano-rlm #2373 is kept

Why

Implements the behavior agreed in Slack: always use the latest harness, but the harness must not change once a run has started. Tracking main per-rollout meant a push to nano-rlm mid-eval could make rollouts of the same run use different harness versions; a frozen default commit goes stale. Resolving main at run start gives latest and internally consistent, with explicit pins still available for reproducibility.

Validation

  • uv run ruff check / ruff format --check — pass
  • uv run pytest tests/v1 -k rlm — pass (e2e skipped, needs PRIME_API_KEY)
  • temp script against the real repo: main resolves to a 40-char SHA, repeated + concurrent calls return the same commit, full-SHA overrides pass through unresolved

🤖 Generated with Claude Code

Note

Lock RLM harness to a resolved commit at run start and rename repo to nano-rlm

  • Adds _resolve_version to RLMHarness in harness.py that resolves branch/tag refs to a 40-hex commit once per run using git ls-remote against the nano-rlm repo.
  • Uses an asyncio.Lock to ensure single-flight resolution, caching the result in _resolved_version for concurrent rollouts.
  • RLMHarness.setup now checks out the resolved commit instead of the original (potentially moving) ref.
  • The default version in RLMHarnessConfig changes from a pinned commit to 'main'.
  • Behavioral Change: callers relying on the old pinned commit default will now track main unless they explicitly set a version.

Macroscope summarized ce80a5c.

samsja and others added 3 commits August 15, 2026 17:49
rlm-harness was renamed to nano-rlm on GitHub; point RLM_REPO and the
version docstring at the new name. Default version stays main.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Resolve branch/tag versions to a commit SHA host-side, once per run, so
every rollout installs the same harness even if the ref moves mid-run.
The default stays main: runs always start from the latest harness, but
a push to nano-rlm can no longer change a live run.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
if self._resolved_version is None:
version = self.config.version
if not COMMIT_RE.fullmatch(version):
proc = await asyncio.create_subprocess_exec(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟠 High rlm/harness.py:87

With the default version="main", _resolve_version raises FileNotFoundError on hosts without a git executable before the runtime can install git, so no RLM rollout can be set up. Avoid requiring host-side git for version resolution, or detect its absence and raise a controlled configuration error.

🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @verifiers/v1/harnesses/rlm/harness.py around line 87:

With the default `version="main"`, `_resolve_version` raises `FileNotFoundError` on hosts without a `git` executable before the runtime can install git, so no RLM rollout can be set up. Avoid requiring host-side git for version resolution, or detect its absence and raise a controlled configuration error.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ce80a5c. Configure here.

version,
)
self._resolved_version = version
return self._resolved_version

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Version lock does not span rollouts

High Severity

_resolved_version and _version_lock are stored via self, so each new harness instance resolves independently. Eval episodes construct a fresh Agent (and thus a fresh RLMHarness) per rollout, so a moving main can still yield different commits mid-run — the inconsistency this change aims to prevent.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ce80a5c. Configure here.

f"{stderr.decode().strip()[-500:]}"
)
if stdout.strip():
version = stdout.split()[0].decode()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Annotated tags resolve to tag objects

Medium Severity

For annotated tags, git ls-remote emits the tag-object OID first and the peeled commit on a following ^{} line. Taking stdout.split()[0] locks the tag object, and git checkout of that OID fails because it is not a tree-ish.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ce80a5c. Configure here.

@macroscopeapp

macroscopeapp Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

1 blocking correctness issue found. This PR introduces new async version resolution logic with subprocess calls. Multiple unresolved comments identify potential bugs: the lock may not span rollouts as intended, annotated tags may fail, and missing git on host causes crashes. These issues warrant human review before merge.

You can customize Macroscope's approvability policy. Learn more.

@samsja
samsja changed the base branch from rename-nano-rlm to main August 16, 2026 01:22
@samsja samsja changed the title Lock RLM harness version to a commit at run start Lock RLM harness to a run-start commit, keep nano-rlm rename Aug 16, 2026
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