Skip to content

fix: make checkout-saturation solvable and exclude MCP startup requests from grading - #2

Merged
LukasParke merged 7 commits into
mainfrom
devin/1793734655-tool-bench-readiness
Nov 4, 2026
Merged

LukasParke merged 7 commits into
mainfrom
devin/1793734655-tool-bench-readiness

Conversation

@LukasParke

@LukasParke LukasParke commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

ops/multi/checkout-saturation-scale-and-resolve failed in every arm for both models (docs/research/arms-2026-10-31.md). The scenario was at fault, not the models. Real-model runs hit three blockers, one after another:

  1. The runbook was invisible. The target replica count (9) appeared only in the incident's body.details. pagerduty-mcp 1.1.0's Incident model has no body, so get_incident never returns it. The runbook step now also sits on each incident's first Datadog alert, which list_alerts_from_incident returns: PALR001 (prod, scale to 9) and PALR003 (the staging decoy, scale to 3). The solution reads that alert.

  2. Scaling never finished in the mock. A scale only rewrote spec.replicas, so models saw observedGeneration lag behind and the ReplicaSet and pods stay at 3, and they refused to resolve. A new Kube::reconcile_deployment runs on a replica-only Deployment change:

    • The newest owned ReplicaSet is resized, and pods are added from its spec.template (works from 0) or removed.
    • New pods get fresh container IDs and start times.
    • observedGeneration advances, and ReplicaSet and Deployment replicas/ready/available/unavailable are recounted from pod_ready. A pod counts as ready only if it is Running, all its containers are ready, and its Ready condition is not False.
    • If the Deployment's template differs from the ReplicaSet's (ignoring the pod-template-hash label), the change is a rollout. That isn't simulated, so nothing is touched.
  3. The runbook asked for a check the world can't answer. "Confirm p95 recovers" sent models to Datadog, which isn't in this world and returns an empty series. The runbook now says "resolve the incident once the new pods are Ready", which the Kubernetes mock can show.

  4. context_overflow never fired and api_calls was inflated. Every trial journal starts with about 31 requests that MCP servers make on their own at session start: k8s API discovery, the Terraform ping, the Okta device flow, and so on. deploy/capture-stack.sh now records these into crates/world/startup-calls.json. grade subtracts one match per recorded call (startup::without_startup), so an agent that repeats a startup request still has it counted. api_calls now counts only agent calls. context_overflow fires when the logs show a length rejection and the agent made no calls. Checked against the 3 real Haiku trials: every startup request was matched, and 13, 38 and 51 agent calls remain. A second capture produced identical tool lists for all 32 endpoints.

Expectations are unchanged. Every edit changes the content-hashed world tag, so taskgen rewrote every task's compose file.

Ran locally:

  • cargo test --workspace --locked (723 pass) and clippy -D warnings. mock-kubernetes passes 22 tests, including scale to 0 and back, unready pods counted as unavailable, a false Ready condition, and a template change left unreconciled.
  • taskgen --check. All 50 Deployments in the scenario datasets that own ReplicaSets still reconcile under the whole-template comparison.
  • deploy/oracle.sh --all with locally built images: all 150 tasks score oracle 1.0 and nop 0.0 (300/300).
  • Harbor + Claude Code (anthropic/claude-haiku-5.5 via OpenRouter, k=3): reward 1, 0, 1. Before this PR the same run scored 0/3. The failed trial never called list_alerts_from_incident, so it never found the runbook and didn't act. That is a model miss, not a broken task.

The images aren't published yet: tool-bench images can't authenticate until openrouter-infra#1116 is applied.

Link to Devin session: https://openrouter.devinenterprise.com/sessions/b3c949ac369d4a4bb3b25e1937b2309f
Open in Devin Desktop: https://openrouter.devinenterprise.com/desktop/session/b3c949ac369d4a4bb3b25e1937b2309f?variant=devin
Requested by: @LukasParke


Devin Review

…PagerDuty alerts

pagerduty-mcp's Incident model drops the incident body, so get_incident never showed the RB-CHK-07 replica count and every arm failed. Put the runbook step on each incident's first Datadog alert (body.details.runbook) and have the oracle read it via list_alerts_from_incident.
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments that start with 'Devin'.

  • Disable automatic comment, CI, and merge conflict monitoring

Original prompt from Luke

SYSTEM:
<latest_message>
Luke Parke (U0BF2BKT52N) [ts=1793733933.657649]: @Devin lets take over the benchmark repo work here

And iterate, review, refine the benchmark to get it ready for use
</latest_message>

