Repository navigation
Conversation
`.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]>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Git-on-my-level
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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.
…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]>
What
.github/scripts/test_desktop_release_manifest_schema.pyran nowhere. No entry in.github/checks-manifest.yaml, no workflow step, no reference anywhere under.github/: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
jsonschemaand 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 aspython3 <script>. Its own siblingtest_desktop_release_manifest.pyis wired, and needs nothing.Why it matters
desktop-release-manifest-v1.schema.jsonis what a published Stable manifest is validated against. The absence ofbeta_zip_url/beta_dmg_urlis what stops a beta build from being describable as Stable — load-bearing, not tidiness.Change
$defsit exercises are plain{"type": "string", "pattern": "^...$"}. JSON Schemapatternis a regex search and these are anchored, sore.searchvalidates them exactly asDraft202012Validatordid._matchesasserts the subschema really is that shape, so a richer one fails loudly rather than being silently under-validated.python3 <script>runs it — matching the directory convention.desktop-release-manifest-schema-v1on thelocalandcilanes, triggered by the schema and the suite.Verification
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 statusclean after the mutation runs).Product invariants affected
none
Failure-Class: none