Skip to content

fix(OMN-19081): delete the immutable-grain fallback list; the contract key_grain is the only source - #4688

Merged
jonahgabriel merged 1 commit into
devfrom
omn-19081-delete-grain-fallback
Oct 8, 2026
Merged

jonahgabriel merged 1 commit into
devfrom
omn-19081-delete-grain-fallback

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Ticket OMN-19081 removes the FALLBACK_IMMUTABLE_GRAIN_PROJECTIONS constant and its associated fallback exemption logic from omnibase_infra. The deletion targets the four entries (HandlerProjectionSessionReplay, HandlerProjectionWorkEvents, node_projection_session_replay, node_projection_work_events) in src/omnibase_infra/runtime/health/projection_apply_flow.py, the fallback_immutable_projections parameter of evaluate_projection_apply_flow, the fallback_exempted_projections field of ModelProjectionApplyFlowVerdict, the fallback note in the dimension detail, and the monitor's pass-through in service_runtime_health_monitor.py. The change spans five files with 60 insertions and 164 deletions. The contract key_grain declaration (shipped in #3943, b1981c9) is now the only source of an exemption.

Context and Trigger
The fallback existed because pre-PR proof on dogfood-101 measured omnimarket 0.4.178 (before key_grain, introduced in 0.4.181) turning both content-addressed exposures DEGRADED. The deletion trigger required a reading of the deployed dev-lane omnimarket at or above 0.4.181 from inside the runtime container. The reading on record is from 2026-09-21 on the .201 dev lane, showing omnimarket 0.4.185 with 45 of 409 contracts declaring key_grain. The omnimarket workspace is 0.4.303. No fresh container reading was taken by this lane (it ran on h202 without access to the .201 container); the 2026-09-21 reading is the one relied on.

Acceptance Mapping

  • Undeclared grain is not exempted; it is graded and named under apply_flow_key_grain_unresolved (test test_an_undeclared_grain_is_graded_and_named_not_exempted, and the seam test through the real wiring factory).
  • A declared mutable grain is graded (test test_a_declared_mutable_grain_is_graded).
  • The two live exemptions HandlerProjectionSessionReplay and HandlerProjectionWorkEvents read HEALTHY on a rising gauge when declared immutable (test test_the_two_live_exemptions_pass_on_their_declaration, parametrised over both).

Local Checks

  • 26 tests pass in tests/unit/runtime/health/test_key_grain_from_contract_omn19081.py and tests/integration/test_key_grain_contract_seam_omn19081.py.
  • 554 tests pass in a wider health/services selection.
  • ruff check and format clean.
  • mypy on 41 source files clean.
  • pre-commit hooks passed at commit.

Not covered

  • The refusal of a constant literal coordinate on a mutable grain naming exposure and field is omnimarket's validator (omnimarket/src/omnimarket/validators/key_grain_declared.py), not in this repo and not changed here.
  • No live-lane post-merge reading of the dimension was taken.
  • Risk: A deployed runtime still carrying an omnimarket without key_grain would grade the two content-addressed exposures DEGRADED, and a lane probing with --degraded-policy fail would turn red.

Evidence-Ticket: OMN-19081
Evidence-Source: OCC#13244

PR #3943 (b1981c9) introduced reading key_grain from contracts for the
projection_delta_dropped health dimension, retaining a four-entry literal
fallback, FALLBACK_IMMUTABLE_GRAIN_PROJECTIONS, for unresolved grains. This
fallback was originally required because a pre-PR proof on dogfood-101
measured omnimarket 0.4.178, which predates key_grain (introduced in
0.4.181), causing content-addressed exposures to read DEGRADED.

A read-only check on the .201 dev lane on 2026-09-21 confirmed omnimarket
0.4.185 in the runtime container, where 45 of 409 contracts declare
key_grain. The omnimarket workspace is now 0.4.303. This change, tracked
under OMN-19093, deletes the literal, the fallback_immutable_projections
parameter of evaluate_projection_apply_flow, the
fallback_exempted_projections verdict field, and the fallback note in the
dimension detail. The monitor no longer passes this parameter. The contract
declaration is now the sole source of an exemption.

Behavior updates: unresolved grains are graded and reported under
apply_flow_key_grain_unresolved, never exempted. Declared mutable grains are
graded. Declared immutable grains (HandlerProjectionSessionReplay,
HandlerProjectionWorkEvents) are excluded and read HEALTHY on a rising
gauge. Tests in test_key_grain_from_contract_omn19081.py were updated to
cover declared and undeclared cases and verify the removal of the literal
and parameter; the seam test no longer passes the fallback. 26 tests pass in
the two key-grain files. The constant-literal-coordinate refusal gate
remains in omnimarket's validator, not in this repo.
@jonahgabriel
jonahgabriel enabled auto-merge October 7, 2026 23:31
@jonahgabriel

Copy link
Copy Markdown
Collaborator Author