=== BEGIN THREAD HISTORY (in #agents) ===
Luke Parke (U0BF2BKT52N) [ts=1793733933.657649]: @Devin lets take over the benchmark repo work here

And iterate, review, refine the benchmark to get it ready for use
=== END THREAD HISTORY ===
Channel ID: C07UF9XLTFF
Thread URL: https://openrouter.slack.com/archives/C07UF9XLTFF/p1793733933657649?thread_ts=1793733933.657649&amp;cid=C07UF9XLTFF

The <latest_message> is the message that you should use to guide your goals + task for this session, and you should use the rest of the slack thread as context.
A [ts=...] marker on a Slack message is that message's timestamp. To act on a specific message with the slack tool (e.g. adding an emoji reaction via the reaction command), pass that value as timestamp along with the Channel ID — no extra lookup call is needed.

@devin-ai-integration devin-ai-integration Bot left a comment •

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.

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

… after a replica change

A scale left status.replicas, observedGeneration and the ReplicaSet at the old count and created no pods, so a careful agent concluded the rollout was stuck and refused to resolve the incident.
devin-ai-integration[bot]

This comment was marked as resolved.

…ount readiness from pods

Scale-up from zero now creates pods, new pods get fresh container IDs and start times, ready/available counts come from pod readiness, and a change that also edits the pod template is left as an unsimulated rollout. The checkout runbook now ends with resolving once the pods are Ready instead of a p95 check no scenario service can answer.
devin-ai-integration[bot]

This comment was marked as resolved.

… as context_overflow

MCP startup handshakes always put world requests in the tools journal, so the old 'no tool activity' condition never held and context_overflow never fired.
@devin-ai-integration devin-ai-integration Bot changed the title fix(scenarios): make checkout-saturation solvable through pagerduty-mcp fix: make checkout-saturation solvable and let context_overflow fire Nov 3, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

…ejection as context_overflow"

This reverts commit 6aedce3.
@devin-ai-integration devin-ai-integration Bot changed the title fix: make checkout-saturation solvable and let context_overflow fire fix(scenarios): make checkout-saturation solvable through pagerduty-mcp Nov 3, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

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.

Devin Review found 1 new potential issue.

⚠️ 1 issue in files not directly in the diff

⚠️ Context overflows disappear from trial outcomes

When an agent hits a context-length rejection, grade records a failure instead of ContextOverflow. MCP startup handshakes populate via_tools before the agent's first turn, so outcome_code remains 1 even without agent tool use.

Devin Review

…d the context_overflow check

deploy/capture-stack.sh now records the world requests every server makes on its own while sessions are initialized and listed (31 today: k8s discovery, Terraform ping, Okta device flow, ...). Grading subtracts one match per recorded call, so context_overflow can fire and api_calls counts only the agent's calls.
@devin-ai-integration devin-ai-integration Bot changed the title fix(scenarios): make checkout-saturation solvable through pagerduty-mcp fix: make checkout-saturation solvable and exclude MCP startup requests from grading Nov 3, 2026
@LukasParke

Copy link
Copy Markdown
Contributor Author

Coordination for the broader benchmark-refinement work: I am working in a separate worktree on feat/benchmark-integrity-realism, based on your current head e4ca2a4. Your Kubernetes reconciliation, PagerDuty fixtures/runbook changes, captured startup manifest, and capture script are preserved; I will not duplicate or rewrite those fixes. My work extends evaluator contracts/integrity, semantic evidence, task/profile materialization, and result compatibility. Shared grading/world interfaces will be extended from this pinned base, and tasks/ will only be regenerated from sources. Please flag any further changes planned in those shared interfaces so we can avoid overlapping edits. I will recheck your head before integration; no changes are being pushed to this PR or main.

@LukasParke

Copy link
Copy Markdown
Contributor Author

Coordination update only; no new implementation request. The global clock refinement on feat/benchmark-integrity-realism now defaults scored worlds to a fixed business reference time, with transport ticking retained only as an explicit legacy condition. This requires one mechanical assertion update in crates/services/kubernetes/tests/kubernetes.rs: creationTimestamp 2026-11-03T08:40:07Z becomes 2026-11-03T08:40:00Z. I will make only that test-expectation change on my isolated branch; your Kubernetes production/reconciliation code, fixtures, startup capture, and checkout-saturation scenario remain unchanged. Main and this PR are not being modified or pushed. Your head was rechecked and is still e4ca2a4.

@LukasParke
LukasParke merged commit 99ebf37 into main Nov 4, 2026
2 checks passed
@LukasParke
LukasParke deleted the devin/1793734655-tool-bench-readiness branch November 5, 2026 22:14
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