Skip to content

test(OMN-18626): refuse a half-applied two-repo model repoint in the one repo that can see both halves - #2630

Merged
jonahgabriel merged 1 commit into
devfrom
jonah/omn-18626-overlay-base-agreement-guard
Sep 18, 2026
Merged

jonahgabriel merged 1 commit into
devfrom
jonah/omn-18626-overlay-base-agreement-guard

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Part of OMN-18626, increment 2a. Test-only, no production code changes.

What this refuses

The delegation contract the runtime reads is rendered at container start from two halves that live in different repositories and arrive by different routes:

half owner how it reaches the container
the served id, via the lane overlay, constrained by the authorized binding table omnibase_infra a read-only bind mount of the overlay from the .201 host clone, advanced by the deploy agent's git phase
model_name in the base contract omnimarket baked into the image, swapped at the end of the build

render_bifrost_delegation_contract._merge_lane_overlay refuses when those disagree. That refusal is correct and is not touched here. The problem is that the two halves move at different moments, so they can diverge with no build at all, and the container that next starts does not route badly, it fails to start.

That is not hypothetical. omnibase_infra#3721 landed one half of a two-repo repoint on 2026-09-17 at 21:33:35Z; its twin did not. From the moment a deploy job's git phase advanced the host clone at 22:33:34Z, the dev lane was one container start away from a runtime that would not come up.

Why the test is here and could not be anywhere else

Neither repository can check this alone.

  • omnibase_infra cannot import omnimarket. That is the compat to core to spi to infra layering, and inverting it is a circular package dependency.
  • omnimarket cannot read the overlay files, because omnibase_infra does not package docker/ and those files never reach an installed distribution. I confirmed both by trying.

What omnimarket can see is both authorities: it installs omnibase_infra, so _AUTHORIZED_BINDINGS is importable, and it owns the base contract. Checking the base against the binding table is equivalent to checking it against every valid overlay, because ModelBifrostLaneBackendBinding refuses any overlay whose served_model_id differs from the table. An overlay that disagrees with this test's expectation cannot be loaded at all.

When it fires

At the omnimarket omnibase-infra floor bump, which is the moment the two halves would actually diverge inside an image. A bump that pulls in a repointed binding table without the matching base-contract change is refused here, in the repo making the bump, rather than found as a dead lane hours later.

RED first, against the live state

Reproducing tonight's actual half-applied pair — base at Qwen3.8-27B, installed binding table still at Qwen3.6-35B-A3B:

AssertionError: The delegation contract cannot be rendered from this pair, so the next
container start on any lab lane will FAIL TO START rather than route badly
(render_bifrost_delegation_contract._merge_lane_overlay).

  - local-coder: this repo's base contract says model_name='Qwen3.8-27B', the installed
    omnibase_infra binding table says served_model_id='Qwen3.6-35B-A3B'
  - local-heavy-reasoning: this repo's base contract says model_name='Qwen3.8-27B', the
    installed omnibase_infra binding table says served_model_id='Qwen3.6-35B-A3B'

This is a two-repo change landed one half at a time. Either move this repo's model_name
to match, in the same window as the omnibase_infra change, or set it to null so the
overlay is authoritative -- but null is only correct once a runtime resolver stands
behind it (OMN-18626 increment 2).

Restored, 2 passed.

The message names both values and both backends deliberately. The refusal a reader meets at 23:00 on a dead lane has to say which half is ahead, or it sends them to the wrong repo.

Positive control

test_the_comparison_is_a_real_comparison pins all four branches of the helper: an agreeing pair yields nothing, a null base defers to the overlay by design, a disagreeing pair yields exactly one finding that prints both values, and a backend only one side declares is not a disagreement. Without it, a helper that returned an empty list unconditionally would make the main test pass forever while checking nothing — which is the precise failure mode this ticket exists to remove, so it gets a control rather than a comment.

The main test also fails closed on a vacuous comparison: an empty backends list, or two sides sharing no backend id, are refusals rather than passes.

Honest limit, stated in the file itself

This is a static check over one installed pair. It cannot observe the running host, where the mounted overlay may be from a newer commit than the baked base. Closing that window needs provenance reporting at render time and is the next increment of OMN-18626. What this removes is the authoring mistake — landing one half of a two-repo change — which is how the 2026-09-17 window was opened.

dod_evidence

  • RED: the failure above, produced by reproducing the live half-applied pair, then restored
  • GREEN: uv run pytest tests/unit/delegation/ -q gives 1107 passed, 2 skipped
  • ruff format, ruff check and mypy on the new file all clean
  • The two structural findings behind the design were measured, not assumed: omnimarket is not importable from the omnibase_infra venv, and omnibase_infra declares no package data for docker/

