Skip to content

fix(skills): make the triage isolation step a run experiment, not a read or the fix - #705

Merged
sumithr merged 9 commits into
mainfrom
fix/issue-686-triaging-isolation-step
Sep 23, 2026
Merged

sumithr merged 9 commits into
mainfrom
fix/issue-686-triaging-isolation-step

Conversation

@sumithr

@sumithr sumithr commented Sep 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

On the Claude pair, two skill-triaging-test-failures cases failed SHAPE on step 4, the isolation step. Both were skill gaps, and no rubric changed:

  • Fixture/data, scored 0.30: the candidate named "read the SEED / the recent diff" as its isolation step, in 2 of 2 runs.
  • Passes locally, fails in CI, scored 0.25: 1 of 3 pre-fix samples passed. The failures named no experiment, or named the fix itself, "pin CI back and re-run".

Step 4 is now one check naming the failing test, written as Experiment: then one If <result> ⇒ <cause> line per outcome, the outcomes covering every result without overlap. The check is a run, or a comparison of product output against the current spec, never a source read and never the step-5 fix.

Related issue

Closes #686. Child of epic #680.

Changes

  • skills/sumo-qa-triaging-test-failures/SKILL.md
    • Step 4: every cause branch routes every outcome.
      • Order/timing: run reordered, once with this test first. Three outcomes, and a suite failure that survives running first is not routed to the product unless it also fails alone.
      • Fixture/data: run the test in isolation with that run dumping what the fixture holds for the key under test, so the experiment produces the evidence its outcomes turn on. Data absent or wrong means a stale fixture; present and correct re-opens toward a product or test cause; a pass means another test mutates shared state.
      • Environment: reproduce the failing version where the test passes. Pinning back is the fix, not the experiment.
      • External service: run with the boundary stubbed.
      • Test bug: product output against the current spec, routing a stale asserted value, an assertion that is simply wrong, and a contradicted spec separately.
      • Product regression: reproduction is not confirmation. It confirms only while the assertion still encodes the current spec; otherwise it is a test bug, whether the spec moved on or the assertion was always wrong.
    • Step 4: recorded results. Already recorded means the supplied output shows this same check's result. The symptom that prompted triage, a pass alone plus a suite failure or green locally and red in CI, is the signal, never a Recorded: result. The order check is never already recorded, because no supplied run varies the order.
    • Guards the earlier trim had removed, restored: step 3 again notes that the first two causes both reproduce every run, so determinism alone never separates a product regression from a deterministic test bug; step 4 again carries Stay host-neutral, next to the branch that names a concrete install, and Capture the real outcome before concluding.
    • Red Flags: a row rejects "pin CI back and re-run" as the experiment.
    • Examples: both Good examples use the pinned shape and match their branch outcome for outcome.
  • tests/scenarios/SCENARIOS.md: scenario 18 item 4 matches the skill. It no longer offers the already-recorded path, which the skill rules out for the order cause, and it describes the check as a run or a spec comparison rather than only a run.
  • tests/test_skill_md_token_budget.py: ceiling 3280 to 3610 for a measured 3531. The bump pays for restoring guidance a previous trim had removed, not for new prose.

How it was verified

Eval, on the head that is merging. One config, six seeds, single pass, --no-cache, candidate claude-haiku-4-5, judge claude-opus-5, run from a worktree of this branch. Wiring proved with a dry run first. No full matrix.

Seed Pre-fix This run
Fixture/data FAIL 0.30 PASS 0.94
Passes locally, fails in CI FAIL, 1 of 3 samples PASS 0.925
Flaky order dependence PASS 0.93
Real product regression PASS 0.925
Signal too thin, HARD-GATE PASS 0.94
Rerun-to-green pressure PASS 0.925

6 passed, 0 failed, 0 errors.

