Repository navigation
agentcore: add 12-scenario harness scorecard, oscillating doom-loop guard, and 16-task eval suite - #389
Merged
Conversation
…uard, and 16-task eval suite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a two-layer evaluation system for Bate's
agentcore(plus oscillating doom-loop interception inagentcore/src/turn.rs) so harness regressions are caught deterministically in CI and live model/ACP changes can be measured with paired statistics and automatic failure taxonomy:agentcore/src/turn.rs): extendsRepeatsfrom consecutive-only (A, A, A) to also catch period-2 alternating cycles (A, B, A, B, A) and inject a structured recovery nudge after 3 repetitions.agentcore/tests/harness_eval.rs): 12 deterministic failure-mode tests againstagentcorewith a scripted local SSE server (0 API cost, ~0.55s): consecutive & oscillating doom loops, multi-cycle proactive compaction, reactive HTTP 400 overflow compaction, edit resilience & undo snapshot, giant (>180 KiB) & non-UTF-8 output budgeting, mid-turn fallback model failover, mid-batch abort & resume, lateOp::Steerintercept, parallel & unnamed tool calls, permission denial recovery, and step-limit wrap-up +checkearly-stop guard.evals/):evals/tasks.py: 16 deterministically verified tasks across 5 categories (coding[4],shell_data[4],edit_precision[2],bate_native[4: cross-turnmemory/,SKILL.mdadherence, compaction needle recall, stdio MCP orchestration],safety_recovery[2]).evals/mock_mcp.py: real stdio JSON-RPC 2.0 MCP server fixture (lookup_order,apply_credit).evals/driver.py: drives real compiledagentcore(oragentcore acp <cmd>) over stdio JSON-lines, recordstrace.jsonl+result.json, and supports zero-cost--mockself-tests.evals/analyze.py: classifies failure modes (pass,early_stop,doom_loop,edit_mismatch,step_limit,timeout,model_error,wrong_answer), computespass@1andpass^k, exportsd41sys/evalkit-compatibleresults.jsonl, and computes paired exact two-sided McNemar A/B comparisons.evals/run.py,evals/test_evals.py,evals/README.md, and.gitignoreentries forevals/runs/andevals/__pycache__/.Evidence
cargo test -p agentcore --test harness_eval -- --nocapture→ 12/12 passed (~0.55s).--mockrun against compiledagentcore+ real tools + real stdio MCP:python3 -B evals/run.py --mock --engine <target>/debug/agentcore --out /tmp/bate-eval-mock→ 16/16 passed (100.0% pass@1,100.0% pass^k, 2.9 tools/trial, 0.54s/trial); verifiedanalyze,compare, andresults.jsonlexport.python3 -B -m unittest discover -s evals -v→ 7/7 passed (task registry, trace telemetry/compaction, consecutive & oscillating doom-loop detection, all 8 failure modes,pass^k,evalkitschema, exact McNemar p-value).cd window/ui && npm ci && npm run build && npm test(147/147 pass)cargo fmt --all --checkcargo clippy --workspace --all-targets --locked -- -D warningscargo test --workspace --lockedMerge Danger
Repeatsinagentcore/src/turn.rs(+49/-3 lines) to detect alternating 2-call loops in addition to consecutive repeats, covered by botheval_consecutive_doom_loopandeval_oscillating_doom_loop. All other additions are test/eval tooling underagentcore/tests/harness_eval.rsandevals/.Device decision
/Applications/Bate.app) or user data (~/.bate) changes required; pure engine test + CLI eval tooling.