Evidence-Source: OCC#10131
Evidence-Ticket: OMN-18626

…repo that can see both halves

The delegation contract is rendered from two halves that live in different
repositories and arrive by different routes: the served id via a read-only bind
mount of the lane overlay, advanced by the deploy agent's git phase, and the
base contract's model_name baked into the image at the end of a build. The
renderer refuses when they disagree, correctly. But because they move at
different moments they can diverge with no build at all, and the next container
start does not route badly, it fails to start.

That is not hypothetical. omnibase_infra#3721 landed one half on 2026-09-17 and
its twin did not, and from the moment a deploy job's git phase advanced the host
clone the dev lane was one container start away from a runtime that would not
come up.

Neither repo can check this alone: omnibase_infra cannot import omnimarket
without inverting the layering, and omnimarket cannot read the overlay files
because docker/ is not packaged. omnimarket can see both AUTHORITIES though, and
checking the base against the binding table is equivalent to checking it against
every valid overlay, because the binding model refuses any overlay that differs
from the table.

It fires at the omnimarket omnibase-infra floor bump, which is the moment the
two halves would actually diverge inside an image.

RED first against the live half-applied state: base at Qwen3.8-27B with the
installed table at Qwen3.6-35B-A3B fails and names both values and both
backends. Positive control pins all four branches of the comparison, including
that a null base defers to the overlay and that the message prints both sides.
@github-actions

Copy link
Copy Markdown

✅ Architectural Review — PASSED

Errors: 0
Warnings: 0

What this checks

