Repository navigation
test(OMN-19980): a CI guard holds savings to one definition in SQL - #3373
Merged
Merged
Conversation
Savings is defined once, in node_metering_summary_compute. Nothing stopped a
second definition from coming back: five applied migrations still spell
'claude-opus-4.1' AS baseline_model, and a later migration could reintroduce a
hard-coded baseline or multiply tokens by a price in SQL without any check
noticing. The live views are already clean (090, 089 and 093 replaced them), so
the guard has to prove that, not assume it.
tests/test_single_savings_definition.py fails on: a string literal feeding a
baseline_model column; the last migration defining any of the three savings
views carrying one; claude-opus-4.1 anywhere under src/ outside the five frozen
history migrations (and a frozen entry that no longer holds it, so the list can
only shrink); SQL, in .sql, Python strings and YAML, that multiplies a token
column by a price outside node_metering_summary_compute; and ci.yml not running
the guard as a named blocking step. That last assertion is what makes the bound
evidence check fail at the merge base for a real reason.
Python price arithmetic is outside the ticket's SQL scope and is asserted as a
known gap, not scanned. 077 holds a placeholder baseline ('cloud-baseline')
that the guard found on the real tree; it is frozen as history, superseded by
089.
contracts/OMN-19980.yaml binds AC1 to the guard.
Onex-Lane: omn19980-single-savings-guard
Onex-Session: d99c149d-35af-4f1e-b791-28a28187bfc4
✅ Architectural Review — PASSEDErrors: 0 What this checks
No architectural violations found. Static architectural lint — no model inference (OMN-14176). |
✅ Hostile Reviewer — PASSEDBlocking findings (critical/error): 0 Gate semantics
Powered by omniintelligence.review_pairing.cli_review — node-based adversarial review via HandlerLlmCliSubprocess (OMN-8524) |
onexbot-occ-writer Bot
added a commit
to OmniNode-ai/onex_change_control
that referenced
this pull request
Oct 4, 2026
…nimarket#3373 The declared checks were executed for real in the OmniNode-ai/omnimarket checkout at the PR head by the product-repo OCC receipt runner, and the results written append-only into this companion. Producer-minted PENDING receipts are superseded by a net-new record; no existing receipt was edited. Ticket: OMN-16859 (AC3b) Onex-Workflow: OCC Receipt Runner Onex-Run: https://github.com/OmniNode-ai/omnimarket/actions/runs/37203776312
jonahgabriel
pushed a commit
to OmniNode-ai/onex_change_control
that referenced
this pull request
Oct 4, 2026
) * evidence(OMN-19980): author OCC companion for OmniNode-ai/omnimarket#3373 OCC companion by node_pr_lifecycle_fix_effect (OMN-13317 F1 / OMN-13990 / OMN-14285). Product PR head a519dbc26d0f733d2b72ae15a4039e22234ce677. * evidence(OMN-19980): self-bind OCC#12795 + rebind contract_sha256 * evidence(OMN-16859): executed test_passes receipts for OmniNode-ai/omnimarket#3373 The declared checks were executed for real in the OmniNode-ai/omnimarket checkout at the PR head by the product-repo OCC receipt runner, and the results written append-only into this companion. Producer-minted PENDING receipts are superseded by a net-new record; no existing receipt was edited. Ticket: OMN-16859 (AC3b) Onex-Workflow: OCC Receipt Runner Onex-Run: https://github.com/OmniNode-ai/omnimarket/actions/runs/37203776312 --------- Co-authored-by: omnimarket-bot <bot@omninode.ai> Co-authored-by: onexbot-occ-writer[bot] <307849072+onexbot-occ-writer[bot]@users.noreply.github.com>
…e to control repo-evidence / dod-verify (jobs 111440630371, 111441105546) refused the PR with "zero bound checks": the contract's only item was a `command` check with no binds_ac, so the gate had nothing to re-run at the merge base. The item is now a test_passes check of the same command, bound to AC1, and the contract states AC1 in the ticket's own words; AC2 is page work in omnidash and is not claimed. The binding fails at the merge base for a real reason, not a missing file: with 8ee3d61's ci.yml and this branch's test laid over it, the guard's own test_ci_runs_this_guard_as_a_named_blocking_step fails (1 failed, 65 passed); at the head all 66 pass. Onex-Lane: ci-fix-OMN-19980 Onex-Session: d99c149d-35af-4f1e-b791-28a28187bfc4
The branch was 21 commits behind dev. Bringing dev in as a signed merge, since the branch is already pushed and must not be rewritten, so CI and the guard run against current dev. No conflicts; the branch's own three files are unchanged.
Contributor
Author
|
Close-out: OMN-19980 AC1 landed from reviewed head Thank you! |
2 tasks done
jonahgabriel
added a commit
that referenced
this pull request
Oct 5, 2026
Merge of dev (#3373) added 8 lines to .github/workflows/ci.yml at line 488, shifting every ci.yml row at or after line 488 by 8. This caused test_every_workflow_action_ref_resolves_to_its_pre_burndown_commit to fail in Tests (Split 2/20). Shifted the affected golden rows in tests/ci/fixtures/omn20558_workflow_action_refs.json by +8. Local run: 6 passed.
jonahgabriel
added a commit
that referenced
this pull request
Oct 5, 2026
* refactor(OMN-20604): move lane-liveness models to shared package Moved lane-liveness wire models from node_lane_liveness_compute to omnimarket.models.liveness. The old module path is now a re-export, keeping contract.yaml unchanged. The handler now imports from the shared package. This satisfies the rule that one node must not import another node's models. * fix(OMN-20604): bind the shared-models refactor to its own evidence item The repo-evidence gate refused omnimarket#3431 because every bound check in contracts/OMN-20604.yaml was carried unchanged from the merge base. Add AC4 and dod-omn20604-ac4-liveness-shared-models, bound to tests/unit/test_liveness_shared_models.py, which exists only at the head so its base control fails. Onex-Lane: jobs-briefs-9143 Onex-Session: 4f0bf5fdf94549c3bcbbb606e65385f3 * fix(OMN-20604): shift golden ci.yml rows by +8 for dev merge Merge of dev (#3373) added 8 lines to .github/workflows/ci.yml at line 488, shifting every ci.yml row at or after line 488 by 8. This caused test_every_workflow_action_ref_resolves_to_its_pre_burndown_commit to fail in Tests (Split 2/20). Shifted the affected golden rows in tests/ci/fixtures/omn20558_workflow_action_refs.json by +8. Local run: 6 passed.
This was referenced Oct 6, 2026
Merged
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.
Update 2026-10-05 08:20Z (head
17a6f93ad)17a6f93ad(wasa519dbc26), pushed. Commits since the body was written:b8ee0bb7e(binds AC1 to the guard test so dod-verify has evidence) and17a6f93ad(a merge of devcce192a59). The "head has not been pushed" line below is out of date.pyproject.tomlat this head reads version 0.4.299; dev reads 0.4.301.a519dbc26and is not re-recorded at17a6f93ad.Summary
Adds
tests/test_single_savings_definition.py, a CI guard that keeps savings defined once, innode_metering_summary_compute, and wires it intoci.ymlas a named step. It is the guard half of OMN-19980 AC1. Nothing in the runtime changes: the live savings views were already rid of the hard-coded baseline by 089, 090 and 093 (OMN-19969), so the guard proves that and stops it coming back.What changed
tests/test_single_savings_definition.py(new, 66 tests, imports nothing fromsrc). Five rules:baseline_modelcolumn fails ('claude-opus-4.1' AS baseline_model,COALESCE(x, 'claude-opus-4.1') AS baseline_model, any case, CRLF and tabs). Comments and strings are ignored.projection_delegation_savings,projection_delegation_savings_seriesandprojection_cost_savings_overviewmust carry no such literal. A definition in another node folder must be clean too.claude-opus-4.1may appear undersrc/only in the five frozen history migrations (076, 078, 079, 083, 087). A sixth file fails, and a frozen file that no longer holds it fails, so the list only shrinks. This is the plan's wider wording (T3.3), added beside the AC and not replacing it.node_metering_summary_compute, in.sqlfiles, SQL strings inside Python (AST) and YAML text.ci.ymlmust run the guard as a named step, notcontinue-on-error, not conditional..github/workflows/ci.yml: one step, "Single savings definition guard (OMN-19980)", beside the other guard steps that run a single test file.contracts/OMN-19980.yaml: binds AC1 touv run pytest tests/test_single_savings_definition.py -q -p no:randomly.delegation.savings.v1,delegation.savings-series.v1andcost.savings-overview.v1innode_projection_savings/contract.yaml;projection/morning_page.pyreadsdelegation.savings.v1; omnidash local pages bind them (overview.contracts.yaml7 bindings,runs.contracts.yaml1,api-keys.contracts.yaml1). They are read, so they are not retired, and no new migration is added because nothing is left to drop.077_create_cost_savings_overview_projection_view.sqlfeedsbaseline_modelfromCOALESCE(NULLIF(model_cloud_baseline, ''), 'cloud-baseline'), a placeholder string. Superseded by 089; frozen as history in the guard.How it was verified
Base for every comparison:
origin/dev8ee3d6103. Branch heada519dbc26(signed). Run on 2026-10-04.ci.yml):uv run pytest tests/test_single_savings_definition.py -q -p no:randomlyexits 1,1 failed, 65 passed. The one failure istest_ci_runs_this_guard_as_a_named_blocking_step(noci.ymlstep at the base), not a collection error. GREEN on the branch head: exit 0,66 passed.094_planted.sqlholding'claude-opus-4.1' AS baseline_modeland095_planted_price.sqlholdingtokens_input * price_per_token): exit 1, 4 tests fail (R1 freeze, R2 last definition, R3 holders, R4 arithmetic). Unit-level planted controls cover each rule in both directions, including the false-positive population (tokens_to_compliance * 2,tokens_input * success_ratio, comments, strings,pricing_manifest_version)..sqland YAML insrc, with a planted-expression positive control.8ee3d6103:tests/unit/test_omn19969_savings_series_forward_migration.py,tests/test_omn17426_savings_aggregate_views_per_tenant.py,tests/nodes/node_metering_summary_compute,tests/nodes/node_projection_metering_summary: 46 passed, 13 skipped on both.ruff check src/ tests/ benchmarks/clean,ruff format --checkclean,mypy --strict tests/test_single_savings_definition.pyclean.contracts/OMN-19980.yamlvalidates with the pinned OCC validator ([OK] ... (ticket_contract), exit 0).ssh onex-201, nothing written, 2026-10-04 12:41Z, databaseomnidash_analytics):omnibase-infra-postgres): none of the three view definitions containsclaude-opus-4.1.projection_delegation_savings.baseline_modelvalues:claude-opus-4-6(1),claude-sonnet-4(3),claude-sonnet-5-5(2), NULL (2).omnibase-infra-lakshman-postgres):projection_delegation_savingsandprojection_cost_savings_overviewdefinitions are clean;projection_delegation_savings_seriesdefinition STILL contains the literal, because that lane's database predates 093 (its clones were weeks behind). Itsbaseline_modelvalues are NULL (1 row). The series view exposes nobaseline_modelcolumn, so no exposure names the literal on either lane. The lane needs the 093 migration applied; that is a write and is not done here.Not checked: this PR's own CI run (the head has not been pushed); the deployed series view on any lane other than the two above.
Failure paths
n/a: the guard writes no receipt, verdict or report. Its own failure paths: a scan that sees no files fails (
test_instrument_sees_the_corpus, mutation M10); an unparseable Python file insrcraises instead of being skipped; a missingci.ymlor a missing step is reported, not passed.Open defects
none in this change. Known and named: Python (not SQL) price arithmetic in
pricing.py,cost_pricing.py,handler_llm_delegation_call.py, and the ab-compare and demo cost nodes is outside this guard's SQL scope and is asserted as a known gap in the test, not scanned. SQL built from fragments at run time is not seen.Local gates
--no-verify, noSKIP=, no--no-gpg-sign, nocore.hooksPathoverride. Every pre-commit and pre-push hook ran.Commit hooks: 37 passed, 0 failed, the rest skipped for no matching files.
Overlapping open PRs
Read live 2026-10-04: 12 open PRs in this repository; none changes
.github/workflows/ci.yml,tests/test_single_savings_definition.pyorcontracts/OMN-19980.yaml(PRs 3370, 3369, 3368, 3364, 3363, 3319 and 3183 touch othercontracts/or workflow files). Overlap-Reviewed: none needed. #3368 (OMN-20007, declaresmetering-summary.v1) is related, not overlapping.Not in this change
metering-summary.v1; the T2.4 vitest page test): omnidash page work, Codex's dashboard lane, depends on OMN-20007. The guard's rules are plain functions over a root, so a page rule can be added beside them.totalSavingsUsdandfixtureSavingsUsdfromdelegation.summary.v1: deferred by decision. It needs aDROP VIEWand recreate and a contract edit, and breaks these omnidash readers first:DelegationEvidencePage.tsx:390,DelegationMetrics2D.tsx:228,DelegationMetrics3D.tsx:93,services/delegation-api.ts:35,services/event-dash-api.ts:219. No omnimarket source reads it.docker/migrations/forward/nodes/node_projection_savings/), which carry the same five files with the literal; a guard there is a separate PR.532ec1f53) and the parent OMN-19915 is context only.Evidence-Ticket: OMN-19980
Evidence-Source: OCC#12795