Skip to content

fix(ci): wire the desktop release manifest schema guard into a lane - #10667

Merged
kodjima33 merged 2 commits into
BasedHardware:mainfrom
aryanorastar:fix/wire-desktop-release-manifest-schema-check
Jul 27, 2026
Merged

kodjima33 merged 2 commits into
BasedHardware:mainfrom
aryanorastar:fix/wire-desktop-release-manifest-schema-check

Conversation

@aryanorastar

@aryanorastar aryanorastar commented Jul 26, 2026 •

Copy link
Copy Markdown
Collaborator

What

.github/scripts/test_desktop_release_manifest_schema.py ran nowhere. No entry in .github/checks-manifest.yaml, no workflow step, no reference anywhere under .github/:

$ grep -rn "test_desktop_release_manifest_schema" .github/ | grep -v '^.github/scripts/test_desktop_release_manifest_schema.py'
(no output)

A guard with no blocking audience is a dead check — the same class #10351 filed, and what AGENTS.md means by "On-demand scripts and scheduled jobs with no blocking audience are dead checks."

Why it could not have been wired as written

It imported jsonschema and relied on pytest, and no lane installs either — it was 1 of only 2 suites in that directory that fail to run on a stock interpreter. Every other self-suite there is unittest-style and stdlib-only, invoked as python3 <script>. Its own sibling test_desktop_release_manifest.py is wired, and needs nothing.

Why it matters

desktop-release-manifest-v1.schema.json is what a published Stable manifest is validated against. The absence of beta_zip_url/beta_dmg_url is what stops a beta build from being describable as Stable — load-bearing, not tidiness.

Change

  • Ported to stdlib. Both $defs it exercises are plain {"type": "string", "pattern": "^...$"}. JSON Schema pattern is a regex search and these are anchored, so re.search validates them exactly as Draft202012Validator did. _matches asserts the subschema really is that shape, so a richer one fails loudly rather than being silently under-validated.
  • Converted to unittest, so python3 <script> runs it — matching the directory convention.
  • Added the rejection cases it lacked. The original only asserted the canonical Stable URLs are accepted, so loosening the pattern to admit any artifact name passed it. It now also proves a beta-named artifact and a foreign host/repo are refused.
  • Registered as desktop-release-manifest-schema-v1 on the local and ci lanes, triggered by the schema and the suite.

Verification

/usr/bin/python3 (3.9.6, no deps installed)   -> 5 tests, OK      (was: unrunnable)
mutation: add beta_zip_url to the schema      -> FAILED (1)
mutation: loosen zipUrl to accept any .zip    -> FAILED (2)        <- old suite PASSED this
schema restored                               -> OK, file unmodified
test_run_checks.py (manifest contract)        -> 26 passed
run_checks.py --lane local                    -> SELECTED and PASS

The second mutation is the one that matters: it is a real weakening of the release contract that the previous version of this suite could not catch, because it only tested the happy path.

Scope

Two files: the suite and one manifest entry. The schema itself is untouched (verified git status clean after the mutation runs).

Product invariants affected

none

Failure-Class: none

Review in cubic

`.github/scripts/test_desktop_release_manifest_schema.py` ran nowhere. It had no
entry in `.github/checks-manifest.yaml`, no workflow step, and no reference
anywhere under `.github/` -- a guard with no blocking audience, which AGENTS.md
calls a dead check and BasedHardware#10351 filed as a class.

It could not have been wired as written. It imported `jsonschema` and relied on
pytest, and no lane installs either; every other self-suite in that directory is
unittest-style and stdlib-only, run as `python3 <script>`. Its own sibling
`test_desktop_release_manifest.py` is wired precisely because it needs nothing.

What it guards is not cosmetic: `desktop-release-manifest-v1.schema.json` is what
a published Stable manifest is validated against, and the absence of
`beta_zip_url`/`beta_dmg_url` is what stops a beta build from being describable as
Stable.

Ported to stdlib and registered:

- Both `$defs` it exercises are plain `{"type": "string", "pattern": "^...$"}`
  schemas. JSON Schema `pattern` is a regex search and these are anchored, so
  `re.search` validates them exactly as `Draft202012Validator` did. `_matches`
  asserts the subschema is that shape, so a richer one fails loudly instead of
  being silently under-validated.
- Converted to unittest so `python3 <script>` runs it, matching the directory.
- Added the rejection cases the original lacked: it only checked that the
  canonical Stable URLs are accepted, so loosening the pattern to admit any
  artifact name passed. It now also proves a beta-named artifact and a foreign
  host/repo are refused.
