Skip to content

Release-process guard self-tests: 9 failures on main and not wired into any CI lane #10351

Closed

Description

@kodjima33

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.

Activity

  1. added
    bug
    on Jul 22, 2026
  2. Git-on-my-level commented on Jul 25, 2026

    @Git-on-my-level
    Member

    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:

    1. Pair each historical guard with its contemporaneous codemagic.yaml (git show <same revision>:codemagic.yaml) so the parent is judged in its own era, or
    2. 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.

  3. aryanorastar commented on Aug 9, 2026

    @aryanorastar
    Collaborator

    Both halves are on main now:

    Closing. Related author PR #10961 closed as superseded by the above.

  4. aryanorastar commented on Aug 9, 2026

    @aryanorastar
    Collaborator

    Both halves of this issue are already on main — please close when convenient (author lacks CloseIssue):

    1. Suite green: parent-era contract checkout + mobile dispatcher fixtures; bash scripts/run-release-process-guard-tests.sh on current main → 94 passed.
    2. CI wiring: fix(ci): run the release-process guard self-suite in the check manifest (#10351) #11253 registered desktop-release-process-guard-tests in the checks manifest.

    Author PR #10961 closed as superseded by the above (remaining delta was only a shared-resolver DRY refactor).

  5. kodjima33 commented on Aug 16, 2026

    @kodjima33
    CollaboratorAuthor

    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' 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

  6. undivisible commented on Aug 20, 2026

    @undivisible
    Collaborator

    Closing per automated triage (2026-08-20): verified fixed: #11253 wires guard self-test suite into CI manifest. See /tmp/omi-issue-triage.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions