docs: add English and Chinese README switch#16
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b2053dfa42
ℹ️ 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".
| def parse_timestamp(value: Any) -> datetime | None: | ||
| if not isinstance(value, str): | ||
| return None | ||
| try: | ||
| return datetime.fromisoformat(value.replace("Z", "+00:00")) |
There was a problem hiding this comment.
Reject naïve
issued_at timestamps in lifecycle receipts
parse_timestamp() accepts timezone-less strings such as 2026-03-17T00:00:00 even though the validator reports that issued_at must be RFC3339. That means validate_receipt() incorrectly returns PASS for malformed receipts, and a mixed chain of one naïve timestamp plus the normal ...Z form crashes in verify_receipts() with TypeError: can't compare offset-naive and offset-aware datetimes instead of producing ERR_INVALID_ISSUED_AT. Because lifecycle receipts are external input, this needs to reject naïve datetimes before they reach the chain comparison logic.
Useful? React with 👍 / 👎.
| def load_receipts(receipt_refs: list[str]) -> list[dict[str, Any]]: | ||
| receipts: list[dict[str, Any]] = [] | ||
| for ref in receipt_refs: | ||
| path = REPO_ROOT / ref | ||
| receipts.append(json.loads(path.read_text(encoding="utf-8"))) |
There was a problem hiding this comment.
Resolve
receipt_refs relative to the manifest file
verify_manifest() accepts an arbitrary manifest path, but load_receipts() still prepends REPO_ROOT to every receipt_ref. In practice this means a custom/exported manifest outside the repository cannot be validated: I reproduced it with a temporary manifest and receipt pair, and verify_manifest(tmp_manifest) tried to open /workspace/aro-audit/r1.json instead of the sibling receipt next to the manifest. As written, the new conformance runner only works with manifests stored under this checkout.
Useful? React with 👍 / 👎.
Adds English/Chinese language switch buttons and a Chinese README companion for the repository landing page.