Skip to content

extraction: the lent verdict sends under the rows its input was read from (FIX S69E2B-CANDIDATE-FROM-STEP-RECORD, part C) - #10030

Open
olety wants to merge 5 commits into
mainfrom
opus-split-78/fix-extraction-verdict-source-rows
Open

olety wants to merge 5 commits into
mainfrom
opus-split-78/fix-extraction-verdict-source-rows

Conversation

@olety

@olety olety commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

The last part of FIX row [S69E2B-CANDIDATE-FROM-STEP-RECORD] (RULING S69E2B-CANDIDATE-OPERANDS = A; parts A and B are #9865 and #9938), with the move-only split of FIX row [LENT-PACK-FILES-NEAR-GIANT-FILE-BAR] as its first commit.

The defect

A native Dreamer decision read sends its model call on a route bound to the rows fixed code read its input from (FIX 6998, FIX 11526; dreamer_consolidation/request_sources.rs). The call's permit, its receipt and its model-call row then name those rows and their worlds.

The lent extraction verdict (ai.verdict with an extraction pack) sent every call with no rows (extraction_pack/execution.rs, sources: None), because the engine did not know which rows the job's extraction call had read. Since #9865 a lent step's record keeps those rows (input_sources), and since #9938 an operand names the recorded candidates it is folded from (from_steps). So for such an operand the rows are known, and the lent verdict's calls were the one Dreamer decision read whose receipts named none.

The change

Commit 1, move only (FIX [LENT-PACK-FILES-NEAR-GIANT-FILE-BAR]): llm/step/step_claim.rs and extraction_pack/reads.rs were both 793 lines, seven under the giant-file bar, and this PR adds to the first. The step value decoder moves to the child module llm/step/step_claim/decode.rs (its two names stay reachable through step_claim), and the correction listing (CorrectionListed, correction_sets, restates, cited_claims) to the sibling extraction_pack/correction_listing.rs. Only module lines, imports, two visibility paths (pub(in crate::llm::step)), the pub(super) that cited_claims gains with its reflowed signature, and the new module docs differ from the moved text. After the PR: step_claim.rs 538, step_claim/decode.rs 277, reads.rs 689, correction_listing.rs 121, execution.rs 739.

Commit 2, test support only: the extraction verdict fixture lends its role tables a sourced route that sends on the scripted backend and keeps the rows each call was bound to (test_doors/extraction_verdict/sourced_route.rs; take_bound_source_rows, fixture_step_bound_source_rows).

Commit 3, the change (commit 5 corrects one paragraph of its module text, doc only):

  • llm/step/step_claim/decode.rs, llm/step/request_hash_step.rs: the decoder keeps input_sources (it checked the key and dropped it) and StepRecord carries it.
  • extraction_pack/step_records.rs: the operand check returns, per operand, the join of the recorded rows of every step the operand names (OperandBound::sources). It is None for an operand that names no step, and for one that names a step whose record keeps no rows.
  • extraction_pack/read_sources.rs (new) and extraction_pack/execution.rs: each read's set is built by native's own two constructors once the read's labels exist, and passed as VerdictRead.sources:
    • a correction read, whole or page: the rows of each candidate that owns a question of the read, the pack's evidence, and the stored rows the read's labels name (correction_source_rows);
    • the correction final round: the same for its one candidate;
    • a resolution read (whole or page), the resolution final and the identity final round: every member's rows, the conflict's evidence, and the labelled stored rows that are no member's own unwritten claim id (conflict_source_rows).
      A read that rests on a candidate whose rows are not known sends unsourced, as before. That is native's own rule for a member whose rows are not known.

Native joins the resolution final's set with each page's. Every page's set is the conflict's one set (the same members and evidence, and labels that name only members and the prior heads, which the evidence lists), so the lent final sends under that set and needs no page sets.

What changes in behaviour

Capture only. The run admission records a call's rows in its permit facts and on its receipts (llm/run_admission: PermitFacts::source_rows, source_worlds) and refuses nothing by them: no refusal kind of RunDenied reads them. A host that lends no sourced route sends as before. No read is refused, held or narrowed by this PR, so no request of the shipped job code can newly fail.

This corrects one sentence of my plan note (NOTE PLAN-S69E2B-CANDIDATE-FROM-STEP-RECORD-PR-C, 21 Nov 03:32), which said the admission "judges" a call by its rows' worlds. It records them.

Stored change: none. The record keys are the ones a lent step already writes (#9865). The verdict step's request hash does not move, since the route is no part of the request, so a verdict in flight across the upgrade is served from its memo as before. No verb, no grant and no setting changes.

Where the set differs from native's

The set names every row the lent calls read. That is not always native's set, in two ways:

  • Native asks each candidate about corrections before it folds candidates. The lent job folds first, so a lent operand folded from two steps sends under both steps' rows where native sends under one step's.
  • A native extraction call reads its whole chunk of TURNs. A lent step may be given a part of that chunk; its record then names fewer rows than the native call's, and so does a read over its candidate. (Found by the leg that wrote the tests; the commit message of commit 3 says "never narrower", which holds for what the lent calls read and not against native. Commit 5 corrects the module text.)

Over one TURN in one lent step the two sets are equal, and the fourth test asserts it.

Tests

crates/oneiron/tests/extraction_verdict_sources.rs (commit 4), four tests on the recording route, each over a lent generation step that really runs:

  • a_correction_read_over_a_recorded_candidate_sends_under_its_steps_rows: one landed head about the subject, one lent step whose candidate proposes another value. The lent correction read over the operand that names that candidate sends exactly one bound call, and its rows hold every row the step's own call was sent under, the listed head, the cited TURN and the subject.
  • a_correction_read_over_an_operand_that_names_no_step_sends_unsourced: the same operand without from_steps on a fresh fixture: the verdict answers and no call is bound. A control, green before and after.
  • a_resolution_read_sends_under_every_members_rows: two lent steps over two TURNs, two members of one conflict. The lent resolution read sends one bound call whose rows hold both steps' rows and neither member's unwritten claim id; with from_steps removed from one member, no call is bound.
  • a_lent_correction_read_sends_under_the_rows_the_native_read_sends_under: on one fixture the native oracle's correction read and the lent correction read bind equal row lists.

Run: RUSTFLAGS="--cfg oneiron_test_support" cargo test --locked -p oneiron --all-features --test extraction_verdict_sources.

Red ref: opus-split-78/fix-extraction-verdict-source-rows-red (36eff8f = commit 2 of this PR, the door, plus the test file; nothing of the change). Expected there: the first, third and fourth tests fail at their first assertion on the bound calls ("The correction verdict binds its source rows.", "The resolution verdict binds its source rows.", "The lent and native correction reads bind identical source rows."), and the control passes.

The fourth test's equality is by reading: it holds if the lent step's recorded rows equal the native slice's rows for a one-TURN attempt (the conversation, the TURN, its MESSAGE, the byline person, the subject, the listed head). If the proof run shows a row of difference, the test's expectation is what is wrong, and a new PR fixes it.

Not compiled, not run

Nothing of this PR has compiled or run. The merge check is its first compile of the engine crate; it builds no test file and no test door, so one compile of the engine crate with the test-door flag and the test files is booked and its result is posted as a note. The tests run on the fleet after the merge (proof part fix-rows-runs21) and the result is posted as a proof note.

…les near the giant-file bar

Move only. llm/step/step_claim.rs (793 lines) keeps the terminal step claim
write and the value encoder; the fail-closed value decoder with its decoded
form and two helpers moves to the child module step_claim/decode.rs, and its
two names stay reachable through step_claim as the memo index names do.
dreamer_consolidation/extraction_pack/reads.rs (793 lines) keeps the checked
pack, the paging and the read plans; the listed claim row, the eligible
pairs, the restatement rule and the cited claims move to the sibling
correction_listing.rs.

Only module lines, imports, two visibility paths and the new module docs
differ from the moved text. FIX [LENT-PACK-FILES-NEAR-GIANT-FILE-BAR].
…nder

Test support only. The verdict parity fixture lends its role tables a
sourced route beside the scripted backend: a call that names the rows its
input was read from goes to the same backend, and the route keeps those
rows. A test reads them with take_bound_source_rows, or through the step
fixture with fixture_step_bound_source_rows. The four role tables built on
the fixture (the verdict lender, the native oracle's executor, the shared
pass resources and the step lender) take the route; a call that names no
complete set sends as before and leaves no entry.
A native decision read sends on its route bound to the rows fixed code read
its input from, so the call's permit, its receipt and its model-call row
name them (FIX 6998, FIX 11526). The lent verdict sent with none, because
the engine did not know which rows the job's extraction call had read. A
step's record keeps those rows since the record kept its call inputs, and
an operand names the recorded candidates it is folded from.

The step value decoder keeps input_sources and the step record carries it.
The operand check joins, per operand, the recorded rows of every step the
operand names (OperandBound::sources): none for an operand that names no
step, or that names a step whose record keeps none. The lent execution
builds each read's set with native's own constructors once the read's
labels exist: a correction read under the rows of the candidates that own
its questions, a read over a conflict under every member's rows, each with
the pack's evidence and the stored rows the labels name. A read that rests
on a candidate whose rows are not known sends unsourced, as before and as
native does for such a member.

Capture only: the run admission records a call's rows and refuses nothing
by them. No stored row changes; the record keys are the ones the step
already writes. The verdict step's request hash does not move, since the
route is no part of the request.

One difference from native stays: native asks each candidate before it
folds candidates, so a lent operand folded from two steps sends under both
steps' rows where native sends under one step's. The set is wider than
native's and never narrower.

FIX [S69E2B-CANDIDATE-FROM-STEP-RECORD], the last part.
@greptile-apps

greptile-apps Bot commented Nov 20, 2026

Copy link
Copy Markdown

Automatic reviews are disabled for this repository. Configure in Code Review Settings.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 17 billable files and costs up to $4.25.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 38 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 152 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 436c6e5 and 0f0a6ff.

Files selected for processing: 17

  • crates/oneiron/src/dreamer_consolidation/executor/extraction.rs
  • crates/oneiron/src/dreamer_consolidation/executor/extraction/corrections.rs
  • crates/oneiron/src/dreamer_consolidation/executor/merge_resolution.rs
  • crates/oneiron/src/dreamer_consolidation/extraction_pack.rs
  • crates/oneiron/src/dreamer_consolidation/extraction_pack/correction_listing.rs
  • crates/oneiron/src/dreamer_consolidation/extraction_pack/execution.rs
  • crates/oneiron/src/dreamer_consolidation/extraction_pack/read_sources.rs
  • crates/oneiron/src/dreamer_consolidation/extraction_pack/reads.rs
  • crates/oneiron/src/dreamer_consolidation/extraction_pack/step_records.rs
  • crates/oneiron/src/llm/step/request_hash_step.rs
  • crates/oneiron/src/llm/step/step_claim.rs
  • crates/oneiron/src/llm/step/step_claim/decode.rs
  • crates/oneiron/src/test_doors/extraction_steps.rs
  • crates/oneiron/src/test_doors/extraction_verdict.rs
  • crates/oneiron/src/test_doors/extraction_verdict/lender.rs
  • crates/oneiron/src/test_doors/extraction_verdict/sourced_route.rs
  • crates/oneiron/tests/extraction_verdict_sources.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Four tests on the recording route of the verdict fixture, each over a lent
generation step that really runs: a correction read over an operand that
names its recorded candidate sends one call under the step's own rows, the
listed head, the cited TURN and the subject; the same operand without its
step sends unsourced; a resolution read over two members sends under both
steps' rows and neither unwritten member claim, and unsourced as soon as
one member names no step; and over one TURN the lent correction read sends
under exactly the rows the native correction read sends under.

Before the change the lent verdict names no rows, so the first, third and
fourth tests fail there at their first assertion on the bound calls.
The module text said the lent set is never narrower than native's. That
holds for what the lent calls read, not against native: a native extraction
call reads its whole chunk of TURNs, and a lent step may be given a part of
that chunk, so its record, and a read over its candidate, names fewer rows
than the native call's. Doc only.

This branch has not been deployed

No deployments
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