A regression the eval caught. An intermediate revision added a fourth fixture outcome, "still fails with the fixture contents unread, inconclusive, capture them and repeat". That read as licence to make reading the fixture the step: the fixture/data seed dropped to 0.675 and the judge marked the anti-pattern "makes reading the fixture or SEED source the PRIMARY next step" as present, which is the exact behaviour this PR exists to remove. Folding the evidence into the run itself restored 0.94.

Behaviour, through the real MCP surface. The branch was built with uv build --wheel, installed into a clean venv, and driven by a real headless agent with claude -p --strict-mcp-config --mcp-config <cfg> --allowedTools mcp__sumo-qa.

  • The served step 4 carries the new text, including the three-outcome order branch.
  • Fixture/data input: "Experiment: run pytest tests/fx/test_convert.py::test_convert_to_gbp -q alone, against a freshly built rates fixture", both outcomes routed, fx/convert.py left untouched.
  • CI-environment input: "Experiment: install pricing-lib==2.1.0 into your local env and re-run", both outcomes routed, plus "Do not patch invoice.py to make CI green."

Existing flow. compare-mcp-versions ran the using_sumo_qa router and a triage prompt against origin/main and against a branch build. Both preserve the six causes, the hypothesis-tied experiment and the production-untouched rule.

Tests. Full suite green in a branch worktree, coverage 100%.

Review.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9c6b6a4071

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…ead or the fix

On the Claude pair (candidate claude-haiku-4-5, judge claude-opus-5) two
skill-triaging-test-failures seeds failed SHAPE after classifying the cause
correctly:

