Skip to content

decide: a vault manifest's decision-role binding holds its rung to that model - #7732

Open
olety wants to merge 10 commits into
opus-census-l9/decide-precision-rungfrom
opus-census-l9/decide-role-binding
Open

olety wants to merge 10 commits into
opus-census-l9/decide-precision-rungfrom
opus-census-l9/decide-role-binding

Conversation

@olety

@olety olety commented Nov 13, 2026

Copy link
Copy Markdown
Member

Census row L9-27, PR 2 of 2 (native stack on #7711). Plan: lanes/post-untangle/plans/PLAN-L9-27.md. Ruling L9-27-ROLEBIND = A (Engine, 14 Nov 03:02).

What it does

DECIDE-SWITCHOVER = A (2026-10-16): each decision role is a backend inside decide(). The host fills the head, precision and escalation rungs from its own [models]; until now the vault manifest's decision_head, decision_band and decision_escalation bindings were read by no code.

  • oneiron::llm::decision::ManifestBoundRung (new llm/decision/role_bound.rs) wraps the rung a decision role fills. The map comes from canon (cross/models.md#oneiron-roles): decision_head -> System One rung, decision_band -> Precision rung, decision_escalation -> Escalation rung. new refuses a role that fills no decision rung, and an inner provider pinned on another rung.
  • At each call it reads the vault manifest's binding for the role, at the slot's effective route (the pin, narrowed by any resident route). If the binding names a model other than the rung's own, the rung abstains before any call, so nothing is spent. The ladder then takes the question on to the next rung that can answer it, and the receipt's pins name the rung that abstained. This is the rule every served role already follows (oneiron-server/src/models/role_route.rs:1-12: "this server must serve exactly that model ... a vault's route may narrow, never silently widen").
  • A role the manifest leaves unbound keeps the host's rung, and so does a vault with no manifest. The three roles are optional (ModelRole::is_optional).
  • Vault::bound_model_for_role(role) returns that binding: None when no manifest is set or the role is unbound. It shares its route rule with price_model_for_role_in_txn, through the new private helper model_at_effective_route; price's behaviour does not change.
  • The decision host (oneiron-server/src/decision_host/mod.rs) wraps its System One, precision and house-read rungs.
  • ladder::abstained becomes pub(super), so the wrapper reuses it.

Mechanism choices

  • The rung's model comes from its pin. A pin whose model is a whole provider/name@revision id names that model: the house read pins its whole model id, and its version is the recipe's revision. Any other pin names model@version, which is how a System One seat is pinned. A pin that names no model id never matches a binding, so a bound role refuses it.
  • Read errors fail the call. A manifest read error comes back from decide as an error, as any provider error does. It is not turned into an abstain.
  • An abstain has no cost of its own. The abstain is the ladder's plain abstained() answer, the same one Local-vision gives on a call with no image.

No verb is added or changed.

Tests

crates/oneiron/tests/decision_role_binding.rs (5). Each test uses a real tempdir device vault, and its manifest is pinned with a passing teacher-probe approval (the G134 pattern):

  • manifest_binding_to_another_model_skips_the_head: the head makes 0 calls, the house read answers, and the receipt is [head, house].
  • manifest_binding_to_the_same_model_uses_the_head
  • unbound_role_keeps_the_host_rung
  • band_bound_elsewhere_steps_on_to_the_bound_house_read: the band abstains unspent, and the escalation binding names the house read's whole model id.
  • a_role_holds_only_the_rung_it_fills

Red on #7711's head: the file does not compile, because ManifestBoundRung does not exist.
RUSTFLAGS="--cfg oneiron_test_support" cargo test --locked -p oneiron --all-features --test decision_role_binding

Files

  • crates/oneiron/src/llm/decision/role_bound.rs (new)
  • crates/oneiron/src/llm/decision/mod.rs
  • crates/oneiron/src/llm/decision/ladder/mod.rs
  • crates/oneiron/src/llm/manifest.rs
  • crates/oneiron-server/src/decision_host/mod.rs
  • crates/oneiron/tests/decision_role_binding.rs (new)

Docs

The Docs lane rewords cross/models.md line 46 ("Ruled, not built") to name the rung map and this binding rule.

crates/oneiron/tests/decision_role_binding.rs (5): a head whose model the
manifest's decision_head binding does not name abstains before any call and
the house read answers; a matching binding and an unbound role keep the
host's rung; a band bound elsewhere steps on to the house read the
escalation binding names (its pin names a whole model id); each role holds
only the rung it fills.
…at model

Ruling L9-27-ROLEBIND = A. ManifestBoundRung (llm/decision/role_bound.rs)
wraps the rung a decision role fills: decision_head the System One rung,
decision_band the Precision rung, decision_escalation the Escalation rung.
When the vault's manifest binds the role, at the slot's effective route, to
a model other than the one the rung's pin names, the rung abstains before
any call and the ladder steps on; the receipt's pins name it. A role the
manifest leaves unbound, or a vault with no manifest, keeps the host's rung.

Vault::bound_model_for_role reads the binding (shared route rule with
price_model_for_role_in_txn). The decision host wraps its System One,
precision and house-read rungs.
@greptile-apps

greptile-apps Bot commented Nov 13, 2026

Copy link
Copy Markdown

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

@olety
olety added this pull request to stack #7733 November 13, 2026 21:06
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 11 billable files and costs up to $2.75.

  • 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 58 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 151 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 9566bae and 9dc1628.

Files selected for processing: 11

  • crates/oneiron-server/src/decision_host/adapters.rs
  • crates/oneiron-server/src/decision_host/mod.rs
  • crates/oneiron/src/dreamer_consolidation/call_labels/decision_rungs.rs
  • crates/oneiron/src/llm/autocheck/verdict_cache.rs
  • crates/oneiron/src/llm/decision/ladder/mod.rs
  • crates/oneiron/src/llm/decision/ladder/providers.rs
  • crates/oneiron/src/llm/decision/ladder/runner.rs
  • crates/oneiron/src/llm/decision/mod.rs
  • crates/oneiron/src/llm/decision/role_bound.rs
  • crates/oneiron/src/llm/manifest.rs
  • crates/oneiron/tests/decision_role_binding.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

olety added a commit that referenced this pull request Nov 16, 2026
Move only. The helper sat in the gap before fn pin, where #7732 adds role_bound, so the
two PRs conflicted on a line add.
…inding

ManifestBoundRung forwards main's new DecisionProvider::runs_on_device to
the rung it wraps, as it forwards leaves_host: without it the trait's
default (false) would drop a role-bound on-device rung from a check
whose world stays on this device.
…inding

llm/manifest.rs: main (#8977) moved the resident routes to setting keys,
so read_routes takes the vault and the manifest. role_model and
bound_model_for_role keep this branch's model_at_effective_route helper
and call read_routes(self, txn, &manifest).
…inding

Clean merge; ManifestBoundRung still forwards every DecisionProvider
method (main left the trait unchanged).
…-role-binding

Clean. ManifestBoundRung still forwards every DecisionProvider method of
main's trait; main's manifest.rs changes (SubmittedRead imports, its test
module ungated) touch nothing this branch re-signed.
…ict (#7732 review round 2)

A remote seat serving the bound model is held under an on-device pin; a
held rung keeps its pin on the receipt with no image pinned to it; a
manifest change that holds the head misses the auto check's verdict cache.
…ng, and its hold keys the verdict cache (#7732 review round 2)

- role_bound.rs: the binding's model and effective route are read in one
  snapshot (Vault::bound_model_for_role); a rung whose calls may take a
  wider route than that (leaves_host: third party; else runs_on_device:
  on device; else own server) is held, as a rung on another model is.
- DecisionProvider::held: the ladder asks it before each read and sends a
  held rung nothing; its pin stays on the receipt and no image is pinned
  to it (runner.rs read). Pass-through wrappers forward it.
- verdict_cache.rs: the policy key names each rung's hold, and a verdict
  whose key changed while the ladder ran is not kept.
olety added a commit that referenced this pull request Nov 20, 2026

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