[codex] harden release status checks#69
Merged
Merged
Conversation
Coverage Report✅ 88.1% overall coverage
|
85115de to
c8b254b
Compare
There was a problem hiding this comment.
Pull request overview
This PR prepares the 0.3.1 patch release and adds a “release status” guard script to detect version/tag/changelog/release-note drift before publishing, while also tightening template verification to match Milo’s terminal-aware Kida environment (including strict end-tag and fragile-path lint checks).
Changes:
- Bump project version metadata to 0.3.1 and add 0.3.1 changelog + release notes (with minor historical correction in 0.3.0 notes).
- Add
scripts/release_status.py+ tests, and wire it intomake release-status/make gh-release. - Harden
scripts/check_templates.pyto perform strict end-tag + fragile-path checks when compiling templates viamilo.templates.get_env().
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Bumps editable package version to 0.3.1. |
| pyproject.toml | Updates package version to 0.3.1 (and reflects Kida dependency expectations). |
| src/milo/init.py | Updates __version__ to 0.3.1. |
| scripts/release_status.py | New release-status guard (version surfaces + tags + PyPI + changelog + release notes + fragments). |
| tests/test_release_status.py | New unit tests for the release-status guard logic. |
| Makefile | Adds release-status target and runs release-status as a preflight for gh-release. |
| docs/testing.md | Documents make release-status. |
| scripts/check_templates.py | Adds strict end-tag and fragile-path checks in Milo-aware template compilation. |
| tests/test_templates.py | Adds tests ensuring the local template checker uses Milo’s env and flags strict-end/fragile-path issues. |
| src/milo/templates/error.kida | Adjusts template to satisfy stricter end-tag checks (removes unified {% end %} usage). |
| src/milo/templates/components/help_page.kida | Switches to same-folder ./_defs.kida import style. |
| src/milo/templates/components/command_list.kida | Switches to same-folder ./_defs.kida import style. |
| site/content/releases/0.3.1.md | Adds release notes for 0.3.1. |
| site/content/releases/0.3.0.md | Minor wording correction regarding Kida version for 0.3.0. |
| CHANGELOG.md | Adds 0.3.1 entry and aligns Kida wording in the 0.3.0 entry. |
| changelog.d/steward-network.changed.md | Removes compiled fragment (now in CHANGELOG). |
| changelog.d/release-0.3.0.changed.md | Removes compiled fragment (now in CHANGELOG). |
| changelog.d/kida-0.9.changed.md | Removes compiled fragment (now in CHANGELOG). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+72
to
+74
| release-status: | ||
| python3 scripts/release_status.py --remote | ||
|
|
Comment on lines
83
to
85
| gh-release: | ||
| python3 scripts/release_status.py --remote --pypi | ||
| @VERSION=$$(grep -m1 '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/'); \ |
Comment on lines
+283
to
+287
| continue | ||
| text = path.read_text(encoding="utf-8").strip() | ||
| if not text: | ||
| empty.append(path.name) | ||
| return tuple(empty) |
Comment on lines
+318
to
+321
| "CHANGELOG.md", | ||
| f"site/content/releases/{version}.md", | ||
| ], | ||
| ) |
Comment on lines
+43
to
+46
| def check_strict_closures(path: Path, rel: str, env: Any) -> list[str]: | ||
| source = path.read_text(encoding="utf-8") | ||
| lexer = Lexer(source, env._lexer_config) | ||
| tokens = list(lexer.tokenize()) |
| ) | ||
| parser.parse() | ||
| errors: list[str] = [] | ||
| for lineno, _col, closing in parser._unified_end_closures: |
Comment on lines
+69
to
+73
| tmpl = env.get_template(rel) | ||
| errors.extend(check_strict_closures(path, rel, env)) | ||
| ast = getattr(tmpl, "_optimized_ast", None) | ||
| if ast is not None: | ||
| for issue in check_fragile_paths(ast, rel): |
Comment on lines
+300
to
+302
| if len(parts) == 2: | ||
| tags.append(parts[1]) | ||
| return tuple(tags) |
c8b254b to
3a2a8e4
Compare
3a2a8e4 to
a1046f5
Compare
a1046f5 to
92ab66b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
make release-statusandmake gh-releaseWhy
0.3.0 was already tagged and live, but local metadata and release fragments made the next release state ambiguous. The new guard reports that situation before editing release notes or publishing artifacts.
Validation
python3 scripts/release_status.py --remote --pypimake release-statusuv run pytest tests/test_release_status.pymake docs-testmake cigit diff --checkmake cistill reports the existingtywarnings inpipeline.pyandschema.py; this PR does not add new type warnings.