Repository navigation
refactor(OMN-10171): replace validate_skill_backing_node with omnibase_core shim (SEAM-2) - #1573
Conversation
📝 WalkthroughWalkthroughThe validator file transitions from standalone implementation to a thin pre-commit/CI shim. All core logic—allowlist loading, backing-node extraction, liveness checking, scanning—now lazily delegates to ChangesValidator Shim Delegation
🎯 4 (Complex) | ⏱️ ~45 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
| Verdict | Meaning | Blocks merge? |
|---|---|---|
passed |
No critical/error findings | No |
blocked |
CRITICAL or ERROR findings found | Yes |
degraded |
All models unavailable (infra) | No (pilot) |
Powered by omniintelligence.review_pairing.cli_review — node-based adversarial review via HandlerLlmCliSubprocess (OMN-8524)
…1572, #1573 - contracts/OMN-9906.yaml + dod-001 receipt bound to omniclaude#1572 - contracts/OMN-10171.yaml + dod-001 receipt bound to omniclaude#1573 Delivery PRs: - OmniNode-ai/omniclaude#1572 - OmniNode-ai/omniclaude#1573
…1572, #1573 - contracts/OMN-9906.yaml + dod-001 receipt bound to omniclaude#1572 - contracts/OMN-10171.yaml + dod-001 receipt bound to omniclaude#1573 Delivery PRs: - OmniNode-ai/omniclaude#1572 - OmniNode-ai/omniclaude#1573
* chore(OMN-10492): add OCC contract binding omniclaude PR #1571 - contracts/OMN-10492.yaml — binds delivery PR omniclaude#1571 (replace raw Postgres probe with runtime HTTP health check in check_database_health) - drift/dod_receipts/OMN-10492/dod-001/command.yaml — receipt bound to PR #1571 Delivery PR: OmniNode-ai/omniclaude#1571 * chore(OMN-10492): add self-binding dod-occ-pr receipt for OCC#974 * chore(OMN-9906,OMN-10171): add OCC contracts binding omniclaude PRs #1572, #1573 - contracts/OMN-9906.yaml + dod-001 receipt bound to omniclaude#1572 - contracts/OMN-10171.yaml + dod-001 receipt bound to omniclaude#1573 Delivery PRs: - OmniNode-ai/omniclaude#1572 - OmniNode-ai/omniclaude#1573 * chore(OMN-9906,OMN-10171): add self-binding dod-occ-pr receipts for OCC#974 * fix(OMN-10492): make OCC evidence checks executable
…e_core shim (SEAM-2) Replaces the 450-line inline implementation with a thin shim that delegates all logic to omnibase_core.validation.validator_skill_backing_node. Public API re-exported for backward compat: load_allowlist, extract_backing_node, check_node_liveness, scan, _omnimarket_available, _resolve_omnimarket_nodes_root. NodeViolation alias preserved for validate_skill_aspiration.py. BLOCKED ON: omnibase_core PR #1069 (feat(OMN-10171)) must merge and version bump before this PR can merge. omniclaude pins omnibase-core==0.40.1; the new module omnibase_core.validation.validator_skill_backing_node is not in that version. After omnibase_core publishes, update the pin and merge this PR.
06f7d5b to
339d62b
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
plugins/onex/skills/_lib/validate_skill_backing_node.py (1)
80-88: 💤 Low valueConsider a sentinel class for clearer failure during transitional window.
If
omnibase_coreimport fails,NodeViolation = Nonecauses a crypticTypeErrorif callers doisinstance(obj, NodeViolation). While the comment at lines 76-79 documents this, a sentinel class providing a descriptive error would improve debugging during the blocked transitional period.♻️ Optional: Sentinel class for clearer error
try: from omnibase_core.validation.validator_skill_backing_node import ( # noqa: E402 SkillLivenessViolation, ) NodeViolation = SkillLivenessViolation except ImportError: - SkillLivenessViolation = None # type: ignore[assignment,misc] - NodeViolation = None # type: ignore[assignment] + class _MissingCoreViolation: + """Sentinel: omnibase_core.validation.validator_skill_backing_node not available.""" + def __init__(self, *args, **kwargs): + raise ImportError( + "SkillLivenessViolation requires omnibase_core >= 0.40.2. " + "See OMN-10171 for version bump timeline." + ) + SkillLivenessViolation = _MissingCoreViolation # type: ignore[assignment,misc] + NodeViolation = _MissingCoreViolation # type: ignore[assignment]🤖 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 `@plugins/onex/skills/_lib/validate_skill_backing_node.py` around lines 80 - 88, Import failure sets NodeViolation to None which causes TypeError on isinstance(obj, NodeViolation); replace the None fallback with a small sentinel class (e.g., _OmnibaseMissingNodeViolationSentinel) and assign both SkillLivenessViolation and NodeViolation to that sentinel in the except ImportError block so isinstance checks still work and debugging is clearer; implement the sentinel with a descriptive __repr__ / class docstring (or a _missing_package attribute) so callers produce an informative message when they inspect it.
🤖 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.
Nitpick comments:
In `@plugins/onex/skills/_lib/validate_skill_backing_node.py`:
- Around line 80-88: Import failure sets NodeViolation to None which causes
TypeError on isinstance(obj, NodeViolation); replace the None fallback with a
small sentinel class (e.g., _OmnibaseMissingNodeViolationSentinel) and assign
both SkillLivenessViolation and NodeViolation to that sentinel in the except
ImportError block so isinstance checks still work and debugging is clearer;
implement the sentinel with a descriptive __repr__ / class docstring (or a
_missing_package attribute) so callers produce an informative message when they
inspect it.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0540d974-9311-46bc-a0d0-4b71ecc82058
📒 Files selected for processing (1)
plugins/onex/skills/_lib/validate_skill_backing_node.py
Summary
plugins/onex/skills/_lib/validate_skill_backing_node.pywith a thin shim that delegates all logic toomnibase_core.validation.validator_skill_backing_nodeload_allowlist,extract_backing_node,check_node_liveness,scan,_omnimarket_available,_resolve_omnimarket_nodes_rootNodeViolation = SkillLivenessViolationalias forvalidate_skill_aspiration.pyMerge dependency (BLOCKED)
This PR must NOT merge until:
feat(OMN-10171): add skill-backing-node liveness validator) mergesomnibase-corepin in this repo'spyproject.tomlis updated to that versionUntil then, CI will show a failure on the
validate-skill-backing-nodepre-commit hook becauseomnibase_core.validation.validator_skill_backing_nodedoesn't exist in v0.40.1.After omnibase_core publishes
pyproject.toml: changeomnibase-core==0.40.1to the new versionuv syncto update the lockTest plan
validate-skill-backing-node(expected, unblocked via SKIP= during commit)uv sync && uv run pytest tests/passesEvidence-Source: OCC#1011
Evidence-Ticket: OMN-10171
Summary by CodeRabbit