Skip to content

Score the agent matrix on graph outcome instead of tool trajectory - #2245

Merged
malibio merged 5 commits into
mainfrom
issue-2243-outcome-grading
Aug 22, 2026
Merged

malibio merged 5 commits into
mainfrom
issue-2243-outcome-grading

Conversation

@malibio

@malibio malibio commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Closes #2243.

The matrix asserted on trajectory — which tool fired, how many times, in what order. This moves it to outcome: what the user's graph looks like when the turn ends, with trajectory retained as a diagnostic.

The three disagreements this fixes

Each is a live observation from the runs on the issue, and each scored the wrong way:

Under trajectory Under outcome
Right result, shorter path (scenario 6) ✗ failed for skipping resolve_query ✓ passes
Self-corrected write (11a's shape) ✗ failed on exactly-once ✓ passes
Two search_nodes vs two create_schema identical score read passes, spurious type fails

Severity now falls out of the model for free rather than needing a severity table: a repeated read persists nothing and passes, while a repeated schema creation leaves an extra type in the user's graph and fails createdSchemas.

What's here

  • scripts/eval/graph.ts — snapshot capture and diffing, read through the same nodespace CLI every eval turn already goes through. No Rust changes.
  • scripts/eval/end-state.ts — the clause model (createdNode, updatedNode, createdSchemas, createdEdge, expectNoWrites, noUnexpectedNodes) and its scorer, pure over a diff.
  • graph capability on EvalFixture — opt-in, so the routing eval (which writes nothing) pays nothing.
  • Setup scenarios — 11a/11b are now setup: true: run, asserted, and warned about if they fail, but excluded from the denominator. Groups share a chat node, so one ambiguous verb in 11a previously cost three points; it now costs only the successors it genuinely invalidates.
  • Trajectory kept as a diagnostic — recorded per scenario alongside the score, with a run-level count of where the two disagree. Step 3 of the issue flips the score before any run has shown where they diverge, so this keeps that comparison recoverable from results files.

Two things found by probing rather than reading

Both were verified against the live test daemon, not inferred:

  1. create_relationship leaves both endpoints byte-identical — same version, same modified_at. The natural optimization ("walk edges only for nodes that changed") therefore finds no edges at all and would have scored 11c — the one scenario that measures linking — as a false pass.
  2. A full edge walk costs ~11s per snapshot on a 120-node database, twice per scored turn. Restricting the walk to the group's own nodes brings it to ~778ms while still discovering 11c's edge.

Winnability

createdSchemas is a count, not a name, and scenario 9 asserts a value via hasPropertyValue without naming the key — the model chooses type identifiers and property keys, so pinning either would measure this fixture's vocabulary guess rather than the model's behavior (the #1846 trap).

Testing

  • bun run test:all — 227 frontend files / 4794 tests, 177 scripts tests, 24 skill tests, 52 Rust binaries. All green, no regressions vs baseline.
  • 48 new tests, including named cases for each of the three disagreements above and seven fixture invariants guarding the now-scored end clauses (verified to actually bite by breaking a scenario and watching one fail).
  • Snapshot capture and the 11c edge shape verified end-to-end against the live daemon.

🤖 Generated with Claude Code

https://claude.ai/code/session_01C8zV17aUG2B1NPPe84fHAx

malibio and others added 2 commits August 22, 2026 22:42
The matrix asserted on trajectory — which tool fired, how many times, in
what order — which disagreed with the product in three measured ways:

  - A correct result scored as a failure. A model reaching the right end
    state by a shorter path (update_node with no preceding resolve_query)
    lost a point for the path rather than the result.
  - Self-correction scored as a failure. A create_node rejected for a
    missing node_type, corrected and persisted on the second call, red-
    lined on an exactly-once rule — punishing the recovery we want.
  - Severity was flat. Two search_nodes calls (nothing persisted) scored
    identically to two create_schema calls (a spurious type the user has
    to clean up).

Assert on the graph's end state instead, per tau-bench's design. Each
scenario gains an `end` clause that is now THE score; severity falls out
of it for free rather than needing a severity table.

Scenarios sharing a chat node also cascade, so a setup turn's failure was
counted as its own observation plus its successors'. 11a/11b are now
`setup: true`: run, asserted and warned about, but not scored.

`expect` is kept on every scenario and still evaluated, recorded beside
the score as a diagnostic — it answers how the model got there, which
outcome grading cannot, and a disagreement between the two is the signal
worth reading after a run.

Closes #2243

Co-Authored-By: Claude <[email protected]>
Measured against the live test daemon, a full edge walk cost 11.1s per
snapshot on a 120-node database — two snapshots per scored turn would
have added minutes to every run.

Walking only the nodes a group created brings that to 778ms while still
discovering the edge 11c asserts, verified end-to-end against the daemon.

The obvious alternative — walk only what changed — is wrong and was
caught by probing rather than by reading: create_relationship leaves
BOTH endpoints byte-identical (same version, same modified_at), so that
rule finds no edges at all and scores 11c, the one scenario measuring
linking, as a false pass.

Co-Authored-By: Claude <[email protected]>
@malibio

malibio commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator Author

Code Review Summary

Verdict: APPROVE WITH COMMENTS. This is a net-positive change that does what #2243 asked, and it is unusually well-reasoned for a measurement instrument. The three motivating defects are each closed by construction rather than by special-casing: path-agnosticism falls out of diffing, self-correction passes because only the end state is read, and severity falls out of expectNoWrites / createdSchemas / noUnexpectedNodes with no severity table to maintain. The captureError plumbing — refusing to score rather than converting an environment fault into a model verdict — is the single most important decision in the PR and it is handled correctly at every layer (captureSnapshot → diffSnapshots short-circuit → assertEndState first check).

I verified the PR's three stated claims against the code, and all three hold:

  • createdSchemas is a count (end-state.ts, got !== want.createdSchemas over diff.addedSchemas.length), never a name.
  • Scenario 9 asserts hasPropertyValue: 8 with no key named, and nodeSatisfies scans Object.values(node.properties).
  • Trajectory is computed unconditionally and recorded as ScenarioResult.trajectory, with summary.trajectoryDisagreements surfacing where the two scorers part ways. Retiring it as the score while keeping it as a diagnostic is exactly step 3 of the issue.

I also traced the winnability constraint the fixture sets for itself. Every end clause is winnable — I checked each against its prompt and against what the chain's schema can hold:

  • Scenario 3 asserts a count, not "spec" — correctly avoids the vocabulary guess.
  • Scenario 9's hasPropertyValue: 8 is reachable: scenario 3's prompt establishes a day count, and the key is deliberately unnamed because the model chose it.
  • Scenario 10b's due_date by name is the one place a key is pinned, and it is justified: due_date is on the seeded core task schema (core_schemas.rs:52), so the model can know it. Pinning it is what makes the scenario prove the field list reached the model.
  • 11a/11b assert only contentMatches, appropriate for setup turns.

The soundness question I most expected to find a hole in — "if a model writes a node of a type not enumerated, does expectNoWrites silently pass?" — turns out to be closed, but by an invariant the code does not state. See Improvement 1.

The fixture invariant tests in agent-matrix.test.ts genuinely bite rather than restate the implementation. every scenario states at least one end-state clause closes the vacuous-{} hole directly; no scenario both expects no writes and expects a write catches an unwinnable fixture; and the scoreOutcome round-trip test that synthesizes a satisfying diff from each scenario's own clauses and asserts it passes is the right shape — it proves every clause is satisfiable, which is the winnability property, not just that the code runs.


Findings

Critical Issues

None. Nothing here would produce a false pass on the scenarios as written.

Suggested Improvements

1. [Improvement] graph.ts — the soundness of expectNoWrites rests on an unstated invariant, and the seed types list obscures it.

The reviewer's question is whether a node of an unenumerated type escapes the snapshot and lets expectNoWrites pass vacuously. It does not, but for a reason the comments never say:

  • create_node rejects any node_type without a schema (local_agent/tools.rs::create_node_rejects_unknown_node_type — the executor errors rather than storing a bare shell).
  • captureSnapshot enumerates schema list first and folds every schema id into queryTypes.

So the set of types a model can create is exactly the set of schemas, and the snapshot enumerates all of them. That is the load-bearing argument for the clause being sound, and it is worth stating in the docstring, because it is the property a future change could silently break — the day create_node accepts an unknown type again, expectNoWrites starts passing vacuously and nothing in this file would notice.

A consequence worth noting: types: ["task", "text", "note"] in the fixture is nearly dead. task and text are core schemas seeded by NodeService::new (core_schemas.rs:52, :415), so schema list already returns them. note is not a core schema at all, so it contributes one wasted CLI round-trip per snapshot unless a run creates it. The seed list's stated purpose — "types that may already exist when a run starts" — is already covered by schema enumeration. Not worth removing the mechanism (a type could exist without a schema in some future), but the fixture's list could shrink to [] with no loss, and the docstring should say the schema list is the real source.

2. [Improvement] runner.ts — the asymmetric edge walk is not symmetric, and can report a pre-existing edge as created.

The measurement that motivated the restriction is sound, and the create_relationship-leaves-endpoints-identical finding is correctly encoded — "walk what changed" really would score 11c as a false pass, and the commit message is right to call that out as caught by probing rather than reading.

But the two walk predicates differ in a way that is not merely a cost optimization:

// before
edgesFor: (n) => groupNodeIds.has(n.id)
// after
edgesFor: (n) => groupNodeIds.has(n.id) || !before?.nodes.some((p) => p.id === n.id)

The after set is a strict superset. For any node N that is new in after, N's edges are walked in after but were not walked in before (it did not exist). diffSnapshots computes addedEdges as pure set difference over beforeEdges, so every edge on a newly-created node is reported as added, regardless of whether the turn created the edge or the daemon materialized it at node-creation time.

Concretely: if create_node attaches a has_child edge from the new node to a container (the daemon does materialize container relationships), that edge lands in addedEdges on any turn that creates a node. Today this is harmless — the only createdEdge clause is 11c's, which pins relation: "mentions", and 11c does not create a node. But it is a live trap: createdEdge: {} with no relation pinned would pass on any turn that creates a node, and assertEndState explicitly permits rel === undefined. There is no fixture invariant requiring createdEdge.relation to be set.

Two options, either is fine:

  • Cheapest: add a fixture invariant test asserting every createdEdge names a relation, and a comment on EdgeExpectation.relation explaining why an unpinned relation is unsafe under the asymmetric walk.
  • More correct: have diffSnapshots restrict addedEdges to edges whose from was walked in both snapshots, i.e. treat edges on nodes new since before as unknown rather than added. That loses the "create and link in the same breath" case the comment calls out, so option 1 is probably the better trade — but the reasoning should be written down, because right now the comment asserts the walk is safe without noting it is asymmetric.

3. [Improvement] end-state.ts — valueMatches coerces arrays through Number(), so [8] satisfies hasPropertyValue: 8.

if (typeof expected === "number") {
  const n = typeof actual === "number" ? actual : Number(actual);
  return !Number.isNaN(n) && n === expected;
}

Number([8]) === 8 and Number(["8"]) === 8, so a single-element array matches a scalar expectation. The string/number tolerance is deliberate and correct — the model does choose the serialization — but the array case is not something the docstring claims and is not a serialization the product would want to accept silently. Guard it:

const n = typeof actual === "number" ? actual : typeof actual === "string" ? Number(actual) : NaN;

This also makes the number branch consistent with the string branch, which already rejects non-string/non-number actuals explicitly. Low impact today (only scenario 9 uses a numeric hasPropertyValue), but it is the kind of tolerance that quietly widens.

4. [Improvement] graph.ts — inner catch { continue } on relationship reads can mask a dying daemon as "no edges".

The reviewer flagged this and it is a genuine asymmetry worth naming. The node-query catch { continue } is well justified and documented: a type that does not exist errors, and the seed list intentionally names types a run may never create. The relationship-walk catch { continue } has no such justification. relationship get is called on a node id that was just read back from the daemon, so a failure there is not an expected outcome — it is the daemon failing.

Trace the failure the reviewer asks about: if the daemon dies partway through edge enumeration, every subsequent relationship get throws, each is swallowed, and captureSnapshot returns a snapshot with no captureError and a truncated edges list. diffSnapshots sees two clean snapshots. For 11c, addedEdges is empty and assertEndState returns no 'mentions' edge was recorded — a dead daemon filed as a model failure, which is precisely the confusion captureError exists to prevent. The node-side path is protected (a schema list failure hits the outer catch); the edge-side path is not.

The fix is small and matches the module's own stated principle: let the relationship-read failure propagate to the outer catch, or record it into captureError explicitly. If some relationship reads legitimately error (e.g. a relation not declared for that node type), narrow the catch to that case rather than swallowing everything — and say so in a comment, the way the node-query catch does.

5. [Nit-adjacent Improvement] end-state.ts — updatedNode reads only changedNodes, which is defined by content/properties inequality.

diffSnapshots builds changedNodes by comparing content and JSON.stringify(properties). JSON.stringify is key-order sensitive, so a daemon that reserializes properties in a different order reports a spurious change. That direction is safe (a spurious change cannot make updatedNode pass unless the node also satisfies the value clause) but it does leak into expectNoWrites, which fails on changedNodes.length > 0. A read scenario would red out because the daemon reordered a JSON object. Worth a normalized comparison (sort keys before stringifying) — cheap insurance for a clause that five scenarios depend on.

Nitpicks

  • Nit: types.ts — ScenarioResult.graphDiff is typed unknown rather than GraphDiff. The file already imports GraphDiff for EvalFixture.graph.scoreOutcome, so the weaker type is not buying decoupling. Typing it GraphDiff costs nothing and makes the results file self-describing. (Not an any, so not a standards violation — just a lost type.)

  • Nit: graph.ts — SCAFFOLDING_TYPES excludes ai-chat and date, but collection, person, database-settings, skill and agent-guidance are also core schemas that get enumerated on every snapshot. They are daemon-managed and stable, so they will not appear in a diff — but they cost a CLI round-trip each, twice per scored turn. Given the PR's own cost sensitivity (778ms vs 11.1s), trimming the enumeration to types the scenarios can touch is a cheap win. Worth measuring before acting.

  • Nit: runner.ts — the ⊙ setup marker is introduced in two places (the per-turn line and the summary list) with the ternary chain duplicating the exclusion precedence. A tiny markerFor(r) helper would keep the two in sync; today excludedAsEmptyGeneration wins in the summary but the per-turn line checks scenario.setup first, so a setup turn with an empty generation renders differently in the two places.


On the specific questions raised

Setup exclusion (11a/11b) delivers what the issue asked. partitionExcluded's double-count guard is correct — setupCount filters excludedAsSetup && !excludedAsEmptyGeneration, so a setup turn that also degenerated is counted once, in the exclusion bucket whose rate actually matters. The baseline-comparison skip is well-reasoned: comparing a setup turn against a pre-reclassification baseline really would report a phantom REGRESSION. Nothing downstream depends on a setup turn's verdict for scoring, and the verdict is still recorded, printed, and warned about — which is the right resolution of "not scored" vs "not visible". The invariant test pinning the setup set to exactly ["11a", "11b"] is the right guard, since marking a scored scenario as setup silently removes a measurement.

No backward-compat shims that are unjustified. The two tolerances I checked are both legitimate: the optional ? on trajectory / excludedSetup / trajectoryDisagreements is for reading old results files, which is a data-format concern, not a code-path shim — and the baseline-comparison skip is explicitly about stale baselines. Neither is the "transition period" pattern CLAUDE.md forbids. console use matches the surrounding scripts/ tooling. No any, no lint suppression, no new dependencies.

Test quality is high. 48 new tests, and the ones that matter test the disagreement with the old scorer rather than agreement — the test file docstring states this explicitly and the tests deliver it. The gaps: nothing tests the asymmetric edge walk in runner.ts (Improvement 2), and nothing tests captureSnapshot's inner-catch behavior (Improvement 4). Both are the untested paths where the false-pass risk actually lives; the pure functions are covered thoroughly.

None of the above blocks merge. Improvements 2 and 4 are the two I would want addressed before this instrument's numbers get quoted in a decision, since both are paths where an environment fault or a daemon-materialized edge could be read as a model verdict — the exact failure class this PR exists to eliminate.

@malibio malibio left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Automated pragmatic-code-review: APPROVE WITH COMMENTS (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.

…rdict

The two findings worth fixing before this instrument's numbers get quoted,
both paths where something other than model behavior could score a scenario:

- graph.ts: the relationship-walk catch could mask a dying daemon as "no
  edges", scoring 11c as "no 'mentions' edge was recorded" with no
  captureError set. Verified against a live daemon that `relationship get`
  exits 0 even for an undeclared relation AND a nonexistent node id, so
  there is no legitimate failure to tolerate — the catch could only ever
  hide a real fault. Now propagates to the outer catch.
- runner.ts / end-state.ts: the edge walk is asymmetric (a node new since
  `before` had no edges walked there), so every edge on a newly-created
  node reports as added. An unpinned `createdEdge` would pass on any turn
  that created a node. A fixture invariant now requires a named relation,
  and the asymmetry is documented rather than left implied.

Also:
- valueMatches no longer coerces arrays: Number([8]) === 8 meant [8]
  satisfied hasPropertyValue: 8.
- diffSnapshots compares properties key-order-independently; a daemon
  reserialization would otherwise red out the five expectNoWrites reads.
- types: ["task","text","note"] -> []. Verified identical coverage (118
  nodes, 18 schemas): schema enumeration already covers it, and the
  daemon refuses to create a node whose type has no schema — which is the
  unstated invariant expectNoWrites rests on, now documented.
- markerFor() shared by both render sites, which disagreed on precedence.
- ScenarioResult.graphDiff typed GraphDiff rather than unknown.

Skipped: trimming daemon-managed core types from enumeration. Measured at
106ms for the whole node pass, so the round-trips cost nothing worth the
coupling to which types the daemon happens to seed.

Co-Authored-By: Claude <[email protected]>
@malibio

malibio commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator Author

Review addressed — commit b6393f4

All five improvements and all three nits addressed; one trimming suggestion skipped with reasoning. Verdict was APPROVE WITH COMMENTS with no critical issues, and the two findings called out as "worth addressing before this instrument's numbers get quoted" are both closed.

The two that mattered

#4 — relationship-walk catch masking a dying daemon. Fixed, and the review's reasoning turned out to be stronger than stated. I probed the live daemon: relationship get exits 0 for an undeclared relation and for a nonexistent node id. So there is no legitimate failure to tolerate — the catch could only ever hide a real fault. It now propagates to the outer catch, which sets captureError, and every assertion declines to score. Verified end-to-end: a bad socket now surfaces captureError: nodespace schema list failed… rather than a clean empty snapshot.

#2 — asymmetric edge walk. Took option 1, as recommended. EdgeExpectation.relation now carries the reasoning, a fixture invariant requires every createdEdge to name its relation (verified it bites by removing 11c's and watching it fail), and the runner comment states the asymmetry instead of implying safety. Option 2 was rejected for the reason given — it loses the create-and-link-in-one-turn shape.

Others

  • Desktop shell with resizable panels #3 valueMatches no longer coerces arrays — confirmed Number([8]) === 8, so [8] did satisfy hasPropertyValue: 8. Number branch now mirrors the string branch.
  • Basic storage integration #5 diffSnapshots compares properties key-order-independently via a stableStringify helper. Tests cover nested reordering, and that real changes and array order are still detected.
  • Set up Tauri + Svelte project structure #1 The create_node-rejects-unknown-type invariant is now stated in captureSnapshot's docstring as the load-bearing argument for expectNoWrites, with the "a future change here reopens the hole" warning. Independently verified: the daemon returns Unknown node_type 'x': no such core type or schema.
  • Seed list types: ["task","text","note"] → []. Measured identical coverage (118 nodes, 18 schemas) and confirmed the whole node pass is 106ms, so note was buying only a failed round-trip.
  • Nits markerFor() now shared by both render sites; ScenarioResult.graphDiff typed GraphDiff.

Skipped (1)

Trimming daemon-managed core types from enumeration. The review flagged this as "worth measuring before acting" — I measured: the entire node-enumeration pass is 106ms, not a meaningful share of a run whose turns take seconds. Trimming would couple the snapshot to which types the daemon happens to seed, in exchange for saving nothing. Revisit if the schema list grows enough to show up in a run's wall clock.

Testing

  • 185 test:scripts tests (up from 177), 0 failures — 8 new covering array coercion, key-order normalization, markerFor precedence, and the edge-relation invariant.
  • bun run test:all: 227 frontend files / 4794 tests, 24 skill, 52 Rust binaries — all green, no regressions.
  • bun run quality:fix clean (eslint, svelte-check 0 errors, tsc, cargo fmt, clippy -D warnings).
  • Snapshot behavior re-verified against the live test daemon after the changes.

@malibio

malibio commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator Author

Review Type: Re-Review

Previous Review Summary — comment 5382610688, APPROVE WITH COMMENTS, no critical issues.

Recommendations 8 (5 improvements + 3 nits)
Addressed 7
Skipped with justification 1 (core-type enumeration trimming) — justification sound, accepted
New issues found in b6393f43 2 (both Nit)
Regressions 0

Scope: b6393f43 only. ff99dc36 and 9ca570e8 were reviewed previously and are re-examined here only where b6393f43 changes their behavior (the edge-walk comment in runner.ts, the types seed in the fixture).

Verdict: APPROVE. Both headline findings are closed at the right layer, and the fixes are better-reasoned than the review that asked for them — #4 in particular came back with a live-daemon probe that strengthens the argument rather than merely satisfying it. The two new findings below are cosmetic; neither affects a measurement.


Part 1 — Verification of prior recommendations

#4 (headline) — relationship-walk catch masking a dying daemon: CLOSED, and better than asked for

The review asked for one of "propagate, or narrow the catch to the legitimate failure and say so". The author did the strictly stronger thing: probed the live daemon, found relationship get exits 0 for both an undeclared relation and a nonexistent node id, and concluded there is no legitimate failure to narrow to — so the catch is removed outright. That is the right order of operations (measure the premise, then decide), and it is the answer the review could not have reached from reading alone.

I verified the abort path the re-review brief asks about, and it is safe by design, on this path, for real:

  • runCli throws → the for (const rel …) loop is inside captureSnapshot's own outer try, which returns {nodes: [], schemas: [], edges: [], captureError} (graph.ts:259-266). It never escapes to runEval's try/catch, so a mid-walk daemon death aborts the snapshot, not the run.
  • diffSnapshots short-circuits on before.captureError ?? after.captureError (graph.ts:317), returning an all-empty diff carrying the error.
  • assertEndState checks diff.captureError first and returns passed: false with the "not scored on outcome" message.

The one thing worth naming explicitly, since it is load-bearing and nobody has written it down: captureError still produces passed: false, not an exclusion. It is distinguishable in the results file (failure starts with graph end-state could not be captured) and it is unambiguous to a human reading output, but it lands in failed, not in excludedEmptyGenerations or excludedSetup, so it does deflate the denominator's pass rate. That is a defensible choice — a run whose daemon died should not report a clean number — and checkUniformity will trip on a total capture failure. But the docstring on GraphSnapshot.captureError says "every end-state assertion checks this first and declines to score", and "declines to score" reads as exclusion when it actually means "scores as a failure with a legible reason". Not a defect; a wording gap. Called out below as Nit 2.

Net: the reported failure mode is gone. A mid-walk daemon death now surfaces as captureError: nodespace relationship get … failed instead of no 'mentions' edge was recorded. That is exactly the confusion the PR exists to eliminate.

#2 (headline) — asymmetric edge walk / unpinned createdEdge: CLOSED (option 1, as recommended)

Three pieces, all present:

  1. EdgeExpectation.relation (end-state.ts:66-79) now carries the full reasoning — that the after set is a strict superset, that every edge on a newly-created node lands in addedEdges regardless of provenance, and that a relation-less expectation would therefore pass on any node-creating turn.
  2. Fixture invariant every edge expectation names its relation (agent-matrix.test.ts:815).
  3. Runner comment (runner.ts:609-618) now states the asymmetry and names option 2 and why it was rejected, instead of implying the walk is safe.

I verified the invariant genuinely bites, rather than restating something the type system already guarantees: I changed 11c's clause to createdEdge: {} and re-ran — 66 pass, 1 fail, failing precisely on every edge expectation names its relation. Restored, tree clean.

Choosing option 1 over option 2 is the correct trade and the stated reason holds: restricting addedEdges to edges whose from was walked in both snapshots would discard the create-and-link-in-one-turn shape, which is legitimate model behavior. The residual risk is now fully documented and mechanically enforced, which is the most an instrument can do without paying the 11s full walk.

#1 — unstated create_node-rejects-unknown-type invariant + dead types seed: CLOSED

captureSnapshot's docstring (graph.ts:191-207) now states the actual load-bearing chain: schema list first → daemon rejects a node whose type has no schema (quoting the real error string, verified live) → a model inventing a type must create_schema first → therefore enumeration is complete → therefore expectNoWrites / noUnexpectedNodes are sound. It names completeness as the property the negative clauses rest on, which is the future-change tripwire the review asked for.

Coverage argument for types: [] verified. The re-review brief asks whether an empty seed opens a silent-empty-snapshot path. It does not, and I traced why:

  • Empty seed + populated schema list → queryTypes = schemas − SCAFFOLDING_TYPES. Identical coverage to before, since task/text are core schemas already in the list and note never was.
  • Empty seed + schema list returning empty → queryTypes is empty, nodes is [], no captureError. But this is not reachable as a silent failure: schema list throwing hits the outer catch and sets captureError; schema list succeeding with zero schemas means a daemon with no core schemas, in which case no node of any type can be created either, so an empty snapshot is the truthful answer. The genuinely worrying case — a snapshot that is empty because enumeration was narrow — is what types: [] removes rather than creates, since the seed can no longer diverge from the schema list.
  • The one theoretical hole is a schema list payload that parses but has no nodes array: readNodeList returns [] rather than erroring. That predates this commit and is not made worse by it; it would require a daemon returning well-formed JSON of the wrong shape.

The docstring keeps the seed mechanism while stating nothing needs it today — right call; deleting the parameter would be a bet that a schema-less type can never exist.

#3 — valueMatches array coercion: CLOSED

The number branch now admits only number and string, everything else short-circuits to NaN. Test covers [8], ["8"], {v:8}, null. The comment correctly distinguishes the deliberate string/number tolerance from the accidental array coercion.

On the re-review brief's question — could the stricter branch now reject a legitimate serialization the model produces? No, for the cases that matter:

  • 8.0 — JSON has no float/int distinction, JSON.parse("8.0") yields the number 8, matches.
  • "8" — string branch of the ternary, Number("8") === 8, matches.
  • " 8 " — Number(" 8 ") === 8, matches.
  • "8 days" — NaN, rejected. This was already rejected before the change (Number("8 days") is NaN), so it is not a regression, and rejecting it is arguably correct anyway: scenario 9's clause is hasPropertyValue: 8 scanning Object.values, so a model storing "8 days" in an estimate field genuinely did not store the scalar. It is a pre-existing tolerance question, not one this commit introduces.
  • [8] — now rejected, which is the point.

The only behavior change is object/array/null/boolean actuals, and none of those is a serialization a correct model would produce for a day count.

#5 — stableStringify / key-order sensitivity: CLOSED, with a caveat below

Correct on the cases that occur. Verified by direct execution: nested reordering normalizes ({m:{b:1,a:2}} and {m:{a:2,b:1}} both → {"m":{"a":2,"b":1}}), array order stays significant, real value changes are still detected. Keys are JSON.stringify-escaped, so a key containing ": cannot forge a separator — I probed {'a":1,"b': 2} and it escapes correctly to {"a\":1,\"b":2}, distinct from {a:1,b:2}. Four new tests, all meaningful.

On the collision question the brief raises — can two genuinely-different property sets now serialize identically and hide a write? I enumerated the ways:

  • JSON.stringify(undefined) ?? "null" is the intended undefined-handling and it is right for this input domain, but it does collapse three distinct values to "null": undefined, null, and non-JSON values (functions, symbols). So {a: undefined}, {a: null} and {a: () => 1} all render {"a":null}. Note this is stricter, not looser, than plain JSON.stringify, which drops the key entirely ({a:undefined} → {}) — so the helper actually distinguishes {a: undefined} from {} where the old code did not. The collision is unreachable in practice: properties comes from JSON.parse of CLI stdout (runCli → readNodeList → toSnapshotNode), and JSON.parse cannot produce undefined, functions, or symbols. Every value in a real snapshot is a JSON scalar, array, or plain object.
  • NaN/Infinity also render "null" — same story, unreachable from JSON.parse.
  • Date renders {} rather than an ISO string, because stableStringify recurses into objects before JSON.stringify gets a chance to call toJSON. Same unreachability argument.

So: no reachable collision, no missed write. Worth noting only because the helper is now the sole comparator for changedNodes, which feeds expectNoWrites — the one place in this instrument where a false pass is possible. The input-domain guarantee is what makes it safe, and that guarantee is not stated anywhere. See Nit 1.

Nit — markerFor() shared by both render sites: CLOSED (see Nit 2 for a placement defect)

Precedence is now single-sourced: empty generation → setup → pass/fail, matching partitionExcluded's bucketing. Two tests, including the precedence case.

Verified the inline call site's behavior is unchanged. The brief asks whether the empty-generation branch is reachable there. It is not: runner.ts:640-652 pushes its result and continues before ever reaching line 680. So the inline call correctly passes only {excludedAsSetup, passed} — omitting a flag that cannot be set at that point. Stronger still: excludedAsSetup is assigned in exactly one place (runner.ts:677), which is after that continue, so no ScenarioResult can ever carry both flags. The documented precedence is purely defensive. That is fine — a shared helper should be total over its input type — but the comment's framing ("a setup turn that also came back an empty generation rendered ⊙ in one place and ⊘ in the other") describes a divergence that was unreachable, not one that was observable. Harmless; noted only so a future reader does not go hunting for the bug it implies.

Nit — ScenarioResult.graphDiff typed GraphDiff: CLOSED

GraphDiff was already imported for EvalFixture.graph.scoreOutcome, so this costs nothing and makes the results file self-describing. runner.ts:676 assigns diff, typed GraphDiff | undefined, so it type-checks without a cast.

Skipped — trimming daemon-managed core types from enumeration: justification sound, accept the skip

The original nit explicitly said "worth measuring before acting". The author measured: 106ms for the entire node-enumeration pass. Against turns that take seconds, that is not a cost worth an architectural concession, and the concession is real — trimming would hard-code the snapshot's coverage to which types the daemon happens to seed today, which is precisely the coupling types: [] and the completeness argument in #1 just removed. Trimming would reintroduce, by hand, the divergence-between-seed-and-schema-list failure mode that the same commit eliminated elsewhere. Skipping it is not just acceptable, it is the more coherent choice; taking both changes would have left the file arguing with itself. The "revisit if the schema list grows enough to show up in wall clock" condition is the right trigger.


Part 2 — New issues introduced by b6393f43

No critical or improvement-level issues. Two nits.

  • Nit: scripts/eval/graph.ts:292-311 — stableStringify's soundness rests on an unstated input-domain guarantee, which is the same class of gap Set up Tauri + Svelte project structure #1 just fixed one function up. JSON.stringify(v) ?? "null" collapses undefined, null, NaN, Infinity, functions and symbols to the same token, and objects recurse before toJSON runs so a Date renders {}. None is reachable, because properties originates from JSON.parse of CLI stdout (runCli:120 → readNodeList → toSnapshotNode) and JSON.parse cannot produce any of them. But that is exactly the shape of argument the commit just decided was worth writing down for expectNoWrites, and this helper is the sole comparator feeding changedNodes → expectNoWrites, the one place a false pass can occur. One sentence — "input is always JSON.parse output, so undefined/functions/NaN cannot appear; the ?? "null" is defensive, not a value mapping" — would close it. Consistency with the standard the same commit set.

  • Nit: scripts/eval/runner.ts:299-321 — markerFor was inserted between partitionExcluded's docstring and its declaration. The original block (Split a run's results into scenarios that were actually scored and those excluded… Kept out of runEval's body so uniformity/totals math is independently testable) now sits immediately above markerFor, describing a function that does none of that, with markerFor's own docstring stacked below it. Two doc comments in a row, the first attached to the wrong symbol. Purely cosmetic — no tooling reads it — but it makes partitionExcluded look undocumented and markerFor look like it does totals math. Move markerFor (and its docstring) above partitionExcluded's docstring, or below the whole function.

    Related, and I would fold it into the same edit: GraphSnapshot.captureError's docstring (graph.ts:70-77) says "every end-state assertion checks this first and declines to score". assertEndState actually returns passed: false, which lands in the failed bucket and deflates the pass rate — it is not an exclusion the way excludedAsEmptyGeneration and excludedAsSetup are. The behavior is defensible (a run whose daemon died should not report a clean number, and checkUniformity catches a total failure), and the failure string is unmistakable to a human. But "declines to score" is the vocabulary this file uses for the two real exclusion buckets, so applying it to something that scores as a failure invites exactly the misreading the captureError design exists to prevent. Either say "scores as a failure carrying the fault, rather than silently converting it into a model verdict", or make it a third exclusion bucket. The wording fix is the cheap one and I would take it.

Test additions

Meaningful, not padding. Eight new tests across three files, each one pinned to a specific behavior the commit changed:

  • Key reordering (flat and nested) not a change; real change still detected; array order still significant. The last two are the important half — they prove the normalization did not over-normalize, which is the risk a naive stable-stringify introduces.
  • Array/object/null rejection in the number branch, with Number([8]) === 8 named in the comment as the reason.
  • markerFor precedence, both the four base cases and the combined case.
  • The createdEdge relation invariant — verified to bite (removing 11c's relation fails it).

Suite state confirmed: bun test scripts/ → 185 pass, 0 fail, 506 expect() calls, 9 files, matching the author's claim. Working tree clean after my invariant probe.

Standards

No any, no lint suppression, no new dependencies, no backward-compat shims. console use in scripts/ tooling matches the surrounding file. Comments explain why throughout — several of them explain a rejected alternative and its cost, which is the form that survives longest.


Bottom line

Both findings called out as "worth addressing before this instrument's numbers get quoted" are genuinely closed, and #4 is closed on stronger evidence than the review supplied. The three secondary fixes are correct and correctly tested. The single skip is well-argued and is the more internally-consistent choice. The two remaining nits are cosmetic and neither touches a measurement — neither should hold the merge.

@malibio malibio left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Automated pragmatic-code-review (re-review): APPROVE (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.

…omain

Both findings from the re-review, documentation-only:

- runner.ts: markerFor was inserted between partitionExcluded's docstring
  and its declaration, leaving two stacked doc comments with the first
  attached to the wrong symbol. Reordered. Its precedence comment also
  implied an observable divergence — a result cannot carry both flags,
  since excludedAsSetup is only assigned after the empty-generation
  branch continues — so it now says the ordering is defensive.
- graph.ts: stableStringify is the only comparator behind changedNodes,
  which expectNoWrites reads, so it is one of the few places a false PASS
  could originate. Its safety rests on values always coming from
  JSON.parse of CLI stdout; that guarantee is now stated, along with the
  two unreachable collapses (undefined/null, Date -> {}) it permits.

Also notes on partitionExcluded that a failed capture scores as `failed`
rather than forming a third exclusion bucket — deliberate, so an
environment fault is loud rather than quietly shrinking the denominator.

Co-Authored-By: Claude <[email protected]>
@malibio

malibio commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator Author

Re-review addressed — commit 258aa95

Both new nits taken. Documentation-only; no logic changed, tests remain 185 pass / 0 fail.

  • runner.ts — markerFor was indeed inserted between partitionExcluded's docstring and its declaration, leaving the first doc comment attached to the wrong symbol. Reordered. Also corrected the precedence comment: it implied an observable divergence, but as you showed, excludedAsSetup is only assigned after the empty-generation branch continues, so nothing can carry both flags. It now says the ordering is defensive and why it is pinned anyway.
  • graph.ts — stableStringify's input-domain guarantee is now stated: values always come from JSON.parse of CLI stdout, which is what makes the two collapses it permits (undefined/null via ?? "null", and Date → {}) unreachable. I'd verified this independently by execution before your report landed, and reached the same two: nested reordering normalizes, array order stays significant, real changes and type changes still differ, and escaped keys can't forge a separator.
  • Also noted on partitionExcluded that a failed capture scores as failed rather than forming a third exclusion bucket — deliberate, so an environment fault is loud rather than quietly shrinking the denominator. Your point that "declines to score" was the wrong vocabulary for it was fair.

Thanks for the verification work on the abort path and the invariant — confirming captureError never escapes to runEval's try/catch, and that the createdEdge invariant actually fails when 11c's relation is removed, are the two things I'd most have wanted double-checked.

@malibio

malibio commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator Author

Heads-up: conflicts with #2246, which just merged (932f92ca)

#2246 (the #2242 winnability audit) landed and touches scripts/eval/fixtures/agent-matrix.ts, so this PR is now CONFLICTING. Posting the resolution here so it isn't re-derived at rebase time.

The two changes are complementary, not competing — this PR fixes the scoring, #2246 fixed the prompts — but they overlap textually on three scenarios.

Suggested resolution, per conflict

Scenario 6 — keep THIS PR's version, discard #2246's.

#2246 changed 6 from toolSequence [resolve_query, update_node] to toolOnce update_node. This PR's approach is strictly better: it keeps expect as a diagnostic and adds a path-agnostic end clause, where #2246 removed the trajectory signal outright. Take end: { updatedNode: { contentMatches: "offline sync", minProperties: 1 }, noUnexpectedNodes: true } and revert the expect back to the original toolSequence.

Worth keeping from #2246's version: the comment block explaining why the trajectory assertion was redding out correct models (the rendered history replays scenario 4's write with estimated_days 5 and nodespace://fw1 inline, so there was never any indirection for resolve_query to resolve). That diagnosis is what justifies this PR's path-agnostic clause, and it's pinned by scenario_6_history_resolves_its_indirect_reference_directly.

Scenarios 8e and 11d — keep #2246's prompts, and strengthen the end clauses.

Both prompts were reworded in #2246 because they were unwinnable as written:

  • 11d's old prompt ("What did we settle on that the rebuild has to respect?") was answerable from history without touching the graph — the terse-fact replay hands the model both endpoint ids, the mentions edge, and the decision's own text. Every model answered in prose and scored red.
  • 8e's old prompt ("Run through those calls for me") pointed three turns back, past 8d's Planning Cycle, so the nearest antecedent was the wrong type.

There's also a new scenario 11c2 (records a second edge to the same decision) that 11d's new prompt depends on — it asks for the set of inbound links, which is only non-trivial with two edges. It'll need an end clause; createdEdge: { relation: "mentions" } matching 11c's should be right.

One gap worth closing while you're in here

This PR currently gives both 8e and 11d end: { expectNoWrites: true }. Since scoreOutcome replaces trajectory as the score, that clause is passed trivially by a model that calls no tools at all — which is precisely the failure both scenarios exhibit today. 11d would stop measuring traversal entirely rather than measuring it correctly.

11d needs an end clause with teeth, or an explicit acknowledgement that its noRetry/minCalls: 1 trajectory diagnostic is the only thing measuring the traversal and that the diagnostic no longer gates the score. Read-only scenarios are the awkward case for outcome grading generally — worth a note in end-state.ts about how the model handles reads whose whole point is that a specific read happened.

Context that may be useful

#2246 added packages/agent/tests/matrix_scenario_winnability.rs — 5 tests that hand-execute each scenario's ideal call against a real SqliteStore + NodeService + GraphToolExecutor. Relevant to this PR: one confirms a single get_related_nodes call enumerates both of 11d's inbound edges, so a correct model can't trip the no-repeat half. If you add edge-related end clauses, that file is the cheap place to prove the shape you're asserting is actually producible.

It also fixed a production bug the audit surfaced: completed_writes_from read a schema write's id under schema_id, but CreateSchemaOutput is rename_all = "camelCase" — so the lookup matched nothing and every schema write lost the id a later create_node must copy into node_type. Shouldn't affect this PR, but it changes what history a multi-turn chain actually sees, which is worth knowing if you re-baseline.

Follow-up #2248 tracks the indirect-reference decomposition coverage scenario 6 gave up — it notes this PR's end-clause model should probably shape that scenario's design.

Three sibling PRs landed on main touching the same files. They compose
rather than conflict, but the seams needed real resolution:

#2247 (--runs / pass^k) restructured the runner around reps: the flat
`summary`/`results` on EvalResults became `aggregate`/`reps`, and the
scenario loop moved into a per-rep function. My per-run counts moved to
RepSummary, and the report sums them across reps rather than quoting the
first.

The seam that actually mattered: `aggregateReps` filtered only
`excludedAsEmptyGeneration`, so setup scenarios would have counted toward
pass^k — putting the cascade back one level up, where a flaky setup turn
reads as an unreliable SCENARIO rather than as its successors' reps not
being comparable. ScenarioReliability now carries `setup`, the aggregate
excludes it, and the reliability table renders it as ⊙ setup rather than
as a degenerate empty generation (both have scoredReps === 0). Four tests
pin it; verified they fail if the filter is reverted.

#2246 (scenario audit) added scenario 11c2, which had no `end` clause —
caught by my own fixture invariant rather than by the merge. It asserts
both halves (the note exists AND the edge reaches it), because it is the
create-and-link-in-one-turn shape: asserting only the edge would pass on
a turn that linked the wrong node, and only the node would pass on the
prose-instead-of-an-edge failure 11c exists to catch. It is also the
shape the asymmetric `after` walk was built to see.

Notably #2246 reached the same conclusion for scenario 6 independently —
assert the outcome, not the route — and relaxed its trajectory
expectation for the reason this PR exists.

test:all green: 227 frontend files / 4794 tests, 214 scripts, 24 skill,
53 Rust binaries including #2246's new winnability suite.

Co-Authored-By: Claude <[email protected]>
@malibio

malibio commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator Author

Merged main — commit 9100ea9

Three sibling PRs landed while this was in review (#2244, #2246, #2247), all touching the same files. They compose with outcome grading rather than contradicting it, but two seams needed real resolution rather than textual conflict-picking.

#2247 (--runs / pass^k) — structural

It restructured the runner around reps: EvalResults went from flat summary/results to aggregate/reps, and the scenario loop moved into a per-rep function. My per-run counts moved to RepSummary, and the report now sums excludedSetup / trajectoryDisagreements across reps instead of quoting the first.

The seam that mattered, and it was a live bug: aggregateReps filtered only excludedAsEmptyGeneration, so setup scenarios would have counted toward pass^k. That puts the cascade back one level up — a flaky setup turn reads as an unreliable scenario when what it actually means is that its successors' reps aren't comparable. Fixed: ScenarioReliability carries setup, the aggregate excludes it, and formatReliabilityTable renders it as ⊙ fixture setup rather than as a degenerate empty generation (both have scoredReps === 0, so they were previously indistinguishable in the table). Four new tests pin it, and I verified they fail when the filter is reverted.

#2246 (scenario audit) — semantic

agent-matrix.ts auto-merged textually clean, which is exactly the case worth not trusting: #2246 added scenario 11c2, which had no end clause. My own fixture invariant caught it, not the merge.

11c2 now asserts both halves — the note exists AND the edge reaches it. Asserting only the edge would pass on a turn that linked the wrong node; asserting only the node would pass on the prose-instead-of-an-edge failure 11c exists to catch. It's also the create-and-link-in-one-turn shape, so it happens to exercise the asymmetric after walk directly.

Worth noting: #2246 independently reached the same conclusion for scenario 6 — assert the outcome, not the route — and relaxed its trajectory expectation for precisely the reason this PR exists. The two changes agree rather than collide.

Verification

The merge changed scoring logic (aggregateReps), so it's a real change rather than a mechanical conflict resolution — flagging that explicitly in case you want another look before merging.

@malibio
malibio merged commit 8cf57e1 into main Aug 22, 2026
@malibio
malibio deleted the issue-2243-outcome-grading branch August 22, 2026 21:48
malibio added a commit that referenced this pull request Aug 23, 2026
* Restore indirect-reference decomposition coverage with a comparative referent (closes #2248)

Scenario 6 was the matrix's only test of multi-step indirect-reference
decomposition. #2242 removed its `[resolve_query, update_node]` assertion for a
good reason — the referent turned out to be recoverable from history by string
match — which left the capability unmeasured and `toolSequence` used by zero
live scenarios.

Adds scenario 12 (12a-12d) as its own group, keying the reference off a
COMPARATIVE ("whichever is the biggest job") over an estimate spread across
three separate create_node facts. Each fact still renders its value and id
inline, which is unavoidable; what no fact states is the ORDERING across them.
That is the indirection scenario 6 lost.

Both halves of the #2242 winnability discipline are proved before the scenario
is trusted, rather than assumed:

- `scenario_12_history_does_not_resolve_its_comparative_reference` renders the
  REAL history and asserts the three instances and their estimates are present
  while the ordering words are absent. Asserted in both directions so it cannot
  pass vacuously on an empty render — verified by deliberately breaking it.
- `scenario_12_ideal_comparative_chain_is_accepted_and_the_read_carries_the_values`
  proves against a live backend that the read surfaces all three instances WITH
  their estimates and that the write on the winner persists.

12d scores on the end state (`updatedNode` pinned to the 21-day instance) and
keeps `toolSequence` as the trajectory diagnostic, per the model #2245 landed.
`contentMatches` on the correct target is the whole assertion: a model that
resolves the comparison wrongly still calls update_node and still persists a
property, so a clause that only counted properties would score that green.
`minProperties: 2` rather than 1 because the node already carries its estimate
from 12b — 1 would pass on a turn that resolved correctly and then wrote
nothing.

Also surfaced by the audit, and NOT fixed here (filed separately):
`run_node_query` silently drops `sorting` when `filters` is empty, because that
branch calls `node_ops::query_nodes`, which is never passed it. A model asking
for "the biggest" via sorting+limit gets the first row back with no error.
`filterless_search_silently_ignores_sorting` pins the current wrong behavior so
the fix is detected; the sorted-route winnability test carries a compensating
filter with a comment explaining why.

Scenario 12 stays winnable regardless — enumerate-then-compare works, and that
is the route its diagnostic names.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_012A1ryuphm1PidSY1KTvcKG

* Cross-reference the sorting bug (#2249) from the tests that work around it

The winnability audit for scenario 12 surfaced that search_nodes silently
drops `sorting` when `filters` is empty. Now that it has an issue number,
point at it from the three places a reader lands: the test that pins the
current wrong behavior, the sorted-route test carrying the compensating
filter, and 12d's own diagnostic comment — where a red should be checked
against the trajectory before being read as a decomposition failure.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_012A1ryuphm1PidSY1KTvcKG

* Address review: rescope scenario 12 to what it actually measures

The review dumped the real rendered history and refuted this PR's central
claim. All three estimates and all three ids are rendered adjacent, uniform,
inline — max(9, 21, 4) is an in-context comparison, so a model can go straight
to update_node with the right id and never read anything, and that is a CORRECT
answer. The absence proof showed the ordering is not lexically STATED; the
comments treated that as showing it is not DERIVABLE. Those are different, and
derivability is what makes a reference indirect.

That is a subtler repeat of the scenario 6 defect #2242 found, and it survived
an absence proof precisely because the proof asserted the wrong property.

Every scalar a scored turn writes is replayed inline by terse_write_fact, so no
value this chain writes can be made underivable by wording alone. Closing #2248
properly needs a referent the agent never wrote, which needs out-of-band seeding
the runner deliberately does not support. Rather than ship a weaker scenario
under the stronger banner, this rescopes the claim:

- Group renamed "Comparative reference resolution"; header now shows the actual
  rendered history and states plainly what it does and does not establish.
- Scenario 6's comment reverted to saying the decomposition gap is STILL OPEN
  (#2248 stays open); 12 is named as nearest cover, not a replacement.
- Daemon test renamed scenario_12_history_states_the_values_but_not_the_ordering
  with a docstring scoping what it proves. The negative assertion is kept: it
  would catch terse_write_fact starting to emit a superlative, which would decay
  12d into the string match that cost 6 its indirection.

Also addressed, from the same review:

- 12a-12c marked `setup: true` (were not, against the group doctrine at
  agent-matrix.ts:66-78). Without it one 12a defect counts four times in the
  denominator — the cascade bug #2242 fixed for 11a/11b. Invariant test updated
  from ["11a","11b"] to the full set. Denominator is now 20 scored, not 25.
- 12b split into 12b + 12b2, one instance each. The two-node prompt carried
  `toolOnce create_node`, which requires EXACTLY one call: correct behavior
  (two calls, or create_nodes_from_markdown) scored red, and creating only one
  node scored green. Splitting also lets each turn carry noUnexpectedNodes,
  which a two-instance turn cannot state.
- 12d's `toolSequence [search_nodes, update_node]` replaced with
  `noRetry update_node, minCalls: 1`. The subsequence pinned one of four
  legitimate read spellings and reds out the shortest correct route. Scenario
  11c documents the same reasoning.

Consequence, stated rather than buried: toolSequence is again used by no live
scenario. Reviving it needs a scenario whose route is genuinely forced, which
is the same thing #2248 needs — so it stays dead rather than being revived by
asserting something untrue.

12d's minProperties: 2 is kept, with its residual weakness now documented: it
asserts a second property became populated, not that it holds the right value,
because the clause vocabulary cannot express "some property equals boolean
true" (hasPropertyValue intercepts `true` as "any present value" at
end-state.ts:161, and its string branch rejects booleans at :177).

test:all exits 0; quality:fix clean.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_012A1ryuphm1PidSY1KTvcKG

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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.

Agent matrix scores trajectory where it should score outcome — correct results fail, severity is flattened

1 participant