Repository navigation
docs(OMN-14587): fan out canon-shape ratchet baseline to omnibase_infra - #2300
Conversation
📝 WalkthroughWalkthroughAdds a frozen non-canonical handler-shape baseline and a lint CI gate that runs the canonical handler-shape classifier against ChangesHandler-shape ratchet
Estimated code review effort: 3 (Moderate) | ~15–30 minutes Sequence Diagram(s)sequenceDiagram
participant GitHubActionsLint
participant CanonicalHandlerShape
participant OmnibaseInfraSrc
participant HandlerShapeBaseline
GitHubActionsLint->>CanonicalHandlerShape: run full classification for omnibase_infra
CanonicalHandlerShape->>OmnibaseInfraSrc: inspect handler-shape nodes
CanonicalHandlerShape->>HandlerShapeBaseline: compare against NON_CANONICAL
HandlerShapeBaseline-->>GitHubActionsLint: provide frozen baseline
CanonicalHandlerShape-->>GitHubActionsLint: pass or fail on new nodes or baseline growth
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Generate omnibase_infra's committed canonical_handler_shape_baseline.py by running omnibase_core's classifier (OMN-14355/14368) against this repo's node tree via the existing --package/--src-root/--baseline fan-out flags. Mirrors the omnimarket baseline (OMN-14368) — no code changes, measurement only. 115 nodes scanned, 22 canonical, 93 non-canonical (baseline freezes the 93). CI-gate wiring (mirroring omnimarket's OMN-14372) is a follow-on, not included here.
…ra CI gate Follow-on to the baseline-only commit above (9f13cd6): adds the deferred CI-gate wiring step, mirroring the omnimarket pattern (OMN-14372/#1751) exactly. Adds a "Canonical handler-shape ratchet" step to the existing `lint` job (a required `needs:` dependency of the required "CI Summary" check via the ci-summary job's needs list), invoked via the sibling omnibase_core checkout already cloned in this job for Transport-mock lint (.ci/omnibase_core, OMN-13026) since the classifier lives at omnibase_core's repo-root scripts/ci/, not the installed package. Runs --full (not the default --scope changed) for the same cwd-mismatch reason documented in #1751: the classifier's diff-scoped git-diff assumes cwd = its own repo, wrong for a fan-out invocation against a sibling checkout. --full is cheap here (~115 nodes, sub-second). No pre-commit mirror: same infeasibility already verified empirically for the omnimarket fan-out (OMN-14563, via `pre-commit try-repo` — language:python resolves the wrong cwd, language:script has no dependency isolation). CI-only enforcement matches the omnimarket precedent and several other gates already in this job list. dod_evidence (OMN-14587): - RED (full scan, throwaway node_zzz_canary_throwaway with a raw-dict handle(data: dict)): hard-fails "NEW non-canonical node(s)" — exit 1. - Baselined 93 non-canonical nodes stay WARN (non-blocking), not RED, throughout — shrink-only ratchet confirmed. - GREEN (full scan, throwaway removed): new=0 unproven_flips=0 warn=93 — exit 0. Closes the "[ ] Wire it as an enforced CI gate" deliverable in OMN-14587. OCC companion owed to Codex (agents do not author OCC companions). Test plan: - [x] pre-commit run --files .github/workflows/ci.yml — all applicable hooks pass - [x] YAML parses (python3 -c "import yaml; yaml.safe_load(...)") - [x] Local RED/GREEN proof above, reproduced against the committed baseline (scripts/ci/canonical_handler_shape_baseline.py) - [ ] gh pr checks green on CI (watching; occ-preflight expected red pending OCC companion, same as before this commit)
Rebases onto current origin/dev, which picked up OMN-14589's merged canonicalization of node_coding_agent_invoke_effect (feat(OMN-14589): canonicalize node_coding_agent_invoke_effect to def-B, a638cf7) — that node flipped canonical shape in dev AFTER this PR's baseline was generated, so the ratchet correctly read it as an unproven flip (no adequacy receipt) rather than a stale-baseline mismatch. Regenerates via the same command used to originally generate this baseline (`--update --full`); the diff is exactly the removal of `omnibase_infra.nodes.node_coding_agent_invoke_effect` from NON_CANONICAL (93 -> 92) — nothing else changed, confirming this is pure branch staleness, not a real regression. The other 5 rebased-past commits (OMN-14594/14580/14597/14517/14605) touch no node contract or handler files. dod_evidence: - Reproduced the CI failure locally pre-regen: "Baselined node(s) flipped to canonical shape WITHOUT an adequacy receipt" for exactly node_coding_agent_invoke_effect, new=0, matching the live Lint job failure on this PR. - Post-regen: new=0 unproven_flips=0 warn=92, exit 0. - Re-ran the throwaway RED/GREEN proof (node_zzz_canary_throwaway, raw dict handle()) against the regenerated baseline: RED (exit 1, "NEW non-canonical node(s)") -> removed -> GREEN (exit 0, new=0 warn=92). - pre-commit run --files scripts/ci/canonical_handler_shape_baseline.py clean. OCC companion for this PR's new head is owed to Codex (retargets the existing companion after this rebase); not authored here.
daeba34 to
d37ebb6
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)
263-268: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winPin the classifier checkout for reproducible enforcement.
This step executes code from the
.ci/omnibase_corecheckout, which usesref: devin the surrounding workflow. A moving branch can change classifier semantics without any change to this PR. Pin the checkout to an immutable commit and regenerate the baseline against that exact revision.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/ci.yml around lines 263 - 268, Pin the `.ci/omnibase_core` checkout used by the “Canonical handler-shape ratchet” step to an immutable commit instead of the moving `dev` ref, then regenerate `canonical_handler_shape_baseline.py` using that exact checkout revision so enforcement remains reproducible.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 243-249: Update the CI comment describing the canonical
handler-shape baseline to report the final baseline count of 92 non-canonical
handlers instead of 93, while preserving the scanned total and keeping it
synchronized with the regenerated baseline.
In `@scripts/ci/canonical_handler_shape_baseline.py`:
- Around line 13-14: Update the generator source that produces the canonical
handler shape baseline so its docstring no longer claims pre-commit enforcement;
describe the classifier as CI-only, then regenerate
scripts/ci/canonical_handler_shape_baseline.py rather than editing the generated
file directly.
---
Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 263-268: Pin the `.ci/omnibase_core` checkout used by the
“Canonical handler-shape ratchet” step to an immutable commit instead of the
moving `dev` ref, then regenerate `canonical_handler_shape_baseline.py` using
that exact checkout revision so enforcement remains reproducible.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 76a5d0df-9c6d-40f9-9f72-fb3f47a95b27
📒 Files selected for processing (2)
.github/workflows/ci.ymlscripts/ci/canonical_handler_shape_baseline.py
…e fan-out (#4136) * evidence(OMN-14587): OCC companion for omnibase_infra#2300 canon-shape fan-out Independently-authored OCC evidence companion for OmniNode-ai/omnibase_infra#2300 (OMN-14587) -- author != implementer, per feedback_no_self_authored_evidence. 3 product-observing content reads pinned to #2300 head SHA daeba34583fd4d3bc08dc738832bcf1a182fc72c, each RED-controlled against omnibase_infra dev HEAD 80c26eaa122f0bdc025be2f179c8991a5d8c0d86: - "Canonical handler-shape ratchet (OMN-14355 fan-out, OMN-14587)" CI step wired into the lint job - canonical_handler_shape_baseline.py freezes exactly 93 NON_CANONICAL entries, matching the PR's cited scan (115/22/93) - deploy assessment: PR diff touches no Dockerfile/compose/deploy asset Net-new-file-only: adds contracts/OMN-14587.yaml + 3 receipts under drift/dod_receipts/OMN-14587/; edits no existing file. Self-bind receipt for this companion's own occ-preflight follows in a second commit (deterministic commit_sha bind). * evidence(OMN-14587): add self-bind receipt for OCC companion self-eligibility Deterministic commit_sha bind (no PR-number prediction under concurrent lanes): binds to C1 (0e2c388) which carries the contract + 3 product-observing receipts. Contract hash stays stable across both commits (check_value greps only status: PASS). * evidence(OMN-14587): refresh infra 2300 head receipts * evidence(OMN-14587): self-bind OCC 4136 refresh
Evidence-Source: OCC#4143
Evidence-Ticket: OMN-14587
Summary
Generates and commits
scripts/ci/canonical_handler_shape_baseline.pyforomnibase_infraby running omnibase_core's canon-shape classifier(OMN-14355/14368) against this repo's node tree via the existing
--package/--src-root/--baselinefan-out flags — the exact commandOMN-14587 specifies:
Mirrors the omnimarket baseline (OMN-14368: 111 non-canonical / 350 total).
This is measurement only — no handler code changed.
Result: 115 node
contract.yamlfiles scanned, 22 canonical, 93non-canonical (baseline freezes the 93). Category breakdown:
nonadaptable45,
op_method25,empty12,envelope_in_core8,no_binding3.Note: 2 of the 115 scanned entries
(
omnibase_infra.nodes.node_architecture_validator/.node_architecture_validator.handlers, and thenode_ledger_projection_computeequivalent) are duplicate hits from a nested
handlers/contract.yamlfilesitting alongside the node's own top-level
contract.yaml— a data-qualityartifact worth a separate look, not fixed here.
Update (follow-on commit): CI-gate wiring
The original PR shipped baseline-generation only, deferring CI-gate wiring
to keep the change reviewable as pure measurement. This follow-on commit
(
daeba345) closes that deferred deliverable: adds a "Canonicalhandler-shape ratchet" step to the existing
lintjob (a requiredneeds:dependency of the required "CI Summary" check), mirroring the omnimarket
wiring (OMN-14372/#1751) exactly — same
--fullscan, same sibling-checkoutreuse pattern (
.ci/omnibase_core, already cloned for Transport-mock lint /OMN-13026), same "no pre-commit mirror yet" rationale (OMN-14563 tracks the
real fix: relocate the classifier into an installed omnibase_core module;
pre-commit try-repoempirically proved a manifest-only export doesn'twork).
Closes the "[ ] Wire it as an enforced CI gate" item in OMN-14587.
dod_evidence (CI-gate wiring, OMN-14587)
RED/GREEN proof, local, against the committed baseline
(
scripts/ci/canonical_handler_shape_baseline.py):node_zzz_canary_throwawaywith araw-dict
handle(self, data: dict) -> dict): hard-fails "NEWnon-canonical node(s)" — exit 1. The 93 baselined non-canonical nodes
stayed WARN (non-blocking), not RED, confirming the shrink-only ratchet
discriminates baselined debt from new regressions.
new=0 unproven_flips=0 warn=93— exit 0.pre-commit run --files .github/workflows/ci.yml— all applicable hookspass.
CI enforcement not yet proven live: this repo's
lintjob (and everyother job) is gated behind
occ-preflight, which fails on this PR pendingan OCC companion (Evidence-Source missing) — the same state as before this
commit. The new step has not executed in a green CI run yet. proof_class =
code-complete + locally-RED/GREEN, NOT enforcement-proven, pending the OCC
companion below.
OCC-COMPANION-NEEDED: omnibase_infra#2300 OMN-14587 (not authored here —
per 2026-07-13 operator decision, agents do not author OCC companions;
Codex owns all OCC).
Closes OMN-14587.
Test plan
scripts/ci/canonical_handler_shape.py --update --package omnibase_infra --src-root ... --baseline ... --fullrun against a freshdev-basedworktree; output confirmed 115 nodes / 22 canonical / 93 non-canonical.
trailing whitespace, etc.).
pre-commit run --files .github/workflows/ci.ymlclean.gh pr checks 2300green — blocked on occ-preflight (OCC companionowed), not on this change's own content.
Summary by CodeRabbit
Evidence-Commit: 9d39582a61ee122f9afb3e627621f15a4268851e