Repository navigation
feat(OMN-14825): regenerate node_model_router_compute to canonical def-B - #2360
Merged
jonahgabriel merged 3 commits intoJul 20, 2026
Merged
Conversation
Rename HandlerScoreModels.score_candidates -> handle(request) -> response (canonical definition B, OMN-14355). Pure method rename: the scoring body and every module-level scoring helper are byte-identical base_ref<->HEAD (OMN-14781 hand-flip path, mirrors canary PR #2349). No ModelEventEnvelope, no Plugin base, stateless/deterministic COMPUTE. - Repoint live caller services/routing_api/routes.py + unit/integration tests. - Shrink NON_CANONICAL + known_entrypointless twin baselines. - Adequacy receipt + hand-flip proof + legacy-vs-def-B equivalence goldens. - validation_exemptions.yaml: sync def-B handle entrypoint (matches OMN-14805). Proof: - verify_flip_bundle (OMN-14809) OK: all six assertions hold. - canonical_handler_shape ratchet --full: new=0 unproven_flips=0. - Tests-as-proof RED (13 fail on pre-flip base) -> GREEN (14 pass on flip). - ruff/mypy clean; pre-commit (commit stage) 61 passed / 0 failed. Deploy-scope DoD: this flip touches a deploy-scoped runtime handler. Per the no-self-authored-evidence rule the OCC companion for OMN-14825 is authored separately (Codex/autobind); the local pre-push mirror reports NOTICE_COMPANION_UNMERGED and the hosted deploy-gate resolves the companion. Closes OMN-14825 Evidence-Ticket: OMN-14825 Evidence-Source: OMN-14825
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (12)
💤 Files with no reviewable changes (2)
📝 WalkthroughWalkthroughThe model router’s ChangesModel router handler flip
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
5 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OMN-14825 — canonical def-B flip:
node_model_router_compute(Class-B Tier-1)Regenerates
omnibase_infra.nodes.node_model_router_compute(handlerHandlerScoreModels) to canonical definition B as part of the Class-B Tier-1canonical-shape flip fan-out under parent epic OMN-14355. This is a behaviour-
preserving equivalence flip, not a rewrite.
What changed
HandlerScoreModels.score_candidates(scoring_input) -> ModelRoutingDecisionrenamed to the canonical dispatch entrypoint
handle(scoring_input) -> ModelRoutingDecision.Pure method rename (OMN-14781 hand-flip path, mirrors canary PR feat(OMN-14805): flip node_runtime_source_attestor_effect to canonical def-B (handflip) #2349): the scoring
body and every module-level scoring helper (
_capability_match,_effective_cost_per_1k,_passes_hard_constraints,_compute_score,ScoringContext.__init__) are byte-identical base_ref↔HEAD. NoModelEventEnvelope,no
Plugin*base, stateless/deterministic COMPUTE.services/routing_api/routes.py+ the unit andintegration tests
score_candidates→handle.canonical_handler_shape_baseline.pyNON_CANONICAL and
handler_dispatch_entrypoint_baseline.yamlknown_entrypointless.validation_exemptions.yamlrecords the sync def-Bhandleentrypoint(the generic-pattern checker visits sync
ast.FunctionDefbut not async, so it flagsthis sync def-B
handle;handleis the protocol-mandated name — mirrors OMN-14805).scripts/ci/adequacy_receipts/, plus legacy-vs-def-B equivalence goldens undertests/fixtures/golden/node_model_router_compute/.dod_evidence
verify_flip_bundle(OMN-14809 seam gate) — all six assertions PASS (run againstthis flip, discovery + explicit
--node-id, exit 0):Consuming ratchet
canonical_handler_shape.py --full --package omnibase_infra(exit 0):Dispatch-entrypoint validator:
OK: 154 distinct handlers, 0 new violations(node'shandler removed from known_entrypointless,
handlepresent).Tests-as-proof RED → GREEN (drove the real handler on a broken tree then the flip):
handleentrypoint (
AttributeError).test_defb_handle_reproduces_legacy_goldensreplays 11 decisionsrecorded against the git-BASE legacy
score_candidatesthrough the live def-Bhandleand asserts byte-equality; generation-time gate confirmed
base.score_candidates == head.handlefor ALL 11 candidates.test_golden_equivalence_is_non_vacuousproves a perturbed golden isflagged (RED-vs-exists-but-wrong).
Adequacy receipt: coverage-guided selection,
branch_coverage_pct=74.13with anexplicit
uncovered_waiver(equivalence proven by git-verbatim preservation +green golden parity over the selected corpus, not a broad coverage claim); handler sha
pinned post-format;
selected_input_hashesbound to the hand-flip parity block.Gates:
ruff format/ruff checkclean;mypyclean (13 files);pre-commit run(commit stage) 61 passed / 0 failed; pre-push governed selector ran the FULL unit suite
(fail-closed test_infrastructure escalation) — 21698 passed, 0 failed.
Generated vs hand-flip
This is an EQUIVALENCE flip (pure method rename preserving byte-identical scoring
logic), so it was hand-flipped via the OMN-14781 verbatim-preservation path (canary
#2349), where the gate re-derives equivalence from git itself. The generative
RSD/
onex delegatepath is inappropriate for an equivalence flip (it rewrites ratherthan preserves the scoring math, and its equivalence-golden proof requires a genuinely
independent git author a single agent cannot honestly furnish).
OCC companion (deploy-gate / receipt-gate)
This flip touches a deploy-scoped runtime handler, so the required hosted
deploy-gate/Receipt-Gateneed the OMN-14825 OCC companion (net-new file inonex_change_control,authored separately per the no-self-authored-evidence rule — handled by Codex/autobind).
Until it lands, the local pre-push deploy-scope mirror reports
NOTICE_COMPANION_UNMERGED(exit 0) and the hosted gates remain pending. Do not merge until the OCC companion lands.
Closes OMN-14825
Evidence-Ticket: OMN-14825
Evidence-Source: OCC#4484
Summary by CodeRabbit
Changes
Bug Fixes
Tests