- Registered as `desktop-release-manifest-schema-v1` on the local and ci lanes,
  triggered by the schema and the suite.

Verification:
  /usr/bin/python3 (3.9.6, no deps)      -> 5 tests, OK   (was: unrunnable)
  mutation: add beta_zip_url to schema   -> FAILED (1)
  mutation: loosen zipUrl to any .zip    -> FAILED (2)   [old suite passed this]
  schema restored                        -> OK, file unmodified
  test_run_checks.py (manifest contract) -> 26 passed
  run_checks.py --lane local             -> SELECTED and PASS

Failure-Class: none

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@Git-on-my-level Git-on-my-level added workflow-review Needs maintainer review for workflow, automation, hooks, or CI behavior needs-maintainer-review Needs a human maintainer to sign off before merge labels Jul 26, 2026

@Git-on-my-level Git-on-my-level left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tightening this guard. Wiring the schema self-suite into the manifest and making it stdlib/unittest-runnable is the right direction, and I verified locally that python3 .github/scripts/test_desktop_release_manifest_schema.py passes on this head.

I do need one small change before this can merge: _matches() says it fails loudly if either $defs.zipUrl or $defs.dmgUrl becomes richer than a plain string+pattern schema, but it currently only asserts type == "string" and then ignores any additional schema keywords. If someone later adds something like minLength, format, allOf, etc., this test would still silently under-validate while claiming to mirror the schema. Please either assert the exact supported shape, e.g. set(subschema) == {"type", "pattern"} plus isinstance(pattern, str), or use the real JSON Schema validator in a lane that installs it.

I’m also not formally approving because this touches CI/check routing and the current check summary is not fully green, so it needs maintainer/workflow sign-off after the above is fixed.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified: test_desktop_release_manifest_schema.py had no entry in .github/checks-manifest.yaml and no workflow reference, so the guard never ran; this only wires the existing test into a lane.

@kodjima33
kodjima33 merged commit 78c8faa into BasedHardware:main Jul 27, 2026
26 checks passed
undivisible added a commit to undivisible/omi that referenced this pull request Sep 29, 2026
…asedHardware#10667)

* fix(ci): wire the desktop release manifest schema guard into a lane

`.github/scripts/test_desktop_release_manifest_schema.py` ran nowhere. It had no
entry in `.github/checks-manifest.yaml`, no workflow step, and no reference
anywhere under `.github/` -- a guard with no blocking audience, which AGENTS.md
calls a dead check and BasedHardware#10351 filed as a class.

It could not have been wired as written. It imported `jsonschema` and relied on
pytest, and no lane installs either; every other self-suite in that directory is
unittest-style and stdlib-only, run as `python3 <script>`. Its own sibling
`test_desktop_release_manifest.py` is wired precisely because it needs nothing.

What it guards is not cosmetic: `desktop-release-manifest-v1.schema.json` is what
a published Stable manifest is validated against, and the absence of
`beta_zip_url`/`beta_dmg_url` is what stops a beta build from being describable as
Stable.

Ported to stdlib and registered:

- Both `$defs` it exercises are plain `{"type": "string", "pattern": "^...$"}`
  schemas. JSON Schema `pattern` is a regex search and these are anchored, so
  `re.search` validates them exactly as `Draft202012Validator` did. `_matches`
  asserts the subschema is that shape, so a richer one fails loudly instead of
  being silently under-validated.
- Converted to unittest so `python3 <script>` runs it, matching the directory.
- Added the rejection cases the original lacked: it only checked that the
  canonical Stable URLs are accepted, so loosening the pattern to admit any
  artifact name passed. It now also proves a beta-named artifact and a foreign
  host/repo are refused.
- Registered as `desktop-release-manifest-schema-v1` on the local and ci lanes,
  triggered by the schema and the suite.

Verification:
  /usr/bin/python3 (3.9.6, no deps)      -> 5 tests, OK   (was: unrunnable)
  mutation: add beta_zip_url to schema   -> FAILED (1)
  mutation: loosen zipUrl to any .zip    -> FAILED (2)   [old suite passed this]
  schema restored                        -> OK, file unmodified
  test_run_checks.py (manifest contract) -> 26 passed
  run_checks.py --lane local             -> SELECTED and PASS

Failure-Class: none

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* test(ci): reject unsupported manifest URL schemas

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
Co-authored-by: Max Carter 祁明思 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-maintainer-review Needs a human maintainer to sign off before merge workflow-review Needs maintainer review for workflow, automation, hooks, or CI behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants