Repository navigation
fix(OMN-19081): delete the immutable-grain fallback list; the contract key_grain is the only source - #4688
Conversation
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.
|
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" |
There was a problem hiding this comment.
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
✅ Hostile Reviewer — REVIEWEDCritical findings: 1
Semantics (OMN-17492 — the model finds, thread resolution gates)
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) |
Summary
Ticket OMN-19081 removes the
FALLBACK_IMMUTABLE_GRAIN_PROJECTIONSconstant and its associated fallback exemption logic fromomnibase_infra. The deletion targets the four entries (HandlerProjectionSessionReplay,HandlerProjectionWorkEvents,node_projection_session_replay,node_projection_work_events) insrc/omnibase_infra/runtime/health/projection_apply_flow.py, thefallback_immutable_projectionsparameter ofevaluate_projection_apply_flow, thefallback_exempted_projectionsfield ofModelProjectionApplyFlowVerdict, the fallback note in the dimension detail, and the monitor's pass-through inservice_runtime_health_monitor.py. The change spans five files with 60 insertions and 164 deletions. The contractkey_graindeclaration (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
omnimarket0.4.178 (beforekey_grain, introduced in 0.4.181) turning both content-addressed exposures DEGRADED. The deletion trigger required a reading of the deployed dev-laneomnimarketat or above 0.4.181 from inside the runtime container. The reading on record is from 2026-09-21 on the .201 dev lane, showingomnimarket0.4.185 with 45 of 409 contracts declaringkey_grain. Theomnimarketworkspace 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
apply_flow_key_grain_unresolved(testtest_an_undeclared_grain_is_graded_and_named_not_exempted, and the seam test through the real wiring factory).test_a_declared_mutable_grain_is_graded).HandlerProjectionSessionReplayandHandlerProjectionWorkEventsread HEALTHY on a rising gauge when declared immutable (testtest_the_two_live_exemptions_pass_on_their_declaration, parametrised over both).Local Checks
tests/unit/runtime/health/test_key_grain_from_contract_omn19081.pyandtests/integration/test_key_grain_contract_seam_omn19081.py.ruff checkandformatclean.mypyon 41 source files clean.pre-commithooks passed at commit.Not covered
omnimarket's validator (omnimarket/src/omnimarket/validators/key_grain_declared.py), not in this repo and not changed here.omnimarketwithoutkey_grainwould grade the two content-addressed exposures DEGRADED, and a lane probing with--degraded-policy failwould turn red.Evidence-Ticket: OMN-19081
Evidence-Source: OCC#13244