You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Release-process guard self-tests: 9 failures on main and not wired into any CI lane #10351
9 of 87 tests in .github/scripts/test_check_release_process_guards.py fail on current main (5a4dffa), e.g. test_global_document_lock_rejects_every_codemagic_mutation[top-level-field] and test_global_document_raw_lock_rejects_semantically_equivalent_yaml_rewrite — full list from python3 -m pytest .github/scripts/test_check_release_process_guards.py -q. The guard itself (check-release-process-guards.py) runs in repo-checks.yml and passes; its pytest self-suite runs in no CI lane (not in checks-manifest.yaml, not in any workflow), so these failures accumulate silently. Verified identical failures on a clean checkout with no local changes. Either fix the 9 tests and register the suite in .github/checks-manifest.yaml, or delete the dead tests — an unwired, failing guard test suite is worse than none.
Root cause, verified on main today (still 9 failed / 78 passed, still in no manifest entry and no workflow reference):
The suite runs a historical revision of the guard against present-day input._load_parent_guard does git show <revision>:.github/scripts/check-release-process-guards.py and executes it (test_check_release_process_guards.py:49-62). REVIEWED_PARENT = 4e391ee7 hardcodes "canonical workflow must retain exactly 21 approved script steps". The current guard expects 22, because INV-BETA-1 added Create Omi Beta variant — and omi-desktop-swift-release in today's codemagic.yaml has 22.
So the parent rejects whatever it is handed, and every assertion of the form parent.check_codemagic_release_publishers() == [] fails on an error that has nothing to do with what the test is probing. All 9 failures are that one mismatch:
E AssertionError: ['canonical workflow must retain exactly 21 approved script steps']
The synthetic fixture makes it unavoidable: _parent_bypass_workflow (line 123) builds a 2-step workflow, so any parent enforcing a step count rejects it. That is why the RAW_SCANNER_PARENT = 11ac6d9e cases pass — that revision has no step-count rule at all.
This will recur on the next approved step. Pinning a historical checker against evolving current data has no stable state; the same 9 tests broke the moment step 22 landed and will break again at 23.
The fix is a semantics decision, which is why I did not make it. Two coherent options:
Pair each historical guard with its contemporaneouscodemagic.yaml (git show <same revision>:codemagic.yaml) so the parent is judged in its own era, or
Narrow the assertions to the error class actually under test — these cases are about the publisher/bypass lock, not the step count — so an unrelated rule cannot fail them.
Option 1 preserves the "the parent accepted this bypass" claim most literally; option 2 is more robust but weakens what "== []" asserts. Either changes what a release-guard test means, and choosing wrong turns a red suite green for the wrong reason.
Do not wire it into a lane before it is green — that is the one move that makes things worse. Related: #10534 adds a manifest contract test requiring that a registered python3 test_*.py command actually be self-running. This module has no __main__ block, so it would execute zero cases if registered as-is; whoever fixes the 9 failures should give it an entrypoint or register it through an explicit runner.
Era / self-suite green: parent-era contract checkout + mobile dispatcher fixtures; bash scripts/run-release-process-guard-tests.sh → 94 passed on current main.
(87 tests at filing time, 95 now. Note: the suite needs the locked backend interpreter — under macOS system python 3.9 it dies at collection with TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' from git_bash.py:11, which is a 3.9 PEP-604 issue, not a guard failure.)
2. The suite is wired into a lane..github/checks-manifest.yaml now carries desktop-release-process-guard-tests → bash scripts/run-release-process-guard-tests.sh, lanes: ["local", "ci"], triggered by check-release-process-guards.py, test_check_release_process_guards.py, git_bash.py, codemagic.yaml, the codemagic fixture dir and the manifest itself. Its reason: cites this issue. The runner resolves the canonical backend/.venv interpreter (and syncs deps if missing), so it cannot silently fall back to a system python.
So the "unwired, failing guard test suite" condition no longer holds. No code change proposed.
🤖 automated by hourly watchdog — verification only, no PR
Activity
fix(ci): repair the release-guard self-suite and run it in a lane
fix(ci): make three guards actually verify, and schedule the failure-…
Git-on-my-level commentedon Jul 25, 2026
Root cause, verified on
maintoday (still 9 failed / 78 passed, still in no manifest entry and no workflow reference):The suite runs a historical revision of the guard against present-day input.
_load_parent_guarddoesgit show <revision>:.github/scripts/check-release-process-guards.pyand executes it (test_check_release_process_guards.py:49-62).REVIEWED_PARENT = 4e391ee7hardcodes"canonical workflow must retain exactly 21 approved script steps". The current guard expects 22, because INV-BETA-1 addedCreate Omi Beta variant— andomi-desktop-swift-releasein today'scodemagic.yamlhas 22.So the parent rejects whatever it is handed, and every assertion of the form
parent.check_codemagic_release_publishers() == []fails on an error that has nothing to do with what the test is probing. All 9 failures are that one mismatch:The synthetic fixture makes it unavoidable:
_parent_bypass_workflow(line 123) builds a 2-step workflow, so any parent enforcing a step count rejects it. That is why theRAW_SCANNER_PARENT = 11ac6d9ecases pass — that revision has no step-count rule at all.This will recur on the next approved step. Pinning a historical checker against evolving current data has no stable state; the same 9 tests broke the moment step 22 landed and will break again at 23.
The fix is a semantics decision, which is why I did not make it. Two coherent options:
codemagic.yaml(git show <same revision>:codemagic.yaml) so the parent is judged in its own era, orOption 1 preserves the "the parent accepted this bypass" claim most literally; option 2 is more robust but weakens what "== []" asserts. Either changes what a release-guard test means, and choosing wrong turns a red suite green for the wrong reason.
Do not wire it into a lane before it is green — that is the one move that makes things worse. Related: #10534 adds a manifest contract test requiring that a registered
python3 test_*.pycommand actually be self-running. This module has no__main__block, so it would execute zero cases if registered as-is; whoever fixes the 9 failures should give it an entrypoint or register it through an explicit runner.fix(ci): repair the release-guard self-suite and run it in a lane
fix(ci): wire the desktop release manifest schema guard into a lane (#…
fix(ci): repair and run the release-process-guard self-suite
fix(ci): share the guard-python resolver and trigger on its deps
fix(ci): repair and wire in the release-process guard self-tests (Bas…
fix(ci): share the guard-python resolver and trigger on its deps
fix(ci): run the release-process guard self-suite in the check manife…
aryanorastar commentedon Aug 9, 2026
Both halves are on
mainnow:bash scripts/run-release-process-guard-tests.sh→ 94 passed on currentmain.desktop-release-process-guard-testsin.github/checks-manifest.yaml.Closing. Related author PR #10961 closed as superseded by the above.
aryanorastar commentedon Aug 9, 2026
Both halves of this issue are already on
main— please close when convenient (author lacksCloseIssue):bash scripts/run-release-process-guard-tests.shon currentmain→ 94 passed.desktop-release-process-guard-testsin the checks manifest.Author PR #10961 closed as superseded by the above (remaining delta was only a shared-resolver DRY refactor).
kodjima33 commentedon Aug 16, 2026
Re-verified on `main` @ d6918b0 — both halves of this are done; this looks safe to close.
1. The 9 failures are gone. Full suite is green:
```
$ backend-python -m pytest .github/scripts/test_check_release_process_guards.py -q
95 passed in 36.20s
```
(87 tests at filing time, 95 now. Note: the suite needs the locked backend interpreter — under macOS system python 3.9 it dies at collection with
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'fromgit_bash.py:11, which is a 3.9 PEP-604 issue, not a guard failure.)2. The suite is wired into a lane.
.github/checks-manifest.yamlnow carriesdesktop-release-process-guard-tests→bash scripts/run-release-process-guard-tests.sh,lanes: ["local", "ci"], triggered bycheck-release-process-guards.py,test_check_release_process_guards.py,git_bash.py,codemagic.yaml, the codemagic fixture dir and the manifest itself. Itsreason:cites this issue. The runner resolves the canonicalbackend/.venvinterpreter (and syncs deps if missing), so it cannot silently fall back to a system python.So the "unwired, failing guard test suite" condition no longer holds. No code change proposed.
🤖 automated by hourly watchdog — verification only, no PR
undivisible commentedon Aug 20, 2026
Closing per automated triage (2026-08-20): verified fixed: #11253 wires guard self-test suite into CI manifest. See /tmp/omi-issue-triage.md.
fix(ci): make three guards actually verify, and schedule the failure-…
fix(ci): wire the desktop release manifest schema guard into a lane (B…