Skip to content

fix(native-eval): reject invalid harness runs - #64

Draft
vincentkoc wants to merge 1 commit into
mainfrom
fix/native-eval-run-acceptance
Draft

fix(native-eval): reject invalid harness runs#64
vincentkoc wants to merge 1 commit into
mainfrom
fix/native-eval-run-acceptance

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What does this PR do?

Records structured native-eval execution outcomes and rejects runs where every
trial failed at the harness, infrastructure, or verifier layer.

Why?

Verifier rewards are useful diagnostics, but they are not proof that the
benchmark harness executed correctly. Fully invalid runs were being presented
as completed score data, and fleet recovery could infer success without an
archived exit status.

Fixes #63

Changes

  • classify clean, agent, harness, infrastructure, and verifier outcomes
  • preserve per-trial rewards while recording run-level execution acceptance
  • exclude rejected runs from score-eligible aggregates
  • infer historical OpenClaw exit 70/71 outcomes correctly
  • remove fleet success inference based only on result count and checkpoint text

Tests

  • python -m pytest -q passes on Blacksmith Testbox
  • python -m ruff check clawbench app.py scripts tests passes on Blacksmith Testbox

Focused proof: 117 tests passed; Ruff clean. Autoreview reported no actionable
findings.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels Jul 30, 2026
@clawsweeper

clawsweeper Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codex review: found issues before merge. Reviewed August 3, 2026, 5:05 AM ET / 09:05 UTC.

ClawSweeper review

What this changes

The PR records structured native-eval execution outcomes, excludes fully invalid runs from score eligibility, and requires an archived exit status before fleet recovery marks an exported run completed.

Merge readiness

Blocked until real behavior proof from a real setup is added - 6 items remain

Keep this member-authored PR open: it addresses the linked native-eval bug, but its unchanged head still removes the only recovery path for complete legacy exports without an archived exit status. That turns a previously completed recovery into a failed rerun, so it needs a compatibility repair or an explicit maintainer decision to accept the upgrade break.

Priority: P1
Reviewed head: 9f4490e8e4370cbc752404a1becce42d5a6a69f8
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Focused unit coverage supports the invalid-run logic, but a P1 legacy-recovery regression and missing real behavior proof keep the patch from merge readiness.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The PR body reports focused tests and Ruff, but it does not show an after-fix native-eval or fleet-recovery run from a real setup. Add a redacted terminal transcript or archived-run recovery result after resolving the compatibility path. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR body reports focused tests and Ruff, but it does not show an after-fix native-eval or fleet-recovery run from a real setup. Add a redacted terminal transcript or archived-run recovery result after resolving the compatibility path. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 6 items Current-main legacy recovery: Current main explicitly treats a verified final archive with complete result coverage and a final checkpoint event as successful when no run exit code is available.
PR removes compatibility path: The PR removes both the checkpoint-final helper and the fallback that assigned exit code zero for the complete verified legacy archive shape; its remaining completion condition requires run_exit_code == 0.
Regression test confirms break: The revised test constructs the same verified two-result archive and final checkpoint with no exit_status, then asserts fleet recovery returns failure and marks the run failed.
Findings 1 actionable finding [P1] Preserve recovery for legacy exported runs
Security None None.

How this fits together

ShellBench’s native-eval runtime runs benchmark trials and writes result archives. The aggregation step converts those archives into score reports, while fleet recovery finalizes interrupted exported runs and decides whether to rerun them.

flowchart LR
  A[Benchmark trials] --> B[Native-eval runtime]
  B --> C[Result archive]
  C --> D[Execution classification]
  D --> E[Score aggregation]
  C --> F[Fleet recovery]
  F --> G[Completed or rerun state]
Loading

Decision needed

Question Recommendation
Should fleet recovery retain a bounded success path for verified legacy exported runs that lack exit_status, or should those historical runs intentionally be failed and rerun? Preserve legacy recovery: Restore a narrow fallback or migration for complete verified archives with a final checkpoint while retaining strict rejection of fully invalid native-eval runs.

Why: The patch deliberately removes an existing compatibility fallback; source cannot establish whether maintainers intend the resulting rerun requirement for already-exported historical archives.

Before merge

  • Preserve recovery for legacy exported runs (P1) - The deleted fallback was the only path that completes a verified full-coverage archive with a final checkpoint but no exit_status. Existing archives can have that shape, so the remaining run_exit_code == 0 completion test now marks them failed and schedules a rerun. Restore a bounded legacy path or add a migration before enforcing this requirement.
  • Resolve merge risk (P1) - Merging as written changes upgrade behavior for complete, verified legacy exports that lack an archived exit_status: fleet recovery will stop the lease, mark the run failed, and schedule a rerun even though current main completes that archive shape.
  • Complete next step (P2) - A maintainer must decide whether strict rejection may intentionally require reruns of complete legacy exports; the applicable policy keeps this unresolved contributor-facing blocker with the PR owner rather than handing it to an automated repair lane.
  • Improve patch quality - Restore or migrate the legacy exported-run recovery path, or obtain explicit approval for mandatory reruns.
  • Improve patch quality - Post a redacted native-eval or fleet-recovery terminal transcript showing the resolved behavior; tests and lint alone are supplemental proof.

Findings

  • [P1] Preserve recovery for legacy exported runs — scripts/native_eval/fleet.py:1267-1274
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Change surface 7 files affected; production +186/-28, tests +93/-7 The patch changes runtime persistence, score aggregation, and fleet recovery together, so upgrade behavior must be reviewed across the full native-eval pipeline.

