Skip to content

fix(OMN-16587): delete orphaned non-canonical validation runner scripts/validate.py - #851

Merged
jonahgabriel merged 1 commit into
devfrom
jonah/omn-16587-delete-orphaned-validate-py
Aug 26, 2026
Merged

jonahgabriel merged 1 commit into
devfrom
jonah/omn-16587-delete-orphaned-validate-py

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Operator ruling: reviewed omniintelligence/scripts/validate.py and asked why it exists. Ruled "it's not a node" — delete it.

Deletes:

  • scripts/validate.py (636 lines) — pre-canonical freestanding validation runner (argparse CLI wrapping subprocess.run calls). Not a CONTRACT/NODE/HANDLER; predates the ONEX four-node architecture.
  • tests/unit/scripts/test_validate_contract_linter.py (122 lines) — added same-day by fix(OMN-16580): correct nonexistent module path in validate.py's contract linter invocation #849; confirmed via grep it imports/tests only scripts.validate.run_contract_linter, so no other coverage is lost by deleting it alongside the script.

PR #849 (merged 2026-08-26T11:13:32Z, OMN-16580) fixed a real bug in validate.py::run_contract_linter() (wrong module path). That fix is now superseded by this deletion — nothing is lost, since nothing else ever invoked the script.

Orphan verification (re-run independently this pass, all captured to files)

  • grep -rn "validate\.py" across *.yml *.yaml *.md Makefile *.toml *.cfg *.ini (repo root, excluding .git/): zero matches outside the script and its own test file.
  • .github/workflows/ (34 files): zero references to scripts/validate.py or to any of the specific validator module/CLI names it invokes.
  • Makefile: does not exist in this repo.
  • README.md / docs/: zero matches for validate.py.
  • pyproject.toml: zero matches for validate (no script/entry-point registration).

Coverage mapping — where each wrapped validator runs canonically today

validate.py function Wraps Canonical equivalent today Evidence
run_clean_root() scripts/validation/validate_clean_root.py YES — direct pre-commit hook, same script .pre-commit-config.yaml:472
run_naming() scripts/validation/validate_naming.py YES — direct pre-commit hook, same script .pre-commit-config.yaml:486
run_ruff() ruff check YES — CI lint job .github/workflows/ci.yml:314-318
run_mypy() mypy --strict YES — CI type-check job .github/workflows/ci.yml:388-390
run_contract_linter() omniintelligence.validators.contract_linter YES — direct pre-commit hook, same module .pre-commit-config.yaml:540-542
run_omnibase_validator() × 4 (union-usage,patterns,architecture,contracts) omnibase_core.validation.validator_cli NO independent canonical gate found grep of workflows + pre-commit config for validator_cli/union-usage: zero hits
run_standalone_validator() × 6 (any-type,pydantic,naming-convention,enum-governance,enum-casing,literal-duplication) omnibase_core.validation.{...} NO independent canonical gate found same grep — zero hits for any of the six module names

On the "NO" rows: not a regression from this deletion. validate.py was itself unwired (see orphan verification) — it wasn't enforcing these seven validators against omniintelligence code either, so removing it removes zero live enforcement. omnibase_core's validator ecosystem has since grown newer pre-commit gates that DO run against this repo (check-stub-implementations, no-noncanonical-lifecycle-classes, check-canonical-inference, check-url-authority, validate-no-transport-imports, node-purity, validate-validator-requirements — .pre-commit-config.yaml:275-330,711-726), none of which map 1:1 to the seven modules above by name.

Explicitly out of scope: the pre-commit contract-linter hook's own defect (its files: regex matches 0/67 live contracts — dead no-op gate) is tracked separately as OMN-16585, not touched here.

Related, not touched: epic OMN-2711 and 8 Backlog children (OMN-2201/2202/2203/2204/2205/2207/2208/2209) were opened against these exact validators; their premise (fix violations surfaced by running validate.py) becomes moot once the script is gone. Flagged in OMN-16587 for a separate disposition decision.

