Skip to content

feat(OMN-14830): regenerate node_runner_fleet_health_compute to canonical def-B - #2363

Merged
jonahgabriel merged 2 commits into
devfrom
jonah/omn-14830-node_runner_fleet_health_compute-defb
Jul 20, 2026
Merged

jonahgabriel merged 2 commits into
devfrom
jonah/omn-14830-node_runner_fleet_health_compute-defb

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Jul 20, 2026 •

Copy link
Copy Markdown
Collaborator

OMN-14830 — Class-B Tier-1 def-B flip: node_runner_fleet_health_compute

Flips omnibase_infra.nodes.node_runner_fleet_health_compute
(HandlerRunnerFleetHealthEvaluate) to canonical ONEX definition B via the
sanctioned HAND-FLIP path (OMN-14781), the same template as canary #2349. Parent
epic OMN-14355 (canonical-shape ratchet-gate); shrinks the NON_CANONICAL baseline
by one (90 → 89).

Generated vs hand-flip — why HAND-FLIP is the correct proof here

This node's def-A→def-B transform is a pure signature adaptation, not a body rewrite.
The pre-flip handler was already a handle method, but with a multi-positional
signature handle(self, correlation_id: UUID, snapshot: ModelRunnerFleetSnapshot) — which
_handle_is_adaptable classifies nonadaptable (multi-positional), so the shared runtime
adapter's _make_dispatch_callback could not bind it. The flip moves it to the canonical
single typed-payload handle(self, request: ModelRunnerFleetHealthEvaluateCommand) -> ModelRunnerFleetHealthVerdict and unpacks request.correlation_id / request.snapshot.
The three business-logic helpers (_classify_runner / _annotate_indeterminate /
_recommend_for_assessment) are byte-identical base_ref↔HEAD (AST-normalized), so this
is an EQUIVALENCE flip. The RSD/onex delegate regen-vs-legacy path was assessed and
rejected for this node: regenerating byte-identical classification logic would (a) risk
divergence for zero behavior benefit and (b) break the byte-identical-preservation that
makes the hand-flip proof non-forgeable (git-re-derived), which is exactly why OMN-14781
exists. No ModelEventEnvelope; COMPUTE stays pure/deterministic.

What changed

  • handler: handle → single request: ModelRunnerFleetHealthEvaluateCommand def-B
    signature; correlation id + snapshot unpacked from the command; classification body and
    the three helpers preserved verbatim. Dropped the now-unused UUID / ModelRunnerFleetSnapshot
    imports.
  • tests: existing unit suite (test_runner_fleet_health_compute.py) + the workflow
    integration test repointed to the def-B command form; new dispatch-entrypoint parity
    test drives the REAL _make_dispatch_callback over a 4-case corpus (RED against the
    multi-positional handler → GREEN def-B) and asserts per-case equivalence to a direct
    handle call.
  • baseline: node removed from scripts/ci/canonical_handler_shape_baseline.py
    NON_CANONICAL (shrink-only).
  • proof (scripts/ci/adequacy_receipts/): coverage-guided adequacy receipt +
    hand-flip proof, bound to one 9-input selected set.

dod_evidence

verify_flip_bundle (OMN-14809 seam gate) — ALL SIX assertions PASS

Run from the omnibase_core seam gate against this flip (PR-discovery path, exit 0):

verify_flip_bundle OK — omnibase_infra.nodes.node_runner_fleet_health_compute: all six flip-bundle assertions hold
verify_flip_bundle OK (omnibase_infra) — 1 flip bundle(s) coherent across all six assertions.

Assertions covered: (1) full ModelAdequacyReceipt invariants; (2) real
verify_flip_receipt verdict (re-derived adequacy + hand-flip verbatim-preservation +
input-set binding); (3) full-node canonicality across all bindings; (4) twin-baseline
shrink + no growth vs origin/dev; (5) ordering seam (live handler sha == recorded +
ruff-format-clean, receipt minted post-format); (6) hand-flip path (git-re-derived
verbatim preservation) — exempt from the independent-author attestation.

Tests-as-proof: RED → GREEN on a broken tree

Restoring the pre-flip (multi-positional) handler and running the new dispatch test:

E   TypeError: HandlerRunnerFleetHealthEvaluate.handle() missing 1 required positional argument: 'snapshot'
6 failed, 1 passed

That TypeError on the REAL dispatch callback IS the reachability defect the flip closes.
Post-flip, the full node suite is green:

tests/unit/nodes/node_runner_fleet_maintain/  ... 32 passed

Behavior equivalence

