docs: align lifecycle wording and extend version checks#108
docs: align lifecycle wording and extend version checks#108RtlZeroMemory merged 4 commits intomainfrom
Conversation
📝 WalkthroughWalkthroughThis PR updates documentation and validation to mark the project as alpha and to pin drawlist formats to v1 and v2, and extends a version-pin checking script and one test fixture to enforce and reflect those changes. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
scripts/check_version_pins.py (1)
125-145: Make doc checks less brittle to formatting-only edits.These snippet checks rely on exact line wraps/indentation, so harmless prose reflow can fail CI. Prefer whitespace-tolerant regex (or normalized text) for semantic checks.
Proposed refactor
- expected_config_snippets = [ - "drawlist format (`ZR_DRAWLIST_VERSION_V1` or `ZR_DRAWLIST_VERSION_V2`)", - "Drawlist version MUST be one of the supported pinned versions (`ZR_DRAWLIST_VERSION_V1` or\n `ZR_DRAWLIST_VERSION_V2`).", - ] - for snippet in expected_config_snippets: - if snippet not in config_module_text: - print(f"{docs_config_module}: missing current drawlist-version wording: {snippet!r}", file=sys.stderr) - return 1 + config_patterns = [ + r"drawlist format\s*\(`ZR_DRAWLIST_VERSION_V1`\s*or\s*`ZR_DRAWLIST_VERSION_V2`\)", + r"Drawlist version MUST be one of the supported pinned versions\s*\(`ZR_DRAWLIST_VERSION_V1`\s*or\s*`ZR_DRAWLIST_VERSION_V2`\)\.", + ] + for pat in config_patterns: + if re.search(pat, config_module_text, flags=re.MULTILINE) is None: + print(f"{docs_config_module}: missing current drawlist-version wording matching /{pat}/", file=sys.stderr) + return 1 - expected_drawlist_snippets = [ - "`ZR_DRAWLIST_VERSION_V1` and `ZR_DRAWLIST_VERSION_V2` are accepted.", - "`ZR_DRAWLIST_VERSION_V2`\nis additive and only gates `ZR_DL_OP_BLIT_RECT`;", - ] - for snippet in expected_drawlist_snippets: - if snippet not in drawlist_module_text: - print(f"{docs_drawlist_module}: missing current parser-version wording: {snippet!r}", file=sys.stderr) - return 1 + drawlist_patterns = [ + r"`ZR_DRAWLIST_VERSION_V1`\s*and\s*`ZR_DRAWLIST_VERSION_V2`\s*are accepted\.", + r"`ZR_DRAWLIST_VERSION_V2`\s*is additive and only gates\s*`ZR_DL_OP_BLIT_RECT`;", + ] + for pat in drawlist_patterns: + if re.search(pat, drawlist_module_text, flags=re.MULTILINE) is None: + print(f"{docs_drawlist_module}: missing current parser-version wording matching /{pat}/", file=sys.stderr) + return 1🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/check_version_pins.py` around lines 125 - 145, The current exact-string snippet checks in scripts/check_version_pins.py (using config_module_text, expected_config_snippets, drawlist_module_text, expected_drawlist_snippets) are brittle to formatting changes; update the checks to be whitespace-tolerant by normalizing both the docs text and the expected snippets (e.g., collapse all runs of whitespace/newlines to single spaces and strip) or match using regex with \s+ for spaces and newlines before doing the containment checks; apply this normalization/matching for both the config_module_text vs expected_config_snippets loop and the drawlist_module_text vs expected_drawlist_snippets loop so harmless reflow won’t break CI.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@scripts/check_version_pins.py`:
- Around line 125-145: The current exact-string snippet checks in
scripts/check_version_pins.py (using config_module_text,
expected_config_snippets, drawlist_module_text, expected_drawlist_snippets) are
brittle to formatting changes; update the checks to be whitespace-tolerant by
normalizing both the docs text and the expected snippets (e.g., collapse all
runs of whitespace/newlines to single spaces and strip) or match using regex
with \s+ for spaces and newlines before doing the containment checks; apply this
normalization/matching for both the config_module_text vs
expected_config_snippets loop and the drawlist_module_text vs
expected_drawlist_snippets loop so harmless reflow won’t break CI.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9366faee-1040-4a0e-8bbc-3de47cfa913d
📒 Files selected for processing (8)
CHANGELOG.mdREADME.mddocs/ABI_REFERENCE.mddocs/VERSION_PINS.mddocs/modules/CONFIG_AND_ABI_VERSIONING.mddocs/modules/DRAWLIST_FORMAT_AND_PARSER.mdscripts/check_version_pins.pytests/golden/fixtures/blit_drawlist_canvas_001_ascii/case.txt
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bd143d6c0b
ℹ️ 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".
There was a problem hiding this comment.
🧹 Nitpick comments (1)
scripts/check_version_pins.py (1)
83-117: Reduce brittleness in lifecycle/readme/version checks.These checks still depend on exact prose/Markdown formatting (for example Line 112), while later blocks already use whitespace-insensitive matching. Consider using one normalized matcher here too so minor wording/format edits don’t fail CI.
Refactor sketch
def normalize_ws(text: str) -> str: return RE_WS.sub(" ", text).strip() +def contains_snippet(text: str, snippet: str, *, normalized: bool = False) -> bool: + if normalized: + return normalize_ws(snippet) in normalize_ws(text) + return snippet in text ... - if "Zireael is alpha." not in pins_text: + if not contains_snippet(pins_text, "Zireael is alpha.", normalized=True): ... - if "Lifecycle: alpha" not in versioning_text: + if not contains_snippet(versioning_text, "Lifecycle: alpha", normalized=True): ... - if "Zireael is currently **alpha**." not in readme_text: + if not contains_snippet(readme_text, "Zireael is currently alpha.", normalized=True):🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/check_version_pins.py` around lines 83 - 117, The lifecycle/readme/version checks are brittle because they rely on exact substring matches (e.g., the literals checked against versioning_text and readme_text); normalize and perform whitespace-insensitive (and optionally markdown-insensitive) matching instead. Update the checks that use versioning_text and readme_text (and the specific literals "Lifecycle: alpha", "Zireael is currently **alpha**.", and "Drawlist formats: v1, v2") to first normalize the source text (e.g., collapse all whitespace sequences to single spaces and strip markdown emphasis) and then use re.search with patterns that allow flexible spacing/punctuation (or case-insensitive matching) so minor prose/format edits won’t break CI. Ensure you keep the same failure messages and return behavior when a match is not found.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@scripts/check_version_pins.py`:
- Around line 83-117: The lifecycle/readme/version checks are brittle because
they rely on exact substring matches (e.g., the literals checked against
versioning_text and readme_text); normalize and perform whitespace-insensitive
(and optionally markdown-insensitive) matching instead. Update the checks that
use versioning_text and readme_text (and the specific literals "Lifecycle:
alpha", "Zireael is currently **alpha**.", and "Drawlist formats: v1, v2") to
first normalize the source text (e.g., collapse all whitespace sequences to
single spaces and strip markdown emphasis) and then use re.search with patterns
that allow flexible spacing/punctuation (or case-insensitive matching) so minor
prose/format edits won’t break CI. Ensure you keep the same failure messages and
return behavior when a match is not found.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 24aac439-452f-47db-a7c9-fc4bc7074c35
📒 Files selected for processing (1)
scripts/check_version_pins.py
Summary
Verification
Summary by CodeRabbit
New Features
Documentation
Tests
Chores