Lab: host=h202 lane=approved-omn19081-10072330 head=f01890d00eecd7911aebdfe3f7bb4a6d21aeac09 command="uv run pytest tests/unit/runtime/health/test_key_grain_from_contract_omn19081.py tests/integration/test_key_grain_contract_seam_omn19081.py -n 0" observed="26 passed in 2.03s"

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hostile Reviewer — adversarial findings (OMN-17492)

Models succeeded: qwen3-review, gpt-oss-review
Models failed: none
New finding threads: 0
Deduped (already posted on this PR): 0
Below quorum (one model only, reported not threaded): 10
Nit-level findings suppressed: 0

The model is the FINDER, never the gate: merge is gated only by the
deterministic Hostile Review Thread Gate, which blocks while
hostile-reviewer threads are unresolved. Resolve each thread after
addressing (or rejecting, with a reply) its finding.

Below quorum: 10 finding(s) raised by one model only (OMN-18479)

These are reported and NOT dropped, but they get no thread and do not block: a single model's finding no other model reproduced is not evidence enough to stop a merge. Read them; act on them if they are right.

  • [CRITICAL] src/omnibase_infra/runtime/health/projection_apply_flow.py (qwen3-review) — Removal of fallback exemption causes false-positive DEGRADED on pre-key_grain runtimes | The diff removes the FALLBACK_IMMUTABLE_GRAIN_PROJECTIONS constant and the fallback_immutable_projections param
  • [MAJOR] src/omnibase_infra/services/service_runtime_health_monitor.py (qwen3-review) — No migration path or version gate for the removed fallback | The diff removes the fallback mechanism entirely and references OMN-19093 as the tracking ticket for deletion, but provides no runtime vers
  • [MAJOR] tests/unit/runtime/health/test_key_grain_from_contract_omn19081.py (qwen3-review) — Test suite no longer covers the pre-key_grain runtime scenario | The removed test test_the_0_4_178_replay_reads_healthy specifically validated that a runtime predating key_grain (where grain resolves
  • [MAJOR] src/omnibase_infra/runtime/health/projection_apply_flow.py (gpt-oss-review) — Signature change of evaluate_projection_apply_flow may break callers | The function evaluate_projection_apply_flow no longer accepts the fallback_immutable_projections parameter. Existing callers outs
  • [MAJOR] src/omnibase_infra/runtime/health/projection_apply_flow.py (gpt-oss-review) — Health check regression for pre‑declaration runtimes | Removing the interim fallback list eliminates exemption for exposures whose contract does not resolve a key grain on runtimes predating the key_g
  • [MINOR] src/omnibase_infra/models/health/model_projection_apply_flow_verdict.py (qwen3-review) — Model field removal is a breaking change for any consumer of the verdict | The field fallback_exempted_projections is removed from ModelProjectionApplyFlowVerdict. Any external consumer that deseriali
  • [MINOR] src/omnibase_infra/runtime/health/projection_apply_flow.py (qwen3-review) — Docstring in projection_apply_flow.py is now internally inconsistent | The module-level docstring in projection_apply_flow.py was updated to say 'The exposure's contract declares that grain (key_grain
  • [MINOR] tests/unit/runtime/health/test_key_grain_from_contract_omn19081.py (qwen3-review) — No test verifies that the two live projections are actually declared immutable in their contracts | The new test test_the_two_live_exemptions_pass_on_their_declaration parametrizes over HandlerProject
  • [MINOR] tests/integration/test_key_grain_contract_seam_omn19081.py (gpt-oss-review) — Missing test for older runtime version scenario | The test suite no longer includes a case that verifies health behavior when the runtime's omnimarket predates the key_grain declaration, leaving the n
  • [MINOR] src/omnibase_infra/runtime/health/projection_apply_flow.py (gpt-oss-review) — Outdated docstring references to removed fallback parameter | The docstring for evaluate_projection_apply_flow still describes the fallback_immutable_projections argument, which no longer exists, caus

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

✅ Hostile Reviewer — REVIEWED

Critical findings: 1
Major findings: 4
Total findings: 10
Models succeeded: qwen3-review,gpt-oss-review
Models unavailable: none

Action required: findings were posted as review threads. Address or reject each one, then resolve its thread — the Hostile Review Thread Gate fails while hostile-reviewer threads are unresolved (OMN-17492).


Semantics (OMN-17492 — the model finds, thread resolution gates)

Surface Meaning Blocks merge?
Review threads Per-finding, posted by the reviewer No (informational)
Hostile Review Thread Gate Deterministic: unresolved hostile-reviewer threads exist Fails until resolved (not yet a required context)
degraded verdict Fewer than 2 models succeeded (infra) Fails this job with a named reason

Powered by omniintelligence.review_pairing.cli_review — multi-model adversarial review: qwen3-review (Qwen3.8-27B), gpt-oss-review (gpt-oss-120b) (OMN-8468/OMN-8524/OMN-17492)

@jonahgabriel
jonahgabriel added this pull request to the merge queue Oct 8, 2026
Merged via the queue into dev with commit 7ea9a54 Oct 8, 2026
321 of 339 checks passed
@jonahgabriel
jonahgabriel deleted the omn-19081-delete-grain-fallback branch October 8, 2026 04:13
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