Skip to content

feat(OMN-14820): regenerate node_checkpoint_validate_compute to canonical def-B - #2368

Merged
jonahgabriel merged 6 commits into
devfrom
jonah/omn-14820-node_checkpoint_validate_compute-defb
Jul 20, 2026
Merged

jonahgabriel merged 6 commits into
devfrom
jonah/omn-14820-node_checkpoint_validate_compute-defb

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Jul 20, 2026 •

Copy link
Copy Markdown
Collaborator

OMN-14820 — canonical def-B flip: node_checkpoint_validate_compute

Hand-flip of HandlerCheckpointValidate to canonical definition B under the
canonical-handler-shape ratchet epic canonical-handler-shape ratchet (hand-flip proof path hand-flip proof).
Mirrors the two merged sibling projection-compute flips OMN-14826
(node_pr_state_projection_compute) and OMN-14823 (node_ledger_projection_compute).
Burns down 1 baselined non-canonical node.

Why it was non-canonical

Pre-flip HandlerCheckpointValidate exposed only execute() / validate() operation
methods and no handle — the canonical-shape ratchet classified it op_method
(baselined in NON_CANONICAL), and it was listed in the known_entrypointless
dispatch-entrypoint baseline.

What changed (6 files)

  • handler (handler_checkpoint_validate.py): add the canonical def-B typed
    entrypoint handle(self, request: ModelCheckpointValidateInput) -> ModelHandlerOutput[...]
    (the shared runtime adapter _resolve_def_b_input_model_type recovers
    ModelCheckpointValidateInput from the signature). The pure validate() business
    logic is preserved byte-identical base_ref↔HEAD (AST-normalized, re-derived from
    git by the ratchet). The module never referenced ModelEventEnvelope (C-core clean).
    The legacy execute() envelope-dict ProtocolHandler path is retained for existing
    callers.
  • shape baseline (scripts/ci/canonical_handler_shape_baseline.py): remove the node
    from NON_CANONICAL (receipt-proven shrink-only).
  • entrypoint baseline (config/validation/handler_dispatch_entrypoint_baseline.yaml):
    remove the now-entrypointed handler (the ratchet FAILs on a stale still-listed entry).
  • proof (scripts/ci/adequacy_receipts/…json + …handflip.json): adequacy receipt +
    hand-flip proof, bound to one selected_input_hashes set.
  • test (test_checkpoint_validate_dispatch_entrypoint_omn14820.py): RED→GREEN parity
    proof over the selected corpus.

dod_evidence

Generated vs hand-flip: HAND-FLIP. This is a byte-identical
equivalence flip of an existing pure-compute handler — validate() is unchanged, so no
new RSD body was authored; the flip only adds the typed def-B entrypoint boundary.

  • verify_flip_bundle PASS (all six assertions) — omnibase_core#1472 seam gate run
    against the node:
    verify_flip_bundle OK — omnibase_infra.nodes.node_checkpoint_validate_compute: all six flip-bundle assertions hold.
    (typed-adequacy invariants, real consuming-gate verdict, full-node canonicality,
    twin-baseline shrink, receipt-minted-post-format sha, hand-flip verbatim-preservation.)
  • Canonical-shape ratchet OK — full scan reports new=0 unproven_flips=0, the node
    flipped canonical WITH a valid adequacy + hand-flip proof, no baseline growth.
  • Tests-as-proof (RED vs EXISTS-but-WRONG → GREEN): on the pre-flip tree (no handle)
    and on an EXISTS-but-WRONG handle(self, envelope: dict) the runtime resolver returns
    None and the shape test goes RED; on the flip it resolves ModelCheckpointValidateInput
    and all 18 tests pass GREEN. Equivalence: handle(request).result is asserted
    byte-equal to both the pure validate() and the legacy execute() over a deterministic
    valid-checkpoint corpus. Full node test dir: 27 passed (9 existing + 18 new). The
    entrypoint-gate coverage test still passes with the node removed from known_entrypointless.
  • Equivalence scope note: validate()'s error branches (absolute path, invalid SHA,
    phase mismatch, attempt<1) are pre-empted by ModelCheckpoint's own field/model
    validators, so a validly-constructed ModelCheckpointValidateInput — the only thing the
    canonical def-B adapter path can hand the handler — never reaches them; those branches
    stay covered by the legacy envelope-dict suite and are waived (not re-driven) in the
    adequacy receipt.