Rule Description
ARCH-TOPIC-001 No hardcoded Kafka topic strings in handler code
ARCH-DI-001 No event_bus=None bypass
ARCH-DI-002 No direct Handler instantiation outside workflow_runner/adapters
ARCH-DI-003 No reinvented DI containers
ARCH-TOPIC-002 contract.yaml topics follow `onex.{cmd

No architectural violations found.

Static architectural lint — no model inference (OMN-14176).

@github-actions

Copy link
Copy Markdown

✅ Hostile Reviewer — PASSED

Blocking findings (critical/error): 0
Total findings: 11
Models succeeded: qwen3-review,qwen3-review-b


Gate semantics

Verdict Meaning Blocks merge?
passed >=2 models succeeded, no critical/error findings No
blocked CRITICAL or ERROR findings found Yes
degraded Fewer than 2 models succeeded (infra unavailable/timeout) Yes (OMN-15110)

Powered by omniintelligence.review_pairing.cli_review — node-based adversarial review via HandlerLlmCliSubprocess (OMN-8524)

@jonahgabriel
jonahgabriel enabled auto-merge (squash) September 17, 2026 23:38
@jonahgabriel
jonahgabriel merged commit 2b591ab into dev Sep 18, 2026
154 of 164 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-18626-overlay-base-agreement-guard branch September 18, 2026 02:37
jonahgabriel added a commit that referenced this pull request Sep 18, 2026
…point, and pin the settle budget

Two halves of OMN-18638 that the reusable-workflow pin in the previous commit
does not reach.

1. omnibase-infra floor 0.38.30 -> 0.38.31.

The OMN-18626 guard landed by #2630 compares this repo's base contract against
`_AUTHORIZED_BINDINGS`, which ships inside the INSTALLED omnibase_infra
distribution. #2627 moved this repo's `model_name` to the served `Qwen3.8-27B`;
the sibling half is 0ee5bb023 (omnibase_infra#3721) and 0.38.31 is the first
published release carrying it. At 0.38.30 the two authorities disagree, the
guard is red on every PR in this repository, and
`render_bifrost_delegation_contract._merge_lane_overlay` would refuse the
rendered contract outright -- a lab lane container start FAILS TO START rather
than routing badly. 0.38.31 declares `omnibase-core==0.47.16` and
`omnibase-spi==0.23.3`, both admitted by the floors already in this file, so the
bump cascades nothing.

2. A test that pins the lab-pass settle budget.

Before omnibase_infra `da329b6a8` (OMN-18436) the budget was not declared: it
was `job ceiling - elapsed - reserved tail`, which gave this repository about
161 seconds where omnibase_infra's own caller allowed 900. A lane that needs 512
seconds to answer its readiness endpoints then emits a FAIL receipt while
healthy, and under rule 24(b) that receipt refuses the sha for staging delivery.
`da329b6a8` moved the number into `config/lab_pass_settle_budget.yaml`, read at
`infra_ref`, which defaults to the very SHA this repository pins -- so
"equalise the budget" is exactly "pin at or after `da329b6a8`", and the previous
commit's pin does that.

The new test keeps it there. It refuses the three pins this repository has
actually run that predate the declaration, and requires the current pin to be
recorded as verified, because omnibase_infra's wheel does not package that
config and cross-repo git ancestry is not resolvable from a unit test. The
honest limit is stated in the module docstring: this is a recorded verification,
not a computed one, so the next bump re-verifies rather than inherits. A second
test refuses any caller-side input naming a budget, ceiling or timeout, since
the declaration over there is the single authority and a caller value answers to
neither of its bounds.

Verified locally: the OMN-18626 guard passes against 0.38.31 and the pin tests
pass; reverting the pin to the OMN-17057 one turns the first test red with the
measured reason.
jonahgabriel added a commit that referenced this pull request Sep 18, 2026
…2629)

* ci(OMN-18638): advance the runtime-rebuild reusable pin to 5ecdeef2

The pin selects the reusable workflow AND, through infra_ref's default of
github.job_workflow_sha, the revision of the scripts the job runs. At
43bd2754 this repository's lab-pass receipts were emitted by
lab_pass_receipt.py and check_dev_lane_staleness.py as they stood on
2026-09-16, so neither OMN-18436's declared settle budget nor OMN-18602's
three-member verify class had reached the sibling path.

The bump does not populate agent_command_id on the sibling receipt. The
OMN-18573 wiring touched omnibase_infra's own caller workflow and
lab_pass_receipt.py only; the reusable's emit step passes no
--agent-command-id at any revision. That half stays open on OMN-18638.

* chore(OMN-18638): empty commit to republish the OCC autobind mint

The autobind publisher job failed on a full runner disk earlier, so no
Evidence-Source line was ever written to this PR body. The OCC Companion Merged
Gate has been failing closed on "body has no Evidence-Source: line yet
(occ-autobind mint may still be in flight)" after its 1500s poll deadline.

A rerun replays the pinned reusable ref and does not republish the mint command;
a fresh push does. No file content changes.

* fix(OMN-18638): install the omnibase_infra half of the Qwen3.8-27B repoint, and pin the settle budget

Two halves of OMN-18638 that the reusable-workflow pin in the previous commit
does not reach.

1. omnibase-infra floor 0.38.30 -> 0.38.31.

The OMN-18626 guard landed by #2630 compares this repo's base contract against
`_AUTHORIZED_BINDINGS`, which ships inside the INSTALLED omnibase_infra
distribution. #2627 moved this repo's `model_name` to the served `Qwen3.8-27B`;
the sibling half is 0ee5bb023 (omnibase_infra#3721) and 0.38.31 is the first
published release carrying it. At 0.38.30 the two authorities disagree, the
guard is red on every PR in this repository, and
`render_bifrost_delegation_contract._merge_lane_overlay` would refuse the
rendered contract outright -- a lab lane container start FAILS TO START rather
than routing badly. 0.38.31 declares `omnibase-core==0.47.16` and
`omnibase-spi==0.23.3`, both admitted by the floors already in this file, so the
bump cascades nothing.

2. A test that pins the lab-pass settle budget.

Before omnibase_infra `da329b6a8` (OMN-18436) the budget was not declared: it
was `job ceiling - elapsed - reserved tail`, which gave this repository about
161 seconds where omnibase_infra's own caller allowed 900. A lane that needs 512
seconds to answer its readiness endpoints then emits a FAIL receipt while
healthy, and under rule 24(b) that receipt refuses the sha for staging delivery.
`da329b6a8` moved the number into `config/lab_pass_settle_budget.yaml`, read at
`infra_ref`, which defaults to the very SHA this repository pins -- so
"equalise the budget" is exactly "pin at or after `da329b6a8`", and the previous
commit's pin does that.

The new test keeps it there. It refuses the three pins this repository has
actually run that predate the declaration, and requires the current pin to be
recorded as verified, because omnibase_infra's wheel does not package that
config and cross-repo git ancestry is not resolvable from a unit test. The
honest limit is stated in the module docstring: this is a recorded verification,
not a computed one, so the next bump re-verifies rather than inherits. A second
test refuses any caller-side input naming a budget, ceiling or timeout, since
the declaration over there is the single authority and a caller value answers to
neither of its bounds.

Verified locally: the OMN-18626 guard passes against 0.38.31 and the pin tests
pass; reverting the pin to the OMN-17057 one turns the first test red with the
measured reason.
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