Merge-risk options

Maintainer options:

  1. Restore bounded legacy completion (recommended)
    Preserve completion for the verified legacy archive shape or provide a migration/backfill, with regression coverage separating it from invalid-harness rejection.
  2. Accept mandatory reruns
    Approve the strict policy only if maintainers intentionally accept rerunning complete legacy exports that lack exit_status.

Technical review

Best possible solution:

Keep strict rejection for demonstrably invalid runs, but preserve a narrowly validated legacy recovery path or migrate/backfill legacy archives before making archived exit status mandatory for completion.

Do we have a high-confidence way to reproduce the issue?

Yes. Current main’s focused fleet test and the PR’s replacement test construct the same complete archive plus final-checkpoint scenario; the PR changes its result from completed to failed when exit_status is absent.

Is this the best way to solve the issue?

No. Rejecting conclusively invalid runs is the right fix for the linked report, but unconditional failure for a previously accepted legacy archive shape is not the narrowest compatible solution without an explicit maintainer decision.

Full review comments:

  • [P1] Preserve recovery for legacy exported runs — scripts/native_eval/fleet.py:1267-1274
    The deleted fallback was the only path that completes a verified full-coverage archive with a final checkpoint but no exit_status. Existing archives can have that shape, so the remaining run_exit_code == 0 completion test now marks them failed and schedules a rerun. Restore a bounded legacy path or add a migration before enforcing this requirement.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 884dd1bb5511.

Labels

Label justifications:

  • P1: The patch can make previously recoverable benchmark exports fail and rerun, affecting active native-eval campaign recovery.
  • merge-risk: 🚨 compatibility: It removes current-main support for complete verified legacy archives without an archived exit status.
  • merge-risk: 🚨 availability: Affected fleet recovery transitions completed historical work to failed and schedules another benchmark run.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦪 silver shellfish.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body reports focused tests and Ruff, but it does not show an after-fix native-eval or fleet-recovery run from a real setup. Add a redacted terminal transcript or archived-run recovery result after resolving the compatibility path. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Current-main legacy recovery: Current main explicitly treats a verified final archive with complete result coverage and a final checkpoint event as successful when no run exit code is available. (scripts/native_eval/fleet.py:1285, 884dd1bb5511)
  • PR removes compatibility path: The PR removes both the checkpoint-final helper and the fallback that assigned exit code zero for the complete verified legacy archive shape; its remaining completion condition requires run_exit_code == 0. (scripts/native_eval/fleet.py:1267, 9f4490e8e437)
  • Regression test confirms break: The revised test constructs the same verified two-result archive and final checkpoint with no exit_status, then asserts fleet recovery returns failure and marks the run failed. (tests/test_native_eval_fleet.py:1312, 9f4490e8e437)
  • Current-head continuity: The current PR head is the same SHA reviewed in prior cycles, so the legacy-recovery blocker remains unresolved rather than being a newly discovered late finding. (scripts/native_eval/fleet.py:1267, 9f4490e8e437)
  • Feature provenance: The native-eval fleet, aggregation, runtime, and runner history is concentrated in a sequence of commits by Vincent Koc, including the current-main native-eval trace repair. (scripts/native_eval/fleet.py:1249, 884dd1bb5511)
  • Release/main check: The proposed commit is not an ancestor of current main; no local release tag containing it was available, so this PR is neither implemented on main nor attributable to a shipped release. (scripts/native_eval/fleet.py:1267, 9f4490e8e437)

Likely related people:

  • vincentkoc: Current-main native-eval history and shortlog attribute the central runner, stabilization, score-eligibility, research-runbook, and delegated-trace work to Vincent Koc; the PR head continues that same area. (role: feature owner and recent area contributor; confidence: high; commits: 69f75c6629c4, b9acd9f7a010, 9afe6a4f1746; files: scripts/native_eval/fleet.py, scripts/native_eval/aggregate.py, scripts/native_eval/runtime.py)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (19 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-01T19:16:54.084Z sha 9f4490e :: found issues before merge. :: [P1] Preserve or migrate legacy exported runs
  • reviewed 2026-08-01T22:59:18.642Z sha 9f4490e :: found issues before merge. :: [P1] Preserve recovery for legacy exported runs
  • reviewed 2026-08-02T13:16:46.448Z sha 9f4490e :: needs changes before merge. :: [P1] Preserve recovery for legacy exported runs
  • reviewed 2026-08-02T19:15:22.778Z sha 9f4490e :: found issues before merge. :: [P1] Preserve recovery for legacy exported runs
  • reviewed 2026-08-02T20:37:31.213Z sha 9f4490e :: needs changes before merge. :: [P1] Preserve recovery for legacy exported runs
  • reviewed 2026-08-02T22:14:45.112Z sha 9f4490e :: found issues before merge. :: [P1] Preserve recovery for legacy exported runs
  • reviewed 2026-08-03T01:48:46.759Z sha 9f4490e :: found issues before merge. :: [P1] Preserve recovery for legacy exported runs
  • reviewed 2026-08-03T04:09:40.140Z sha 9f4490e :: found issues before merge. :: [P1] Preserve recovery for legacy exported runs

@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P1 Urgent regression or broken agent/channel workflow affecting real users now. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Jul 30, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P1 Urgent regression or broken agent/channel workflow affecting real users now. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Native eval accepts fully invalid harness runs

1 participant