Expected transient red

occ-preflight (and the hosted deploy-gate) will be red until the OCC autobind mints
this ticket's evidence companion
on onex_change_control and adds its Evidence-Source
to this PR body — expected for a fresh flip ticket; no companion is fabricated here.

Do not arm auto-merge — Codex owns the merge queue.

Closes OMN-14820

Evidence-Ticket: OMN-14820

Summary by CodeRabbit

  • New Features

    • Added typed dispatch support for checkpoint validation requests.
    • Added canonical definition-B validation metadata and routing information.
    • Preserved validation results and correlation details across dispatch paths.
  • Bug Fixes

    • Improved checkpoint validation handling for schema-version mismatches and future timestamps.
  • Tests

    • Added comprehensive coverage for typed request handling, dispatch equivalence, and validation outcomes.

Evidence-Source: OCC#4495

…ical def-B

Hand-flip of node_checkpoint_validate_compute to canonical definition B under
the canonical-handler-shape ratchet epic. Mirrors the two merged sibling
projection-compute def-B flips (same hand-flip proof path).

- Add typed def-B entrypoint handle(request: ModelCheckpointValidateInput); the
  pure validate() business logic is preserved byte-identical base_ref<->HEAD
  (AST-normalized, git-re-derived by the ratchet). Legacy execute() envelope-dict
  path retained for existing callers.
- Remove node from NON_CANONICAL (canonical_handler_shape_baseline.py) and
  known_entrypointless (handler_dispatch_entrypoint_baseline.yaml) baselines.
- Add adequacy + hand-flip receipts under scripts/ci/adequacy_receipts/, bound to
  one selected_input_hashes set; verify_flip_bundle passes all six assertions.
- RED->GREEN parity test proves the def-B handle output equals both the pure
  validate() and the legacy execute() over a deterministic valid-checkpoint corpus.
@coderabbitai

coderabbitai Bot commented Jul 20, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The checkpoint validation node now exposes a typed def-B handle entrypoint, updates its contract metadata, verifies equivalence with existing validation paths, and records canonical-shape and adequacy results in CI artifacts.

Changes

Checkpoint validation dispatch

Layer / File(s) Summary
Typed dispatch contract and handler
src/omnibase_infra/nodes/node_checkpoint_validate_compute/contract.yaml, src/omnibase_infra/nodes/node_checkpoint_validate_compute/handlers/handler_checkpoint_validate.py
The contract declares ModelCheckpointValidateInput, and handle() delegates to validate() before returning compute output.
Dispatch shape and equivalence tests
tests/unit/nodes/test_node_checkpoint_validate_compute/test_checkpoint_validate_dispatch_entrypoint_omn14820.py
Deterministic tests verify typed def-B resolution, absence of envelope input, equivalence with validate() and execute(), and warning/result semantics.
Canonicality and adequacy records
config/validation/handler_dispatch_entrypoint_baseline.yaml, scripts/ci/canonical_handler_shape_baseline.py, scripts/ci/adequacy_receipts/*node_checkpoint_validate_compute*
Baselines remove the node from non-canonical and entrypointless sets, while receipts record parity and coverage metadata.

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

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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: regenerating node_checkpoint_validate_compute to canonical def-B.
✨ 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-14820-node_checkpoint_validate_compute-defb

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

Jonah Gray added 2 commits July 20, 2026 10:12
…heckpoint_validate_compute-defb

# Conflicts:
#	config/validation/handler_dispatch_entrypoint_baseline.yaml
@jonahgabriel
jonahgabriel merged commit 4588916 into dev Jul 20, 2026
149 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-14820-node_checkpoint_validate_compute-defb branch July 20, 2026 18:59
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