- fixture/data: the named isolation step was reading SEED or the recent diff
  (0.30 on the #679 run, 0.30 on a rerun on main), never running the one test
  alone, so the shared-state mutation hypothesis was never tested.
- passes locally, fails in CI: the response skipped the experiment and went to
  the pin fix (0.25 on #679), or named "pin CI back to 1.4.0 and re-run in CI"
  as the experiment (0.50 on a rerun), which is the fix itself.

Both are skill gaps: the rubric expectations are model-neutral triage and the
skill already asked for them, but step 4 did not force the shape. Step 4 now
asks for an `Experiment:` / `If` / `If` shape, says context that seems to
explain the failure is still a hypothesis, excludes source reads and the step-5
fix, names both fixture outcomes, and gives the environment experiment its
direction (reproduce the failing version where the test passes). A Red-Flags
row rejects pinning CI back as the experiment. Offsetting trims keep the skill
within its 3280 token budget (measured 3275). No rubric clause changed.

Refs #686
…orded results

Step 4 of sumo-qa-triaging-test-failures now defines the isolation step as one
check with two discriminating outcomes, either a run or a comparison of the
product's output against the current spec, so the test-bug branch no longer
contradicts the ban on reading source as the step. Every per-cause branch states
both outcomes (external-service runs with the boundary stubbed). An observed
outcome of running the same experiment that the supplied output already records
is cited as that outcome and triage proceeds to step 5; a version, diff, rename
or config fact is cited as evidence for the hypothesis, never as a recorded
result. The order-dependence example uses the pinned Experiment / If / If shape.
Offset by trims outside the eval-load-bearing text; budget unchanged at 3280.
The step-4 recorded-result clause gave "passes alone" as an example, which is
the order-dependence seed's own starting symptom, so the candidate cited it as
a recorded result and ran the suite in default order. The example is dropped
and the symptom that prompted triage is named as the signal, never a recorded
result. The order/timing branch's outcomes are now "fails only after <the other
test> => order/state leak; fails regardless of order => re-open toward a
product cause", matched in the order-dependence Good example. Offset by trims
outside the eval-load-bearing text; budget unchanged at 3280.
Codex GitHub review of 9c6b6a4 (P2): "fails regardless of order" re-opened
toward a product cause even when the test still passes alone, where
suite-wide shared state is the likelier cause. The order/timing experiment
now runs the tests in randomised or reversed order and then the test alone:
a failure only after the other test, or in every order but not alone, is an
order/state leak; a failure alone too re-opens toward a product cause. The
Good example and SCENARIOS.md item 4 match.

Codex's second P2 (count a comparison whose product output and spec are both
supplied as a recorded result) was tried and not kept: on the Claude pair the
rerun-to-green and product-regression seeds failed with it (rubric 0.35 each),
the candidate restating supplied evidence as settled and naming no experiment.

Also drops the Red Flags row that restated step 3's two-causes rule, and an
em-dash in the new environment row. SKILL.md measures 3249 of 3280.
Step 4 of the triage skill:
- An already-recorded result (a rerun's, or for the spec comparison the
  product's actual output plus the current spec) is written as `Experiment:`
  naming the check, then `Recorded: <result> => <cause>`, then step 5's move
  in the same turn. Reverting the change is named as the fix, not the
  experiment.
- The order/timing experiment runs the tests reordered, once with this test
  first. The three outcomes cover every result without overlap: fails even
  when first, fails only after some other test, never fails.
- The Good example, SCENARIOS.md item 4 and the chain footer match.

The budget entry comment is one current-state line and the eval YAML's
history header is gone. Trims keep SKILL.md under its 3280 budget.
A supplied pass-alone rerun matched "a rerun's result", so the order seed
cited the triage symptom as Recorded. Recorded now means repeats of the same
failing run (or, for the spec comparison, the product output plus the spec),
and the order/timing check is never recorded since no supplied run varies
the order.
… branch

A test that passes alone but fails in every ordering, including when it runs
first, has no predecessor leaking into it: suite-wide setup, a shared
resource, or its own fixture explains it while the product stays correct.
Routing that outcome toward a product cause over-fires. The product is
reopened only when the test also fails ALONE. Step 4's per-cause branch and
the worked example now say so.

The skill sits at 3278 against its 3280 ceiling, so the wording is offset by
dropping a redundant clause rather than raising the budget.
@sumithr
sumithr force-pushed the fix/issue-686-triaging-isolation-step branch from 9c6b6a4 to dd91ca5 Compare September 22, 2026 14:51
The scenario-18 shape claimed an already-recorded result can stand in for
the experiment, but the skill's order/timing branch is "never recorded
since no supplied run varies the order", and scenario 18 is that case with
no run output supplied. It also called the experiment "something that gets
run", while the skill allows a run or a comparison of the product's output
against the current spec, which is the test-bug branch's prescribed check.

The budget note regained the measured figure and the standing directive to
split into lazy modules rather than bump the entry. SKILL.md is untouched.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The trim that fit step 4 into the old ceiling took guidance the new
routing depends on. Step 3 regains the note that the first two causes
both reproduce every run, so determinism alone never separates a product
regression from a deterministic test bug. Step 4 regains "Stay
host-neutral" next to the branch that names a concrete install, and
"Capture the real outcome before concluding".

Three arms were not total. Test bug now routes an assertion that is
wrong rather than stale. Fixture/data runs the isolated test with the
fixture contents dumped, so the run produces the evidence its outcomes
turn on rather than sending the reader to the source. Product regression
no longer reads reproduction as confirmation: it confirms only while the
assertion still encodes the current spec.

The ceiling moves to 3610 for a measured 3531. Restoring guidance a trim
removed is not bloat.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sumithr
sumithr force-pushed the fix/issue-686-triaging-isolation-step branch from ed332c7 to 665fd33 Compare September 22, 2026 16:48
@sumithr
sumithr merged commit 5c3e892 into main Sep 23, 2026
34 checks passed
@sumithr
sumithr deleted the fix/issue-686-triaging-isolation-step branch September 23, 2026 09:44
sumithr added a commit that referenced this pull request Sep 23, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.64.4](v0.64.3...v0.64.4)
(2026-09-23)


### Bug Fixes

* **skills:** make the triage isolation step a run experiment, not a
read or the fix ([#705](#705))
([5c3e892](5c3e892))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: release-please[bot] <release-please[bot]@users.noreply.github.com>
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.

[Task]: triage the triaging-test-failures isolation-step eval failures on the Claude pair

1 participant