Test plan

  • uv run ruff check src/ tests/ — All checks passed
  • uv run ruff format --check src/ tests/ — 1563 files already formatted
  • pre-commit run --all-files — all commit-stage hooks Passed/correctly-Skipped
  • uv run pytest tests/ --collect-only -q — 6180 tests collected, zero collection errors (confirms no other file imports the deleted modules)
  • uv run pytest tests/unit/scripts/ --collect-only -q — 94 tests collected (5 remaining files in the dir, unaffected)
  • Governed pre-push hook (git push, real diff-scoped run — not --all-files): mypy (type checking) and pytest (tools/utils/runtime - full) both (no files to check) Skipped — the deleted files don't match either hook's files: pattern

OMN-16587

Evidence-Ticket: OMN-16587
Evidence-Source: OCC#7176

…ts/validate.py

Operator ruling: reviewed the script, ruled "it's not a node" - delete.

scripts/validate.py (636 lines) is a pre-canonical freestanding
validation runner (argparse CLI + subprocess wrapper) invoked by
NOTHING: zero references in .github/workflows/ (34 workflow files),
.pre-commit-config.yaml, README.md, docs/, pyproject.toml; no
Makefile exists in the repo. PR #849 (merged today, OMN-16580) fixed
a real bug in its run_contract_linter() module path purely because a
Wave-3 audit invoked it manually - that fix is now superseded by this
deletion, since nothing else calls the script.

Also deletes tests/unit/scripts/test_validate_contract_linter.py
(added by #849 same-day) - confirmed via grep it imports/tests only
scripts.validate.run_contract_linter, so no other coverage is lost.

Coverage mapping (full detail in OMN-16587):
- clean_root, naming, ruff, mypy, contract_linter: independently
  wired via .pre-commit-config.yaml (lines 472, 486, 540-542) and
  ci.yml lint/type-check jobs - unaffected by this deletion.
- union-usage/patterns/architecture/contracts (validator_cli) and
  any-type/pydantic/naming-convention/enum-governance/enum-casing/
  literal-duplication (omnibase_core standalone validators): no
  independent canonical gate currently runs these against
  omniintelligence code. Not a regression from this deletion -
  validate.py itself was never invoked by CI/pre-commit/Makefile/docs,
  so it wasn't enforcing them either.

The pre-commit contract-linter hook's own dead-regex defect is
tracked separately as OMN-16585 and is not addressed here.

OMN-16587

Evidence-Ticket: OMN-16587
@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 55 minutes.

View limit details

Limit details: You’ve used the included review currently available. Your 124 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c6a05999-dc68-4684-bcbe-02b2d77d00d3

📥 Commits

Reviewing files that changed from the base of the PR and between d16892d and e68f0f9.

📒 Files selected for processing (2)
  • scripts/validate.py
  • tests/unit/scripts/test_validate_contract_linter.py

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

@onexbot-occ-writer

Copy link
Copy Markdown
Contributor

OCC autobind did not mint a companion for this PR: no changed-file candidate could be proven RED against the merge base, and emitting a PR-existence probe instead would be non-falsifiable evidence (OMN-15247). Hand-authored evidence is required.

jonahgabriel added a commit to OmniNode-ai/onex_change_control that referenced this pull request Aug 26, 2026
… (#7176)

* evidence: OCC companion pass 1 for OmniNode-ai/omniintelligence#851

* evidence: OCC companion self-bind for #7176

* fix: yamlfmt line-wrap on OCC companion contract for OMN-16587

Pre-commit yamlfmt hook flagged the auto-generated summary: > folded
block in contracts/OMN-16587.yaml as unwrapped (single long line).
Mechanical formatting fix only, no content change.

OMN-16587

---------

Co-authored-by: node-occ-companion-effect <occ-companion-effect@omninode.ai>
Co-authored-by: jonahgabriel <jonah.gabriel@gmail.com>
@jonahgabriel
jonahgabriel merged commit b8d2194 into dev Aug 26, 2026
74 of 78 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-16587-delete-orphaned-validate-py branch August 26, 2026 12:21
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