Repository navigation
ci(OMN-20074): contract-validation validates with omnibase_core, not onex_change_control - #388
Merged
Merged
Conversation
…onex_change_control
- .github/workflows/contract-validation.yml no longer checks out onex_change_control or calls its validate-contract composite action; the auth preflight step is removed.
- The step "Run contract validation" now validates the branch ticket's repo-local contracts/<ticket>.yaml with omnibase_core ModelTicketContract, run through `uv run --no-project --python 3.12 --with omnibase-core==${OMNIBASE_CORE_VERSION}`; OMNIBASE_CORE_VERSION is the job env value "0.47.39".
- A branch with no OMN ticket id, or no contracts/<ticket>.yaml, is skipped with a notice. Workflow name "Contract Validation" and job name "contract-validation" are unchanged.
- A new step runs tests/ci/test_contract_validation_core_validator_omn20074.py in the same uv environment.
- New file tests/ci/test_contract_validation_core_validator_omn20074.py has 15 tests; 13 failed against the old workflow.
- New file contracts/OMN-20074.yaml adds acceptance criteria AC9 and AC10, each bound to that test.
…MN-20074.yaml contracts/OMN-20074.yaml no longer carries binds_ac on its two dod_evidence items. Binding of AC9 and AC10 to the test is by the falsifier in each criterion and the matching dod_evidence check_value, the shape the other omnidash contracts use. The ONEX Schema Compatibility Check job on origin/dev still validates contracts/ with onex_change_control validate-yaml, which rejects binds_ac as extra_forbidden (read on a lab host at onex_change_control a89a6f30). With binds_ac removed, that validator at the job's pin 3c8fa62f accepts the contract and omnibase_core 0.47.39 ModelTicketContract accepts it.
jonahgabriel
pushed a commit
to OmniNode-ai/onex_change_control
that referenced
this pull request
Oct 11, 2026
* evidence(OMN-20074): author OCC companion for OmniNode-ai/omnidash#388 OCC companion by node_pr_lifecycle_fix_effect (OMN-13317 F1 / OMN-13990 / OMN-14285). Product PR head fd58b2018e8fa1a7cc157aa3c78d237b036e6298. * evidence(OMN-18921): mint the owed OCC self-bind for PR #13660 --------- Co-authored-by: omnimarket-bot <bot@omninode.ai> Co-authored-by: onexbot-occ-writer[bot] <onexbot-occ-writer[bot]@users.noreply.github.com>
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.
Lab: host=h200 lane=occ-ret-dash-cv-e5-5d21 head=9f7e1baa415b23fd0ce1046727bc2ffbc3188cb8 command=
onex_lab_run.py --via bus --repo omnidash --ref omn-20074-dash-contract-validation-core -- bash -c <script>(work unit lw-da3e09302b534da2, exit 0). The workflow step's own run block, extracted from contract-validation.yml and run with real uv (omnibase-core==0.47.39 from PyPI): (1) each of the 4 contracts/OMN-*.yaml of the branch (OMN-12822, OMN-12833, OMN-13007, OMN-20074) passes, rc=0 each; the whole step with BRANCH=omn-20074-dash-contract-validation-core: rc=0, validation-status=passed. (2) planted clean contract: rc=0, passed. (3) positive control, planted binds_acAC1 trailing text: rc=1,::error file=contracts/OMN-2.yaml...DOD_EVIDENCE_BINDS_AC_LABEL. (4) positive control, plantedcommand_exit_0binds_ac item: rc=1,::error file=contracts/OMN-3.yaml...DOD_EVIDENCE_BINDS_AC_CHECK_TYPE. (5) positive control, malformed contract (no title): rc=1,::error file=contracts/OMN-4.yaml...title Field required. (6) branchesdependabot/bump-xandOMN-999-none: rc=0, validation-status=skipped. The OCC action's validator (onex_change_control a89a6f30,validate-yamlas action.yml:172) on the same inputs: the 4 branch contracts rc=0 (OMN-20074.yaml carries no binds_ac); the 4 planted contracts rc=1 each, including the clean one (dod_evidence.0.binds_ac: Extra inputs are not permitted [extra_forbidden]) and the malformed one (title: Field required). The new test in the workflow's own environment: 15 passed. Earlier run on h201 at c5dbe00 (work unit lw-db591d8954c140e2, exit 0), where contracts/OMN-20074.yaml still carried binds_ac, showed the OCC validator rejecting it with extra_forbidden; binds_ac was removed in 9f7e1ba. The OCC validator at the ONEX Schema Compatibility Check job's pin 3c8fa62f accepts the head's contracts/OMN-20074.yaml (rc=0, run on h201).Summary
Ticket OMN-20074 (OCC retirement, epic OMN-20068). This is the twin of omnibase_spi#362, using the same step body with the changes noted below. The workflow
.github/workflows/contract-validation.ymlpreviously performed an auth preflight againstOmniNode-ai/onex_change_control, checked outonex_change_controlat3c8fa62fforcontracts/, and called the composite actionOmniNode-ai/onex_change_control/.github/actions/validate-contract@a89a6f30withcontracts-pathset toonex_change_control/contracts. After this change, there is noonex_change_controlreference anywhere in the file. The step "Run contract validation" now resolves the ticket id from the branch name, findscontracts/<TICKET>.yaml(upper or lower case), and validates it withomnibase_coreModelTicketContract.from_yamlviauv run --no-project --python 3.12 --with "omnibase-core==${OMNIBASE_CORE_VERSION}". The job envOMNIBASE_CORE_VERSIONis "0.47.39" (an exact version, from PyPI; no git source, no range). The fetch of the model is retried 3 times before the contract is read.What the old action checked and the new step checks
The old action checked:
action.yml:54-59checks out its validators at the floating refmain(the new step pins an exact version).action.yml:129-145resolves the contract from thecontracts-pathinput, which omnidash set toonex_change_control/contracts, so the old gate read the contract hosted inonex_change_control(the new step reads only the repo-localcontracts/<TICKET>.yaml).src/onex_change_control/scripts/validate_yaml.py:64-105detects aday_closefile and validates it withModelDayClose(the new step validates ticket contracts only).validate_yaml.py:260-266emits a best-effort governance event (not a check).The new step checks:
omnibase_core0.47.39src/omnibase_core/models/ticket/model_ticket_contract.py:348-385(_validate_binds_ac_items) refuses abinds_acentry that is not an acceptance-criterion label (ruleDOD_EVIDENCE_BINDS_AC_LABEL,model_contract_dod_item.py:58) and abinds_acitem whose check type iscommand_exit_0(ruleDOD_EVIDENCE_BINDS_AC_CHECK_TYPE,model_contract_dod_item.py:59, allowed types at:62-73).onex_change_controlmodel ata89a6f30has nobinds_acfield, so itsvalidate-yamlrejects anybinds_acasextra_forbidden; on the lab it rejected even a clean planted contract that carriesbinds_ac.Behaviour change to read before approving
Before, for a branch whose ticket has a contract in
onex_change_control/contracts, the job validated that OCC-hosted contract and failed on a malformed one. Now onlycontracts/<TICKET>.yamlin omnidash is read; a ticket with a contract only inonex_change_controlis skipped, so a malformed OCC-hosted contract is no longer refused by this job. This is the same loosening omnibase_spi#362 made; nothing further is loosened. omnidash has 4 contracts at this head (3 on dev pluscontracts/OMN-20074.yaml). The job ONEX Schema Compatibility Check (not changed here; omnidash#386 moves it toomnibase_core) still validates every file incontracts/withonex_change_control'svalidate-yaml.Skip semantics, same as omnibase_spi#362: a branch name with no
OMN-<digits>id is skipped with a notice; a branch whose ticket has nocontracts/<TICKET>.yamlin this repository is skipped with a notice; a contract that fails the model fails the job.Unchanged: workflow name "Contract Validation", job id and name "contract-validation", triggers,
runs-onselector, themerge_groupskip, and therequired-checks.yamlrow forcontract-validation(REQUIRED,skip_semanticsnever; its rationale says it is a live required status check on omnidash dev).Pin discipline: omnidash has no Dep Provenance workflow and no
pyproject.tomloruv.lock. The gate that exists in omnibase_spi (.github/workflows/dep-provenance-gate.yml, OMN-13873) refuses git/rev/branch/tag source overrides ofomnibase-core,omnibase-spiandomnibase-compatinpyproject.toml[tool.uv.sources]. This change adds no such override, no allowlist and no exception. Theomnibase_coreversion is not bumped automatically: the pin-bump bot editscheck-handshake.ymlandtype-sync-check.yml, not this file.Tests and contract
A new step "Test the contract validation step" runs
tests/ci/test_contract_validation_core_validator_omn20074.pyinside the same uv environment, because that test needsomnibase_coreand the repository's bare-environment pytest jobs do not install it.New file
tests/ci/test_contract_validation_core_validator_omn20074.py: 15 tests, written first; 13 of 15 failed against the unchanged workflow (the 2 that passed assert the unchanged names and the required-checks row). It asserts: noonex_change_controlorvalidate-yamlin the file; names unchanged; the required-checks row unchanged; one exactomnibase_coreversion, at least 0.47.39, used by both steps; the step's own run block (uv replaced by a shim that runs the test interpreter) passes the repo contracts and the branch ticket contract, passes a clean planted contract, fails a plantedbinds_acentry that is not a criterion label, a plantedcommand_exit_0binds_acitem, a contract missing a required field and an unparseable contract (each naming the file and the reason), validates only the branch ticket's contract, and skips a branch with no ticket or no contract.New file
contracts/OMN-20074.yamladds criteria AC9 and AC10 withdod_evidencechecksdod-contract-validation-core-ac9anddod-contract-validation-core-ac10, each running that test. AC ids 9 and 10 were chosen to match omnibase_spi#362 and to avoid AC1 and AC2, which the unmerged branchjonah/omn-20074-omnidash-s6-cutover-prepuses in its owncontracts/OMN-20074.yaml; if that branch lands first the two files conflict as an add/add and resolve as a union of requirements. The contract carries nobinds_ac, matching the other omnidash contracts, because the ONEX Schema Compatibility Check job on dev still validates with a validator that rejectsbinds_ac.No open omnidash pull request edits
contract-validation.yml(checked for #386, #372, #350, #352, #356, #373, #383, #384 by changed-file list).Evidence-Ticket: OMN-20074
Evidence-Source: OCC#13660