Each dispatch-entrypoint case asserts the dispatch-produced ModelRunnerFleetHealthVerdict
equals a direct handle(command) call (per-runner states, online_count, saturation_ratio,
recommended-action types). The three business-logic helpers are byte-identical base_ref↔HEAD
(the hand-flip proof's preserved_symbols).

Adequacy receipt (coverage-guided, real measurement)

branch_coverage_pct = 80.67  meets_target = True  selected = 9 / 17 candidates

Recorded via scripts/ci/adequacy_receipt.py::build_receipt over a 17-command candidate
pool covering every classification branch; greedy selection kept the minimal 9-input covering
subset. handler_module_sha256 pinned to the post-ruff format handler file; the hand-flip
proof's parity.selected_input_hashes are bound to the SAME 9 hashes.

Canonical-shape ratchet --full (package=omnibase_infra) — green with exactly this flip

Canonical handler-shape ratchet OK (full) — checked 115 node(s); new=0 unproven_flips=0 warn=89.
  1 node(s) flipped canonical WITH a valid adequacy + equivalence proof

Local gates

  • ruff format --check + ruff check: clean on all changed files
  • mypy src/omnibase_infra/nodes/node_runner_fleet_health_compute/: Success: no issues found in 11 source files
  • pre-commit (all changed-file hooks): Passed
  • pre-push governed impacted-test selector: 21702 passed, 36 skipped; arch-layers + mypy green
  • pre-push deploy-scope DoD mirror: NOTICE_COMPANION_UNMERGED (companion authored separately by OCC-autobind)

OCC companion (deploy-gate / receipt-gate)

This flip touches a deploy-scoped runtime handler, so the required deploy-gate and
Receipt-Gate need the OMN-14830 OCC companion (net-new file in onex_change_control,
authored separately per the no-self-authored-evidence rule and handled by OCC-autobind). Until
it lands, the hosted deploy-gate / occ-preflight / Receipt-Gate remain pending/RED — this
is EXPECTED. Do not merge until the OCC companion resolves. No skip tokens, no fabricated
companion.

Ticket: OMN-14830 (parent OMN-14355)

Summary by CodeRabbit

  • Updates

    • Fleet health evaluation now uses a standardized single-request interface.
    • Existing health classifications and verdict results remain unchanged.
    • Fleet health evaluation is now fully supported through the standard dispatch workflow.
  • Bug Fixes

    • Improved dispatch reliability by preventing mismatched handler argument formats.
  • Tests

    • Added coverage for dispatch behavior, health classifications, deterministic results, and integration workflows.

Evidence-Source: OCC#4460
Evidence-Ticket: OMN-14830
Evidence-Commit: 292292d306bb722ae2e4f2000a138519bf6be749

…ical def-B

Flip HandlerRunnerFleetHealthEvaluate to canonical ONEX definition B via the
OMN-14781 hand-flip path (Class-B Tier-1 fan-out under OMN-14355). The handler's
entrypoint moves from the multi-positional handle(self, correlation_id, snapshot)
to the single typed-payload handle(self, request: ModelRunnerFleetHealthEvaluateCommand)
-> ModelRunnerFleetHealthVerdict the shared runtime adapter binds. correlation_id
and snapshot are unpacked from the command; the three business-logic helpers
(_classify_runner / _annotate_indeterminate / _recommend_for_assessment) are
byte-identical base_ref<->HEAD. No ModelEventEnvelope; COMPUTE stays pure.

- shrink scripts/ci/canonical_handler_shape_baseline.py NON_CANONICAL (drop this node)
- repoint the unit suite to handle(command); add a dispatch-entrypoint parity test
  driving the REAL _make_dispatch_callback (RED multi-positional -> GREEN def-B)
- adequacy receipt (coverage-guided, 80.67% branch coverage, meets_target) +
  hand-flip proof bound to one 9-input selected set

verify_flip_bundle (OMN-14809 seam gate) PASSES all six assertions.

Ticket: OMN-14830 (parent OMN-14355)

Evidence-Ticket: OMN-14830
Evidence-Source: OMN-14830
@coderabbitai

coderabbitai Bot commented Jul 20, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The fleet health evaluation handler now accepts a typed command payload. Existing tests and workflows pass that command through direct and dispatch-based paths, while new adequacy receipts and the canonical baseline record the handler’s canonical shape and parity.

Changes

Fleet health handler contract

Layer / File(s) Summary
Typed handler contract
src/omnibase_infra/nodes/node_runner_fleet_health_compute/handlers/handler_runner_fleet_health_evaluate.py
handle now accepts ModelRunnerFleetHealthEvaluateCommand and extracts its correlation ID and snapshot.
Evaluation caller migration
tests/unit/nodes/node_runner_fleet_maintain/test_runner_fleet_health_compute.py, tests/unit/nodes/node_runner_fleet_maintain/test_runner_fleet_maintain_workflow_integration.py
Health classification and workflow tests now pass typed command objects to the handler.
Dispatch entrypoint validation
tests/unit/nodes/node_runner_fleet_maintain/test_runner_fleet_health_dispatch_entrypoint_omn14830.py
Tests validate the canonical signature, real dispatch results, legacy signature failure, and saturated verdict classification.
Canonical adequacy records
scripts/ci/canonical_handler_shape_baseline.py, scripts/ci/adequacy_receipts/*runner_fleet_health_compute*
The node is removed from NON_CANONICAL, and coverage and handflip parity receipts are added.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: flipping node_runner_fleet_health_compute to canonical definition B for OMN-14830.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonah/omn-14830-node_runner_fleet_health_compute-defb

Comment @coderabbitai help to get the list of available commands.

jonahgabriel added a commit to OmniNode-ai/onex_change_control that referenced this pull request Jul 20, 2026
…ibase_infra#2363

Merge OCC evidence companion for OMN-14830 / omnibase_infra#2363.
@jonahgabriel
jonahgabriel merged commit 3396ab4 into dev Jul 20, 2026
134 of 148 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-14830-node_runner_fleet_health_compute-defb branch July 20, 2026 07:05
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