Repository navigation
feat(OMN-20304): canonical-file-shape ratchet carries a renamed file's baseline entry - #1843
Merged
Merged
Conversation
…s baseline entry A git rename (diff -M, base..head) of a baselined non-canonical file now inherits the old path's base-baseline entry: swap or untouched baseline both pass; no rename, unbaselined source or net growth still fails. CITE-AS: RULING 2026-10-02T00:39:29Z lane=record-rename-ruling
jonahgabriel
enabled auto-merge (squash)
October 2, 2026 00:48
jonahgabriel
pushed a commit
to OmniNode-ai/onex_change_control
that referenced
this pull request
Oct 2, 2026
…12259) * evidence(OMN-20304): author OCC companion for OmniNode-ai/omnibase_core#1843 OCC companion by node_pr_lifecycle_fix_effect (OMN-13317 F1 / OMN-13990 / OMN-14285). Product PR head 39624ffac80aa86405d8f02cdbd186580a6aa25f. * evidence(OMN-20304): self-bind OCC#12259 + rebind contract_sha256 --------- Co-authored-by: omnimarket-bot <bot@omninode.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket: OMN-20304
Ruling: 2026-10-02T00:39:29Z (lane: record-rename-ruling, operator: "yes on both")
Problem
canonical_file_shapecheck()compared paths only against the head baseline. A git rename of a baselined non-canonical file producednoncanonical-fileon the new path,baseline-staleon the old entry, andbaseline-growthrefused the new path. Real case: omniclaude#2462 renamesplugins/onex/skills/_bin/lab-onboarding.shtoomninode-dev-setup.sh.Change
Renames are detected via
git diff -M base..head(default similarity). A renamed path inherits its old path's entry from the BASE baseline. Two forms pass:baseline-staledoes not fire for the old path of a detected rename. Nothing is inherited when no rename is detected, the old path is not in the base baseline, the new path is not a non-canonical code file, or the swap keeps the old entry and adds the new (growth). No bypass flag, no allowlist.Tests
7 new tests in
tests/unit/validators/test_canonical_file_shape.py:noncanonical-filenoncanonical-filebaseline-growthbaseline-growth4 of the 7 (swap, untouched, edit, extra-script) fail on the old validator. 51 pass with the change.
Checks
mypy --strictclean on the fileruffcleanpre-commitpassed with hooks onAlso
.pre-commit-config.yamladdscanonical_file_shape.pyto thevalidate-no-manual-yamlexclude list (it readsyaml.safe_loadof the target repo's pre-commit config, added in #1839; the hook flags the whole file once it is touched), with a comment.Evidence-Ticket: OMN-20304
Evidence-Source: OCC#12259
Lab: host h202, lane rename-aware-ratchet,
uv run pytest tests/unit/validators/test_canonical_file_shape.py -n 0 -q-> 51 passed (4 of the 7 new tests fail on the old validator);uv run mypy --stricton the validator -> no issues.