Repository navigation
Conversation
…igest it ran (#730) scripts/native_receipt.py validates the cortex-native-receipt/1 schema: every check names the host that ran it and the members_digest of the artifact it ran, which must equal the receipt's artifact digest (the one `cortex doctor` reports). A receipt can no longer merge checks from two artifacts or hosts, and the report separates distributed evidence (unmodified wheel) from source evidence and lists which of #730's required journeys passed, failed or lack a check. Slice 2 of #730; the claim gate is the next slice. Refs #730 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018kyZYroeZLnMzE7EWCVCWK
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7b4aba2d89
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for section, keys in _FIELDS.items(): | ||
| errors += _missing(section, receipt.get(section), keys) | ||
| if "backend" not in receipt: | ||
| errors.append("backend: missing") |
There was a problem hiding this comment.
Validate receipt metadata values, not just key presence
A receipt with null for artifact.version, every platform field, backend, and both host fields still passes validation when the check also uses host: null. With a valid digest and modified: false, the CLI then reports distributed evidence and passed journeys despite identifying neither the release nor the platform or host being qualified. _missing only checks whether keys exist, and these fields receive no subsequent value validation. Require appropriately typed, non-empty metadata before accepting the receipt so unknown support cells cannot be reported as valid evidence.
Useful? React with 👍 / 👎.
| if not str(check["evidence"]).strip(): | ||
| errors.append(f"{where}.evidence: empty") |
There was a problem hiding this comment.
Reject missing evidence instead of stringifying it
For an otherwise valid receipt, evidence: null passes this check because str(None) is the non-empty string "None"; empty JSON arrays and objects likewise pass. Consequently, the CLI reports a journey as passed even though the receipt contains no evidence for it. Validate the evidence value itself and reject null or empty evidence rather than treating its Python string representation as proof.
Useful? React with 👍 / 👎.
| names = {h["name"] for h in hosts if isinstance(h, dict) and "name" in h} | ||
| return names, errors |
There was a problem hiding this comment.
Reject duplicate host names with ambiguous versions
When hosts contains the same name with different versions—for example, Claude Code 2.1.280 and 2.1.306—the set comprehension silently collapses both entries and validation succeeds. Since each check references only the host name, a passed check can no longer be attributed to either installed version, leaving the receipt ambiguous about which support combination was actually measured. Reject duplicate host names or give host entries unique identifiers that checks must reference.
Useful? React with 👍 / 👎.

Summary
Refs #730 (tranche 2 ; l'issue reste ouverte).
Cause racine : les reçus natifs commités ne lient pas chaque check à l'artefact qui l'a exécuté. Le reçu v4.23.4 nomme une version, le reçu de handoff du 2026-09-22 n'en nomme aucune : un check mesuré sur un checkout source pouvait être lu comme preuve de support pour une wheel distribuée (
docs/audits/platform-support-matrix-2026-11-05.md, tranche restante 1).Changement :
scripts/native_receipt.pyvalide le schémacortex-native-receipt/1:artifactreprend l'identité que calculecortex doctor(mcp_server/doctor_artifact.py) :kind(wheel/source-tree),version,revision,modified,members_digest;hostetartifact_digest. Le digest doit être égal àartifact.members_digestet l'hôte doit figurer danshosts, donc un reçu ne peut pas fusionner des checks lancés sur deux artefacts ou deux hôtes ;Tranches restantes de #730 : le gate qui refuse une affirmation de support sans reçu courant de ce schéma, puis les reçus natifs des cellules
—(Windows, macOS x86_64,.mcpb).Type of change
Test plan
pytest tests_py/scripts/test_native_receipt.py: 13 passed.ruff checketruff format --checksur les fichiers touchés : propres.python scripts/check_craftsmanship.py: OK.python scripts/check_doc_claims.py: code de sortie 0.Non vérifié : la suite complète en local (l'environnement n'a pas pu télécharger
torch, donc seules les dépendances de ces tests sont installées). Aucun reçu existant n'est converti au nouveau schéma, faute d'unmembers_digestenregistré dans ces reçus.Audit notes
Identifiants de checks exigés repris des critères d'acceptation 2 à 4 de #730. Le schéma s'appuie sur le digest de #729, sans le modifier.
Coding-standards compliance
# source:sur chaque constante (gate craftsmanship OK).Breaking changes
Aucun.
Reviewer checklist
Generated by Claude Code