Skip to content

Matrix no longer measures indirect-reference decomposition — build a chain whose referent is not recoverable from history #2248

Closed

Description

@malibio

Summary

Scenario 6 was the matrix's only test of multi-step indirect-reference decomposition — it asserted the [resolve_query, update_node] subsequence for "The five-day one got signed off — mark it that way". #2242 removed that assertion, for a good reason, and the capability is now unmeasured.

toolSequence is consequently used by zero live scenarios. It survives only in its type definition, its assertExpectation case, and unit tests.

Why the assertion was removed

The scenario's design intent was that "the five-day one" is an indirect reference only resolve_query can resolve — deliberately chosen over the write-up's own name so a plain lookup could not shortcut it.

That intent does not survive contact with the rendered history. node_history_from_messages replays scenario 4's create_node as a terse fact carrying its property values and its id inline:

Fact: a feature_writeup node was created with title 'offline sync' and properties estimated_days 5, signed_off false (id nodespace://fw1).

So estimated_days 5 and nodespace://fw1 are both literal text in the prompt. "The five-day one" was already a direct string match, and there was no indirection left for resolve_query to resolve. Requiring the call anyway scored a correct end state red for taking a shorter route the fixture's own setup made available — which measures the fixture, not the model.

Pinned by scenario_6_history_resolves_its_indirect_reference_directly in packages/daemon/src/services/local_agent_service.rs.

What is now unmeasured

  • Whether the model can decompose a reference it cannot resolve by string match
  • Whether it chains resolve_query → act at all
  • toolSequence as an assertion kind, end to end

Secondary effect: scenarios 6, 9 and 10b now all carry toolOnce update_node, minProperties: 1. Three scenarios, one assertion shape — the matrix's effective breadth shrank more than the #2242 diff's size suggests.

What to build

A chain whose referent is genuinely not recoverable from history. The constraint is specific: every write the matrix makes is replayed into later turns with its particulars, so the referent has to be something no terse fact states. Candidate approaches, in rough order of preference:

  1. Key the reference off a value that was never written by the agent — e.g. seed a node out-of-band (not via a scored turn), then refer to it by a property only a lookup can surface. No completed_writes record exists for it, so nothing is replayed.
  2. Refer to a derived/aggregate property — "the one with the highest estimate" across several instances. No single fact line states the ordering; it has to be computed from a read.
  3. Put enough turns between setup and reference that history compaction drops the particulars — least preferred: it couples the scenario to maybe_summarize_history's threshold, which would make the scenario silently unwinnable if that tuning changes.

Whichever is chosen, the winnability discipline from #2242 applies: render the actual history and confirm the referent is absent from it before assuming the scenario tests what it claims. A scenario that reds out correct behavior measures the fixture, not the model.

Note on sequencing

#2243 / PR #2245 moves the matrix to outcome-based (end clause) scoring, keeping expect as a diagnostic. That changes what a new decomposition scenario should assert — likely an end clause for the state change plus the trajectory diagnostic for the route. Worth landing that first, or at least designing against it.

Follow-up from #2242 (PR #2246), raised in code review.

Activity

  1. malibio commented on Aug 22, 2026

    @malibio
    CollaboratorAuthor

    Correction — the design is smaller than this issue implies

    I filed this with three candidate approaches without checking which the harness actually supports. Having now read scripts/eval/runner.ts, two of the three are dead and the survivor needs no harness work. Correcting the record so nobody picks this up and re-derives it.

    Approach 1 (out-of-band seeding) is dead. There is no seam for it. The --between-runs hook (runner.ts:773) fires between whole reps, not before a group, so it cannot seed state scoped to one chain. Nothing else runs between newChat() and the first scored turn.

    Approach 3 (history compaction) stays discouraged, for the reason already given — it couples the scenario to maybe_summarize_history's threshold.

    Approach 2 (derived/aggregate referent) is the one, and it needs no new harness capability.

    The subtlety I missed when filing: runner.ts:704-709 supports priorTurns — unscored context turns that run before the scored prompt. That looks like the answer, but it isn't on its own. A priorTurn is still a real turn, so its writes are still replayed as terse facts by node_history_from_messages. Unscored ≠ invisible. Any approach that just moves the setup into a priorTurn hits exactly the wall scenario 6 hit.

    What defeats the replay is a referent that no single fact line states. Create several instances via priorTurns, then refer to one by a property that only exists across the set:

    "Mark the one we estimated highest as signed off"

    Each instance's fact line is replayed with its own estimated_days value. None of them states the ordering. Resolving "the one we estimated highest" requires reading and comparing — which is the decomposition behavior this issue exists to measure, and it is genuinely unrecoverable from an append-only fact log.

    This also fixes the flaw in the original scenario 6 rather than reproducing it: "the five-day one" failed because estimated_days 5 was literal text in a replayed fact. A superlative has no literal form in any fact line, no matter how many are replayed.

    Winnability check before building (the #2242 discipline): render the actual history for the chain and confirm no line states the ordering — scenario_6_history_resolves_its_indirect_reference_directly in local_agent_service.rs is the pattern. Then confirm the ideal call is accepted, per matrix_scenario_winnability.rs. A scenario that reds out correct behavior measures the fixture, not the model.

    Sequencing unchanged: still worth landing #2245 first, so the scenario is written against the end-clause model rather than rewritten into it.

  2. malibio commented on Aug 22, 2026

    @malibio
    CollaboratorAuthor

    Baseline (worktree issue-2248-indirect-reference-decomposition, base 8cf57e1 with #2245 merged) — Frontend: 227 test files passed, 4794 tests passed.

  3. self-assigned this
    on Aug 22, 2026
  4. malibio commented on Aug 23, 2026

    @malibio
    CollaboratorAuthor

    Still open after PR #2250 — with the constraint now pinned down

    #2250 added scenario 12, a comparative reference scenario. It does not close this issue, and the PR is deliberately marked Refs rather than Closes.

    What #2250 established the hard way

    The first revision claimed to close this, keying the referent off a comparative ("whichever is the biggest job") over three estimated_days values, backed by a daemon test showing the ordering words are absent from rendered history. Code review dumped the real history and refuted it:

    Fact: a feature_writeup node was created with title 'checkout rewrite' and properties estimated_days 9 (id nodespace://fw10).
    Fact: a feature_writeup node was created with title 'search indexer' and properties estimated_days 21 (id nodespace://fw11).
    Fact: a feature_writeup node was created with title 'audit log export' and properties estimated_days 4 (id nodespace://fw12).
    

    Three adjacent lines, uniform format, every estimate and every id inline. max(9, 21, 4) is a one-token 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 generalizable lesson: an absence proof that asserts !contains("<ordering word>") shows the answer is not lexically stated. It does not show the answer is not derivable, and derivability is what makes a reference indirect. This was a subtler repeat of the scenario 6 defect from #2242, and it survived review because the proof asserted the wrong property.

    The constraint this issue actually faces

    Sharper than the original write-up's framing:

    Every scalar a scored turn writes is replayed inline by terse_write_fact. So no value the agent itself writes can be made underivable by prompt wording alone — not a number, not a date, not a string. Approach 2 (derived/aggregate) cannot satisfy this issue on its own, because the inputs to the aggregate are always in the prompt.

    That leaves the original approach 1 as the only one that actually works, and it is blocked on machinery that does not exist:

    • The referent must be something the agent never wrote, so no completed_writes record exists and nothing is replayed.
    • That requires out-of-band seeding, which the runner deliberately does not support — "Assert, do not own" (runner.ts), "never starts or seeds anything" (env.ts). priorTurns does not help: those are still model turns, so their writes are replayed too.

    So closing this needs an explicit decision to add a seed hook to EvalFixture/runRep (or to shell out to the nodespace CLI the way aichat.ts does), against a stated design stance. That is the real scope, and it is bigger than the original issue implied.

    Also still un-met

    toolSequence remains used by zero live scenarios. A draft of 12d used it, but naming [search_nodes, update_node] pins one of four legitimate read spellings and red-lines the shortest correct route, so it was replaced with noRetry. Reviving the kind honestly needs a scenario whose route is genuinely forced — the same thing this issue needs.

    What #2250 does leave behind

  5. malibio commented on Aug 23, 2026

    @malibio
    CollaboratorAuthor

    Reopening — closed automatically by the squash-merge of #2250, whose commit message still carried a stale closes #2248 from its first revision.

    That keyword was wrong by the time the PR merged. #2250 was retitled and rescoped after code review showed its comparative referent does NOT restore decomposition coverage: every estimate is rendered inline in history, so the ranking is derivable in-context. The PR body was corrected to Refs (and closingIssuesReferences was verified empty), but the squash commit message is what GitHub acted on.

    The gap this issue describes is still open. See the analysis comment above for the sharpened constraint — approach 2 cannot satisfy it, because terse_write_fact replays every scalar the agent writes, so only out-of-band seeding works and that needs a runner design decision.

  6. malibio commented on Aug 23, 2026

    @malibio
    CollaboratorAuthor

    Baseline for the seeded-referent work (worktree issue-2248-seeded-referent, base e1450d6) — Frontend: 227 test files passed, 4794 tests passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions