chore(workspace): propagate unified make and release automation#248
chore(workspace): propagate unified make and release automation#248marlon-costa-dc merged 7 commits intomainfrom
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @marlon-costa-dc, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the workspace's operational consistency and automation capabilities. It centralizes core development and release processes by introducing a unified set of scripts for managing projects, dependencies, and GitHub workflows. A key change is the enforcement of Python 3.13 across all projects, ensuring a consistent development environment. The new release automation tools streamline the entire release lifecycle, from version bumping and artifact building to changelog generation and Git tagging. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive set of changes aimed at enhancing workspace automation, consistency, and release management. Key improvements include enforcing Python 3.13 across projects with dedicated scripts and conftest.py guards, streamlining script inventory generation, and significantly bolstering internal dependency synchronization with robust validation and flexible repository mapping. Furthermore, new GitHub workflow linting and synchronization tools ensure consistency in CI/CD, while a new release automation framework centralizes version bumping, changelog updates, and release note generation. These changes collectively contribute to a more robust, maintainable, and automated development workflow. The code is well-structured, uses modern Python features, and includes good error handling.
There was a problem hiding this comment.
3 issues found across 14 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="scripts/release/run.py">
<violation number="1" location="scripts/release/run.py:91">
P1: Use `sys.executable` instead of `"python"` for subprocess calls. The bare `"python"` string may resolve to a different interpreter (e.g., a system Python 3.12 instead of the required 3.13), especially inside virtual environments or CI. The project's own `shared.py` already uses `sys.executable` for subprocess invocations. This pattern repeats in `_phase_build` (line 107), and `_phase_publish` (lines 129, 145).</violation>
</file>
<file name="scripts/release/version.py">
<violation number="1" location="scripts/release/version.py:67">
P1: Target version validation does not strip `-dev` suffix, unlike the current-version validation in `_replace_version` (line 28). Passing `--version 0.11.0-dev` will raise a `ValueError` from `parse_semver`, making the tool unable to set dev versions despite explicitly supporting them when reading.</violation>
</file>
<file name="scripts/maintenance/enforce_python_version.py">
<violation number="1" location="scripts/maintenance/enforce_python_version.py:185">
P1: `_has_guard` only checks for the marker comment's presence, not whether the guard enforces the correct Python version. If `REQUIRED_MINOR` is ever changed, stale guards in existing conftest.py files will never be detected or updated — both `--check` and apply modes will incorrectly report them as OK. Consider also verifying that the version number inside the existing guard matches `REQUIRED_MINOR` (e.g., check for the full `GUARD_BLOCK` or for `(3, {REQUIRED_MINOR})` in the content).</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| root: Path, version: str, dry_run: bool, project_names: list[str] | ||
| ) -> None: | ||
| command = [ | ||
| "python", |
There was a problem hiding this comment.
P1: Use sys.executable instead of "python" for subprocess calls. The bare "python" string may resolve to a different interpreter (e.g., a system Python 3.12 instead of the required 3.13), especially inside virtual environments or CI. The project's own shared.py already uses sys.executable for subprocess invocations. This pattern repeats in _phase_build (line 107), and _phase_publish (lines 129, 145).
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At scripts/release/run.py, line 91:
<comment>Use `sys.executable` instead of `"python"` for subprocess calls. The bare `"python"` string may resolve to a different interpreter (e.g., a system Python 3.12 instead of the required 3.13), especially inside virtual environments or CI. The project's own `shared.py` already uses `sys.executable` for subprocess invocations. This pattern repeats in `_phase_build` (line 107), and `_phase_publish` (lines 129, 145).</comment>
<file context>
@@ -0,0 +1,224 @@
+ root: Path, version: str, dry_run: bool, project_names: list[str]
+) -> None:
+ command = [
+ "python",
+ "scripts/release/version.py",
+ "--root",
</file context>
| def main() -> int: | ||
| args = _parse_args() | ||
| root = workspace_root(args.root) | ||
| _ = parse_semver(args.version) |
There was a problem hiding this comment.
P1: Target version validation does not strip -dev suffix, unlike the current-version validation in _replace_version (line 28). Passing --version 0.11.0-dev will raise a ValueError from parse_semver, making the tool unable to set dev versions despite explicitly supporting them when reading.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At scripts/release/version.py, line 67:
<comment>Target version validation does not strip `-dev` suffix, unlike the current-version validation in `_replace_version` (line 28). Passing `--version 0.11.0-dev` will raise a `ValueError` from `parse_semver`, making the tool unable to set dev versions despite explicitly supporting them when reading.</comment>
<file context>
@@ -0,0 +1,86 @@
+def main() -> int:
+ args = _parse_args()
+ root = workspace_root(args.root)
+ _ = parse_semver(args.version)
+
+ changed = 0
</file context>
|
|
||
| content = conftest.read_text(encoding="utf-8") | ||
|
|
||
| if _has_guard(content): |
There was a problem hiding this comment.
P1: _has_guard only checks for the marker comment's presence, not whether the guard enforces the correct Python version. If REQUIRED_MINOR is ever changed, stale guards in existing conftest.py files will never be detected or updated — both --check and apply modes will incorrectly report them as OK. Consider also verifying that the version number inside the existing guard matches REQUIRED_MINOR (e.g., check for the full GUARD_BLOCK or for (3, {REQUIRED_MINOR}) in the content).
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At scripts/maintenance/enforce_python_version.py, line 185:
<comment>`_has_guard` only checks for the marker comment's presence, not whether the guard enforces the correct Python version. If `REQUIRED_MINOR` is ever changed, stale guards in existing conftest.py files will never be detected or updated — both `--check` and apply modes will incorrectly report them as OK. Consider also verifying that the version number inside the existing guard matches `REQUIRED_MINOR` (e.g., check for the full `GUARD_BLOCK` or for `(3, {REQUIRED_MINOR})` in the content).</comment>
<file context>
@@ -0,0 +1,243 @@
+
+ content = conftest.read_text(encoding="utf-8")
+
+ if _has_guard(content):
+ if verbose:
+ print(f" ✓ conftest.py guard OK: {project.name}")
</file context>
There was a problem hiding this comment.
1 issue found across 3 files (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="scripts/maintenance/_discover.py">
<violation number="1" location="scripts/maintenance/_discover.py:14">
P0: Missing module: `libs.discovery` does not exist in the repository. The import `from libs.discovery import discover_projects` will raise `ModuleNotFoundError` at runtime. Ensure that `libs/discovery.py` (with `discover_projects` and the `ProjectInfo`-like return type exposing `.kind`, `.name`, `.path`) is added to the repository as part of this PR.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| kind = "submodule" if entry.name in submodules else "external" | ||
| projects.append(ProjectInfo(path=entry, name=entry.name, kind=kind)) | ||
| return projects | ||
| from libs.discovery import discover_projects |
There was a problem hiding this comment.
P0: Missing module: libs.discovery does not exist in the repository. The import from libs.discovery import discover_projects will raise ModuleNotFoundError at runtime. Ensure that libs/discovery.py (with discover_projects and the ProjectInfo-like return type exposing .kind, .name, .path) is added to the repository as part of this PR.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At scripts/maintenance/_discover.py, line 14:
<comment>Missing module: `libs.discovery` does not exist in the repository. The import `from libs.discovery import discover_projects` will raise `ModuleNotFoundError` at runtime. Ensure that `libs/discovery.py` (with `discover_projects` and the `ProjectInfo`-like return type exposing `.kind`, `.name`, `.path`) is added to the repository as part of this PR.</comment>
<file context>
@@ -4,49 +4,14 @@
- kind = "submodule" if entry.name in submodules else "external"
- projects.append(ProjectInfo(path=entry, name=entry.name, kind=kind))
- return projects
+from libs.discovery import discover_projects
</file context>
|
There was a problem hiding this comment.
1 issue found across 6 files (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="scripts/core/skill_validate.py">
<violation number="1" location="scripts/core/skill_validate.py:18">
P0: Import will fail at runtime: `libs.discovery` module does not exist in the repository. The `libs/` directory and `libs/discovery.py` file are missing entirely. The old inline `discover_projects` implementation was removed and replaced with a call to `ssot_discover_projects`, so this function will raise `ModuleNotFoundError` on every invocation. Either the `libs/discovery` module needs to be added to the repository as part of this PR, or the old inline implementation should be retained.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| if str(Path(__file__).resolve().parents[2]) not in sys.path: | ||
| sys.path.insert(0, str(Path(__file__).resolve().parents[2])) | ||
|
|
||
| from libs.discovery import discover_projects as ssot_discover_projects |
There was a problem hiding this comment.
P0: Import will fail at runtime: libs.discovery module does not exist in the repository. The libs/ directory and libs/discovery.py file are missing entirely. The old inline discover_projects implementation was removed and replaced with a call to ssot_discover_projects, so this function will raise ModuleNotFoundError on every invocation. Either the libs/discovery module needs to be added to the repository as part of this PR, or the old inline implementation should be retained.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At scripts/core/skill_validate.py, line 18:
<comment>Import will fail at runtime: `libs.discovery` module does not exist in the repository. The `libs/` directory and `libs/discovery.py` file are missing entirely. The old inline `discover_projects` implementation was removed and replaced with a call to `ssot_discover_projects`, so this function will raise `ModuleNotFoundError` on every invocation. Either the `libs/discovery` module needs to be added to the repository as part of this PR, or the old inline implementation should be retained.</comment>
<file context>
@@ -12,6 +12,11 @@
+if str(Path(__file__).resolve().parents[2]) not in sys.path:
+ sys.path.insert(0, str(Path(__file__).resolve().parents[2]))
+
+from libs.discovery import discover_projects as ssot_discover_projects
+
try:
</file context>




Summary
Validation