Repository navigation
Conversation
Drops all legacy WrenAI workflows (ai-service-*, ui-*, wren-launcher-ci, create-rc-release*, pr-tagger) and replaces them with wren-engine's surviving workflows, repathed for the core/ layout. Workflows added: - rust.yml, core-py-ci.yml, wren-ci.yml, wasm-ci.yml — CI tests, paths updated to core/<module>/** - skills-check.yml — unchanged (skills/ stays at root) - release-please.yml — drops ibis-server / mcp-server outputs and publish jobs; keeps wren-core-py / wren / wren-core-wasm - publish-wren-core-py.yml, publish-wren.yml, publish-wren-core-wasm.yml — workflow_call helpers, all paths repathed to core/ - rc-release.yml — drops ibis-server / mcp-server options + publish jobs - sync-docs.yml — paths updated to docs/core/ - pull-request-title-validator.yaml, labeler.yaml — wren-engine versions - .github/actions/rust/ — composite actions carried verbatim (no path refs) Configs: - .github/dependabot.yml — replaces old wren-ai-service dependabot.yaml; now covers core/wren-core-py, core/wren, core/wren-core, core/wren-core-base, core/wren-core-wasm, plus github-actions - .github/labeler.yml — path-based PR auto-labels (core/rust/python/wasm/ skills/sdk/documentation/examples/ci/dependencies) Release-please (folded in from 03e): - release-please-config.json — drops ibis-server / mcp-server packages; remaining packages keyed by core/wren-core-py, core/wren, core/wren-core-wasm - .release-please-manifest.json — version anchors at 0.4.0 / 0.3.0 / 0.1.0 matching the prefixed tags pushed during the import
WalkthroughThis PR restructures and modernizes the CI/CD infrastructure by introducing platform-specific Rust build actions, consolidating dependency management, implementing automated release workflows powered by release-please, establishing new component-level CI pipelines, and removing deprecated workflows for AI services, UI, and the Wren launcher. ChangesRust Build Environment Setup
Dependency and PR Management Infrastructure
Release and Publishing Automation
Component-Specific CI Workflows
Deprecated Workflow Removals
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes The PR involves substantial CI/CD infrastructure changes across many workflow files with diverse purposes (removals, additions, configuration). The new release automation requires understanding release-please semantics and publishing workflow dependencies. Component-specific CI workflows introduce new patterns (caching strategies, matrix testing, artifact handling). The removal of legacy workflows requires verification that functionality is not unexpectedly lost or moved elsewhere. Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.Comment |
There was a problem hiding this comment.
Actionable comments posted: 13
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/labeler.yaml (1)
1-13:⚠️ Potential issue | 🟠 MajorPin
actions/labelerto a commit SHA to guard against supply-chain tag-retargeting.Using a mutable tag (
@v5) in apull_request_targetworkflow withpull-requests: writepermissions creates a supply chain attack surface. If thev5tag is compromised or retargeted (as happened with tj-actions/changed-files in March 2025), the malicious code runs with repository write access. This workflow is otherwise safely structured—it does not check out fork code—but the mutable tag must be pinned to a commit SHA.Pin to the v5 release SHA with a human-readable comment:
Pinned action
- - uses: actions/labeler@v5 + - uses: actions/labeler@ccaeba86e2ea5f6fdec4ecc89a79dacc3cc9ebc6 # v5.0.0🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/labeler.yaml around lines 1 - 13, The workflow "Pull Request Labeler" uses a mutable tag for the action "uses: actions/labeler@v5"; replace that mutable tag with the v5 release commit SHA (pin the action to the specific commit) and add a brief human-readable comment noting why it’s pinned (to guard against tag retargeting) while keeping the rest of the job (pull_request_target trigger and pull-requests: write permission) unchanged so the workflow still runs the same but from a fixed, auditable commit.
🧹 Nitpick comments (3)
.github/workflows/pull-request-title-validator.yaml (1)
19-19: Upgrade tov1.5.0to benefit from bug fixes and improvements.The current pinned version
v1.3.2is outdated. The latest release isv1.5.0(2025-05-28), which includes fixes for pull request creation errors and improved test coverage.⬆️ Proposed fix
- uses: kontrolplane/[email protected] + uses: kontrolplane/[email protected]🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/pull-request-title-validator.yaml at line 19, The workflow pins the action to an outdated version (uses: kontrolplane/[email protected]); update that reference to uses: kontrolplane/[email protected] to pull in bug fixes and improvements (replace the version tag in the existing uses line), run CI to verify the workflow still behaves as expected, and commit the updated workflow..github/workflows/rust.yml (1)
38-51: ⚡ Quick winCargo cache is set up only for
linux-build-lib; all dependent jobs rebuild from scratch.
linux-test,linux-test-arm64,clippy, andcargo-toml-formatting-checkseachneeds: [linux-build-lib]but none restore the cache thatlinux-build-libpopulates. Each dependent job therefore re-downloads registry packages and re-compiles from zero, negating the benefit of the cache key. The fix is to add the sameactions/cacheblock (with arestore-keysfallback) to the downstream jobs.Additionally, the comment on Line 47 —
"this key equals the ones on linux-build-lib for re-use"— is self-referential: this block islinux-build-lib. The comment appears to be a copy-paste artefact and should be removed or corrected.♻️ Proposed cache block to add to each dependent job (e.g. linux-test)
- name: Setup Rust toolchain uses: ./.github/actions/rust/setup-builder with: rust-version: stable + - name: Cache Cargo + uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + ./core/wren-core/target/ + key: cargo-cache-benchmark-${{ hashFiles('core/wren-core/Cargo.toml') }} + restore-keys: | + cargo-cache-benchmark-.github/workflows/wren-ci.yml (1)
59-68: 🏗️ Heavy liftThe wheel-build + install steps are copied verbatim into all four test jobs — extract into a dedicated
build-wheeljob.The 3-step block (
pipx install poetry→poetry install --no-root→poetry run maturin build) and the subsequentuv lock --find-links / uv synccommands are identical intest-unit(lines 59–68),test-connector(lines 113–122),test-ui(lines 151–160), andtest-memory(lines 189–198). Each job independently executes a full Rust release compile, which is the costliest part of the pipeline.Factor into a separate
build-wheeljob, upload the wheel as an artifact, and let the four test jobs download it:♻️ Sketch of the proposed refactor
+ build-wheel: + name: build wren-core-py wheel + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + - name: Cache Cargo + uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + ./core/wren-core-py/target/ + key: ${{ runner.os }}-cargo-wren-${{ hashFiles('**/Cargo.lock') }} + - name: Build wheel + working-directory: core/wren-core-py + run: | + pipx install poetry + poetry install --no-root + poetry run maturin build + - name: Upload wheel artifact + uses: actions/upload-artifact@v4 + with: + name: wren-core-py-wheel + path: core/wren-core-py/target/wheels/ + retention-days: 1 + test-unit: name: unit tests + needs: build-wheel runs-on: ubuntu-latest ... steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 ... - name: Install uv uses: astral-sh/setup-uv@v4 - - name: Cache Cargo - ... - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable - - name: Build wren-core-py wheel - working-directory: core/wren-core-py - run: | - pipx install poetry - poetry install --no-root - poetry run maturin build + - name: Download wheel artifact + uses: actions/download-artifact@v4 + with: + name: wren-core-py-wheel + path: core/wren-core-py/target/wheels/ - name: Install dependencies ...Apply the same
needs: build-wheel+ download step totest-connector,test-ui, andtest-memory, and remove the duplicated build blocks from each.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/wren-ci.yml around lines 59 - 68, The workflow duplicates the wheel build and install steps across jobs (see job names test-unit, test-connector, test-ui, test-memory); extract those steps into a single new job named build-wheel that runs the three-step build (pipx install poetry → poetry install --no-root → poetry run maturin build), then uploads the generated wheels as a workflow artifact; update test-unit, test-connector, test-ui, and test-memory to add needs: build-wheel, remove their local build/uv lock/uv sync blocks, and add a step to download the artifact before running uv sync/install so they reuse the prebuilt wheel instead of rebuilding.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/actions/rust/setup-macos-aarch64-builder/action.yaml:
- Around line 28-34: The three hardcoded commands rustup update stable, rustup
toolchain install stable, and rustup default stable should use the action input
${ { inputs.rust-version } } instead of "stable" so callers can pin a specific
toolchain; update those commands to interpolate the rust-version input (and
ensure rustfmt is added for that toolchain when running rustup component add
rustfmt) so the action honors the declared rust-version input.
In @.github/actions/rust/setup-macos-builder/action.yaml:
- Around line 28-34: The action's run block hardcodes "stable" instead of using
the declared input (inputs.rust-version) and calls redundant rustup commands;
update the "Setup Rust toolchain" step to use the input variable (${{
inputs.rust-version }}) for all rustup invocations (e.g., rustup update
<version> / rustup toolchain install <version> / rustup default <version> or
just one appropriate command) and remove the redundant duplicate call so the
step uses the declared rust-version input consistently; locate the run block
shown in the "Setup Rust toolchain" step of action.yaml and replace hardcoded
stable with the inputs.rust-version variable and eliminate unnecessary commands.
In @.github/workflows/core-py-ci.yml:
- Around line 2-4: The workflow's permissions scope is overly broad: replace the
top-level permissions entry that sets "pull-requests: write" with a narrower
permission (set "pull-requests: read") or remove the "pull-requests" key
entirely since no steps use PR write access; update the permissions block so it
only includes "contents: read" and either "pull-requests: read" or no
"pull-requests" key at all to tighten access.
- Around line 23-46: Add an explicit Rust toolchain setup step using
dtolnay/rust-toolchain@stable so the runner uses a fixed Rust version before any
Rust compile/test commands; insert a step (e.g., "uses:
dtolnay/rust-toolchain@stable" with the stable tag) into the workflow steps
before running "cargo test" and "poetry run maturin develop" (placing it before
the Cache Cargo or Install dependencies steps is fine) to ensure reproducible
builds and protect MSRV compatibility.
In @.github/workflows/publish-wren-core-py.yml:
- Around line 14-18: Add an explicit validation step for the workflow input
pypi_target that fails the job unless the value is exactly "pypi" or "testpypi":
implement a short shell step (run:) early in the workflow that reads the input
(github.event.inputs.pypi_target or inputs.pypi_target depending on context),
checks it against the two allowed literals, logs a clear error and exits
non‑zero if it does not match, and ensure the rest of the workflow (and any
downstream expressions that choose repository URL or upload destination) only
runs when the validated value is one of those exact strings; apply the same
validation to the other occurrence referenced (lines 154-168).
In @.github/workflows/publish-wren-core-wasm.yml:
- Around line 67-75: The workflow currently only bumps package.json via the npm
version step; add a step to update core/wren-core-wasm/Cargo.toml to the same
VERSION before building the WASM so the Rust crate and npm RC remain in sync.
After the existing "Set version in package.json" step, run a command in the same
working-directory (core/wren-core-wasm) that sets Cargo.toml's version to ${{
inputs.version }} (e.g., use cargo set-version "$VERSION" if available or a
short sed/perl/TOML edit to replace the version = "..." line) so the Cargo.toml
version matches the npm VERSION used by wasm-pack build. Ensure the step uses
the same env VERSION and runs before the "Build WASM (wasm-pack)" step.
In @.github/workflows/publish-wren.yml:
- Around line 14-18: Add upfront validation to reject any pypi_target values
other than "pypi" or "testpypi": create a pre-publish step named e.g. "Validate
pypi_target" that reads the workflow input (pypi_target) and exits non-zero with
a clear error if the value is not exactly "pypi" or "testpypi"; apply the same
check to the other identical input definitions in this workflow so a typo cannot
default to publishing to the real PyPI.
In @.github/workflows/pull-request-title-validator.yaml:
- Line 21: Update the commit-type list in CONTRIBUTING.md to match the
validator: add the three missing types "revert", "build", and "ci" to the
existing documented list (the line that currently lists "feat, fix, chore,
refactor, test, docs, perf, deps"); ensure wording/format matches surrounding
examples so contributors see these types as valid when creating PRs/titles
validated by the pull-request-title-validator's types setting.
In @.github/workflows/rc-release.yml:
- Around line 45-57: The workflow step "Determine RC version" reads
.release-please-manifest.json using the env var COMPONENT but the manifest keys
are prefixed (e.g. "core/..."); update the Python snippet in that step to
construct the correct manifest key by prefixing "core/" (or otherwise assembling
the full key) from the COMPONENT value and use that assembled key when indexing
manifest (or add a fallback lookup if the unprefixed key exists) so the correct
base version is printed for RC_VERSION_INPUT.
In @.github/workflows/rust.yml:
- Around line 2-4: The workflow grants an overly broad repository permission via
the "pull-requests: write" key; remove that permission from the workflow-level
permissions block (leave "contents: read") and, if any job actually needs PR
write access, grant "pull-requests: write" only at that specific job level
instead of globally so the GITHUB_TOKEN uses least privilege.
In @.github/workflows/sync-docs.yml:
- Around line 58-61: The PR body hardcodes "Canner/wren-engine" in the gh pr
create command, which will point to the wrong repo in WrenAI; update the gh pr
create --body to use a dynamic repo reference (e.g. replace Canner/wren-engine
with a workflow variable like ${{ vars.SOURCE_REPO }} or the built-in ${{
github.repository }}), and if using a custom var ensure SOURCE_REPO is defined
earlier in the workflow; modify the gh pr create call (the command invoking gh
pr create) to interpolate that variable into the commit URL instead of the
hardcoded string.
In @.github/workflows/wren-ci.yml:
- Around line 2-4: The workflow currently grants the top-level GitHub Actions
permission "pull-requests: write" which is unused; modify the permissions block
to remove or change "pull-requests: write" to "pull-requests: read" (or drop the
key entirely) so all five jobs (lint, test-unit, test-connector, test-ui,
test-memory) only have the necessary "contents: read" and no unnecessary PR
write access; update the "permissions:" section to reflect this minimal
permission set for the workflow.
In @.release-please-manifest.json:
- Line 4: The manifest entry for core/wren-core-wasm wrongly claims GA "0.1.0";
update the .release-please manifest entry key "core/wren-core-wasm" to match the
actual shipped tag (e.g., the RC tag such as "0.1.0-rc.1") or remove the entry
until a true GA "0.1.0" is published so release-please doesn't skip the real
first GA; ensure the value exactly matches the repository tag string.
---
Outside diff comments:
In @.github/workflows/labeler.yaml:
- Around line 1-13: The workflow "Pull Request Labeler" uses a mutable tag for
the action "uses: actions/labeler@v5"; replace that mutable tag with the v5
release commit SHA (pin the action to the specific commit) and add a brief
human-readable comment noting why it’s pinned (to guard against tag retargeting)
while keeping the rest of the job (pull_request_target trigger and
pull-requests: write permission) unchanged so the workflow still runs the same
but from a fixed, auditable commit.
---
Nitpick comments:
In @.github/workflows/pull-request-title-validator.yaml:
- Line 19: The workflow pins the action to an outdated version (uses:
kontrolplane/[email protected]); update that reference to
uses: kontrolplane/[email protected] to pull in bug fixes and
improvements (replace the version tag in the existing uses line), run CI to
verify the workflow still behaves as expected, and commit the updated workflow.
In @.github/workflows/wren-ci.yml:
- Around line 59-68: The workflow duplicates the wheel build and install steps
across jobs (see job names test-unit, test-connector, test-ui, test-memory);
extract those steps into a single new job named build-wheel that runs the
three-step build (pipx install poetry → poetry install --no-root → poetry run
maturin build), then uploads the generated wheels as a workflow artifact; update
test-unit, test-connector, test-ui, and test-memory to add needs: build-wheel,
remove their local build/uv lock/uv sync blocks, and add a step to download the
artifact before running uv sync/install so they reuse the prebuilt wheel instead
of rebuilding.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: e558c005-2e1a-4cc9-833c-30676aef5146
📒 Files selected for processing (35)
.github/actions/rust/setup-builder/action.yaml.github/actions/rust/setup-macos-aarch64-builder/action.yaml.github/actions/rust/setup-macos-builder/action.yaml.github/actions/rust/setup-rust-runtime/action.yaml.github/actions/rust/setup-windows-builder/action.yaml.github/dependabot.yaml.github/dependabot.yml.github/labeler.yml.github/workflows/ai-service-release-image.yaml.github/workflows/ai-service-release-nightly-image.yaml.github/workflows/ai-service-release-stable-image.yaml.github/workflows/ai-service-test.yaml.github/workflows/core-py-ci.yml.github/workflows/create-rc-release-pr.yaml.github/workflows/create-rc-release.yaml.github/workflows/labeler.yaml.github/workflows/pr-tagger.yaml.github/workflows/publish-wren-core-py.yml.github/workflows/publish-wren-core-wasm.yml.github/workflows/publish-wren.yml.github/workflows/pull-request-title-validator.yaml.github/workflows/rc-release.yml.github/workflows/release-please.yml.github/workflows/rust.yml.github/workflows/skills-check.yml.github/workflows/sync-docs.yml.github/workflows/ui-lint.yaml.github/workflows/ui-release-image-stable.yaml.github/workflows/ui-release-image.yaml.github/workflows/ui-test.yaml.github/workflows/wasm-ci.yml.github/workflows/wren-ci.yml.github/workflows/wren-launcher-ci.yaml.release-please-manifest.jsonrelease-please-config.json
💤 Files with no reviewable changes (13)
- .github/workflows/create-rc-release-pr.yaml
- .github/dependabot.yaml
- .github/workflows/ai-service-test.yaml
- .github/workflows/create-rc-release.yaml
- .github/workflows/ui-lint.yaml
- .github/workflows/wren-launcher-ci.yaml
- .github/workflows/ai-service-release-stable-image.yaml
- .github/workflows/ui-release-image.yaml
- .github/workflows/ui-test.yaml
- .github/workflows/ai-service-release-image.yaml
- .github/workflows/ui-release-image-stable.yaml
- .github/workflows/pr-tagger.yaml
- .github/workflows/ai-service-release-nightly-image.yaml
| - name: Setup Rust toolchain | ||
| shell: bash | ||
| run: | | ||
| rustup update stable | ||
| rustup toolchain install stable | ||
| rustup default stable | ||
| rustup component add rustfmt |
There was a problem hiding this comment.
rust-version input is declared but stable is hardcoded — callers cannot pin a version.
All three rustup commands ignore ${{ inputs.rust-version }} and unconditionally install/use stable. If any workflow passes a specific toolchain version (e.g. an MSRV check), it is silently overridden. The Linux setup-builder action (lines 36–38) shows the correct pattern.
🐛 Proposed fix
- - name: Setup Rust toolchain
- shell: bash
- run: |
- rustup update stable
- rustup toolchain install stable
- rustup default stable
- rustup component add rustfmt
+ - name: Setup Rust toolchain
+ shell: bash
+ run: |
+ rustup toolchain install ${{ inputs.rust-version }}
+ rustup default ${{ inputs.rust-version }}
+ rustup component add rustfmt🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/actions/rust/setup-macos-aarch64-builder/action.yaml around lines 28
- 34, The three hardcoded commands rustup update stable, rustup toolchain
install stable, and rustup default stable should use the action input ${ {
inputs.rust-version } } instead of "stable" so callers can pin a specific
toolchain; update those commands to interpolate the rust-version input (and
ensure rustfmt is added for that toolchain when running rustup component add
rustfmt) so the action honors the declared rust-version input.
| - name: Setup Rust toolchain | ||
| shell: bash | ||
| run: | | ||
| rustup update stable | ||
| rustup toolchain install stable | ||
| rustup default stable | ||
| rustup component add rustfmt |
There was a problem hiding this comment.
rust-version input is declared but stable is hardcoded — same issue as the aarch64 builder.
All rustup commands ignore ${{ inputs.rust-version }}. Additionally, rustup update stable followed immediately by rustup toolchain install stable is redundant (update already installs/updates the channel).
🐛 Proposed fix
- - name: Setup Rust toolchain
- shell: bash
- run: |
- rustup update stable
- rustup toolchain install stable
- rustup default stable
- rustup component add rustfmt
+ - name: Setup Rust toolchain
+ shell: bash
+ run: |
+ rustup toolchain install ${{ inputs.rust-version }}
+ rustup default ${{ inputs.rust-version }}
+ rustup component add rustfmt🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/actions/rust/setup-macos-builder/action.yaml around lines 28 - 34,
The action's run block hardcodes "stable" instead of using the declared input
(inputs.rust-version) and calls redundant rustup commands; update the "Setup
Rust toolchain" step to use the input variable (${{ inputs.rust-version }}) for
all rustup invocations (e.g., rustup update <version> / rustup toolchain install
<version> / rustup default <version> or just one appropriate command) and remove
the redundant duplicate call so the step uses the declared rust-version input
consistently; locate the run block shown in the "Setup Rust toolchain" step of
action.yaml and replace hardcoded stable with the inputs.rust-version variable
and eliminate unnecessary commands.
| permissions: | ||
| contents: read | ||
| pull-requests: write |
There was a problem hiding this comment.
pull-requests: write is not required by any step in this workflow.
None of the steps (checkout, setup-python, cache, poetry, cargo, pytest) post PR comments or modify PR metadata. Tighten to read or remove the key entirely.
🔒 Proposed fix
permissions:
contents: read
- pull-requests: write
+ pull-requests: read📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| permissions: | |
| contents: read | |
| pull-requests: write | |
| permissions: | |
| contents: read | |
| pull-requests: read |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/core-py-ci.yml around lines 2 - 4, The workflow's
permissions scope is overly broad: replace the top-level permissions entry that
sets "pull-requests: write" with a narrower permission (set "pull-requests:
read") or remove the "pull-requests" key entirely since no steps use PR write
access; update the permissions block so it only includes "contents: read" and
either "pull-requests: read" or no "pull-requests" key at all to tighten access.
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: 3.11 | ||
| - name: Cache Cargo | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.cargo/bin/ | ||
| ~/.cargo/registry/index/ | ||
| ~/.cargo/registry/cache/ | ||
| ~/.cargo/git/db/ | ||
| ./core/wren-core-py/target/ | ||
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
| - name: Install poetry | ||
| run: pipx install poetry | ||
| - name: Install dependencies | ||
| run: poetry install --no-root | ||
| - name: Test Rust and Python code | ||
| run: | | ||
| cargo test | ||
| poetry run maturin develop | ||
| poetry run pytest |
There was a problem hiding this comment.
Missing explicit Rust toolchain setup — cargo test and maturin develop rely on the runner's pre-installed Rust.
Both cargo test (line 44) and poetry run maturin develop (line 45) compile Rust code, but there is no dtolnay/rust-toolchain step here. Every analogous job in wren-ci.yml uses dtolnay/rust-toolchain@stable. The runner's default Rust version is uncontrolled and changes with runner image updates, making this build non-reproducible and fragile against MSRV drift.
🔧 Proposed fix — add toolchain setup before the build steps
- name: Install poetry
run: pipx install poetry
+ - name: Install Rust toolchain
+ uses: dtolnay/rust-toolchain@stable
- name: Install dependencies
run: poetry install --no-root📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.11 | |
| - name: Cache Cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| ./core/wren-core-py/target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Install poetry | |
| run: pipx install poetry | |
| - name: Install dependencies | |
| run: poetry install --no-root | |
| - name: Test Rust and Python code | |
| run: | | |
| cargo test | |
| poetry run maturin develop | |
| poetry run pytest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.11 | |
| - name: Cache Cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| ./core/wren-core-py/target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Install poetry | |
| run: pipx install poetry | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install dependencies | |
| run: poetry install --no-root | |
| - name: Test Rust and Python code | |
| run: | | |
| cargo test | |
| poetry run maturin develop | |
| poetry run pytest |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/core-py-ci.yml around lines 23 - 46, Add an explicit Rust
toolchain setup step using dtolnay/rust-toolchain@stable so the runner uses a
fixed Rust version before any Rust compile/test commands; insert a step (e.g.,
"uses: dtolnay/rust-toolchain@stable" with the stable tag) into the workflow
steps before running "cargo test" and "poetry run maturin develop" (placing it
before the Cache Cargo or Install dependencies steps is fine) to ensure
reproducible builds and protect MSRV compatibility.
| pypi_target: | ||
| description: "Publish target (pypi or testpypi)" | ||
| required: false | ||
| type: string | ||
| default: "pypi" |
There was a problem hiding this comment.
Fail closed on unknown pypi_target values.
These expressions have opposite fallbacks: an invalid value can show a TestPyPI environment URL while still uploading to real PyPI. Add an explicit validation step and abort unless the input is exactly pypi or testpypi.
Suggested fix
publish:
name: Publish to ${{ inputs.pypi_target }}
needs: [build-wheels, build-sdist]
runs-on: ubuntu-latest
environment:
name: ${{ inputs.pypi_target }}
url: ${{ inputs.pypi_target == 'pypi' && 'https://pypi.org/project/wren-core-py/' || 'https://test.pypi.org/project/wren-core-py/' }}
steps:
+ - name: Validate PyPI target
+ run: |
+ case "${{ inputs.pypi_target }}" in
+ pypi|testpypi) ;;
+ *)
+ echo "::error::pypi_target must be 'pypi' or 'testpypi'"
+ exit 1
+ ;;
+ esac
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: trueAlso applies to: 154-168
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/publish-wren-core-py.yml around lines 14 - 18, Add an
explicit validation step for the workflow input pypi_target that fails the job
unless the value is exactly "pypi" or "testpypi": implement a short shell step
(run:) early in the workflow that reads the input
(github.event.inputs.pypi_target or inputs.pypi_target depending on context),
checks it against the two allowed literals, logs a clear error and exits
non‑zero if it does not match, and ensure the rest of the workflow (and any
downstream expressions that choose repository URL or upload destination) only
runs when the validated value is one of those exact strings; apply the same
validation to the other occurrence referenced (lines 154-168).
| - name: Determine RC version | ||
| id: rc | ||
| env: | ||
| RC_VERSION_INPUT: ${{ inputs.rc_version }} | ||
| COMPONENT: ${{ inputs.component }} | ||
| run: | | ||
| # Read current version from manifest | ||
| BASE_VERSION=$(python3 -c " | ||
| import json | ||
| with open('.release-please-manifest.json') as f: | ||
| manifest = json.load(f) | ||
| print(manifest['${COMPONENT}']) | ||
| ") |
There was a problem hiding this comment.
Use the manifest’s real keys when loading the base version.
.release-please-manifest.json is keyed by core/..., but this script indexes it with just ${COMPONENT}. Every manual dispatch will fail in this step before the RC version is computed.
Suggested fix
- name: Determine RC version
id: rc
env:
RC_VERSION_INPUT: ${{ inputs.rc_version }}
COMPONENT: ${{ inputs.component }}
run: |
# Read current version from manifest
- BASE_VERSION=$(python3 -c "
- import json
- with open('.release-please-manifest.json') as f:
- manifest = json.load(f)
- print(manifest['${COMPONENT}'])
- ")
+ BASE_VERSION=$(COMPONENT="$COMPONENT" python3 - <<'PY'
+ import json, os
+
+ manifest_key = f"core/{os.environ['COMPONENT']}"
+ with open(".release-please-manifest.json", encoding="utf-8") as f:
+ manifest = json.load(f)
+ print(manifest[manifest_key])
+ PY
+ )🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/rc-release.yml around lines 45 - 57, The workflow step
"Determine RC version" reads .release-please-manifest.json using the env var
COMPONENT but the manifest keys are prefixed (e.g. "core/..."); update the
Python snippet in that step to construct the correct manifest key by prefixing
"core/" (or otherwise assembling the full key) from the COMPONENT value and use
that assembled key when indexing manifest (or add a fallback lookup if the
unprefixed key exists) so the correct base version is printed for
RC_VERSION_INPUT.
| permissions: | ||
| contents: read | ||
| pull-requests: write |
There was a problem hiding this comment.
pull-requests: write is unnecessary and over-permissive for a pure build/test workflow.
None of the five jobs post PR comments, add labels, or modify PRs in any way. If you specify the access for any of these permissions, all of those that are not specified are set to none — so having this broad scope set at the workflow level means every job's GITHUB_TOKEN can write to PRs, increasing the blast radius if any third-party action in this pipeline is compromised.
🔒 Proposed fix
permissions:
contents: read
- pull-requests: write📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| permissions: | |
| contents: read | |
| pull-requests: write | |
| permissions: | |
| contents: read |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/rust.yml around lines 2 - 4, The workflow grants an overly
broad repository permission via the "pull-requests: write" key; remove that
permission from the workflow-level permissions block (leave "contents: read")
and, if any job actually needs PR write access, grant "pull-requests: write"
only at that specific job level instead of globally so the GITHUB_TOKEN uses
least privilege.
| gh pr create \ | ||
| --title "docs: sync Wren Engine docs from wren-engine" \ | ||
| --body "Auto-synced from [wren-engine@\`${GITHUB_SHA::8}\`](https://github.com/Canner/wren-engine/commit/${GITHUB_SHA})." \ | ||
| --base "${{ vars.DOCS_REPO_BRANCH }}" |
There was a problem hiding this comment.
Hardcoded repository URL will be incorrect in WrenAI repo.
Line 60 hardcodes Canner/wren-engine but this workflow is being added to WrenAI. The PR body will link to the wrong repository.
Proposed fix to use dynamic repository reference
gh pr create \
--title "docs: sync Wren Engine docs from wren-engine" \
- --body "Auto-synced from [wren-engine@\`${GITHUB_SHA::8}\`](https://github.com/Canner/wren-engine/commit/${GITHUB_SHA})." \
+ --body "Auto-synced from [\`${GITHUB_SHA::8}\`](${{ github.server_url }}/${{ github.repository }}/commit/${GITHUB_SHA})." \
--base "${{ vars.DOCS_REPO_BRANCH }}"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/sync-docs.yml around lines 58 - 61, The PR body hardcodes
"Canner/wren-engine" in the gh pr create command, which will point to the wrong
repo in WrenAI; update the gh pr create --body to use a dynamic repo reference
(e.g. replace Canner/wren-engine with a workflow variable like ${{
vars.SOURCE_REPO }} or the built-in ${{ github.repository }}), and if using a
custom var ensure SOURCE_REPO is defined earlier in the workflow; modify the gh
pr create call (the command invoking gh pr create) to interpolate that variable
into the commit URL instead of the hardcoded string.
| permissions: | ||
| contents: read | ||
| pull-requests: write |
There was a problem hiding this comment.
pull-requests: write is unused across all five jobs.
None of the jobs (lint, test-unit, test-connector, test-ui, test-memory) post PR comments or otherwise write to the PR. Drop to read.
🔒 Proposed fix
permissions:
contents: read
- pull-requests: write
+ pull-requests: read📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| permissions: | |
| contents: read | |
| pull-requests: write | |
| permissions: | |
| contents: read | |
| pull-requests: read |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/wren-ci.yml around lines 2 - 4, The workflow currently
grants the top-level GitHub Actions permission "pull-requests: write" which is
unused; modify the permissions block to remove or change "pull-requests: write"
to "pull-requests: read" (or drop the key entirely) so all five jobs (lint,
test-unit, test-connector, test-ui, test-memory) only have the necessary
"contents: read" and no unnecessary PR write access; update the "permissions:"
section to reflect this minimal permission set for the workflow.
| { | ||
| "core/wren-core-py": "0.4.0", | ||
| "core/wren": "0.3.0", | ||
| "core/wren-core-wasm": "0.1.0" |
There was a problem hiding this comment.
Align the manifest with the actually shipped wren-core-wasm tag.
This entry marks 0.1.0 as already released, but the PR notes only the RC tag exists today. That will cause release-please to treat the first GA as already cut and can make the next release PR jump past 0.1.0. Please reconcile the manifest/tag state before enabling this component.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.release-please-manifest.json at line 4, The manifest entry for
core/wren-core-wasm wrongly claims GA "0.1.0"; update the .release-please
manifest entry key "core/wren-core-wasm" to match the actual shipped tag (e.g.,
the RC tag such as "0.1.0-rc.1") or remove the entry until a true GA "0.1.0" is
published so release-please doesn't skip the real first GA; ensure the value
exactly matches the repository tag string.
Summary
Removes all 13 legacy WrenAI workflows (ai-service-, ui-, wren-launcher-ci, create-rc-release*, pr-tagger, old pull-request-title-validator) and replaces them with wren-engine's surviving workflows, repathed for the new
core/layout. Drops the now-archivedibis-serverandmcp-serverfrom release-please.What lands
CI / test workflows (path-edited)
rust.yml—core/wren-core/**pathscore-py-ci.yml—core/wren-core-py/**+core/wren-core/**wren-ci.yml—core/wren/**+ sibling crates;../wren-core-py/target/wheels/left untouched (sibling undercore/)wasm-ci.yml—core/wren-core-wasm/**,core/wren-core/core/**(the innercore/is wren-core's own subfolder),core/wren-core-base/**skills-check.yml— unchangedsync-docs.yml—docs/core/**pathsRelease / publish workflows
release-please.yml— dropsibis-server--*/mcp-server--*outputs and publish jobs; keepswren-core-py,wren,wren-core-wasmpublish-wren-core-py.yml,publish-wren.yml,publish-wren-core-wasm.yml— path-edited (Cargo.toml/pyproject.toml/dist artifact paths tocore/<module>/...)rc-release.yml— choice options narrowed to wren-core-py/wren/wren-core-wasm; ibis/mcp publish jobs droppedMisc workflows
pull-request-title-validator.yaml— wren-engine's version (replaces WrenAI's)labeler.yaml— workflow file unchangedConfigs
.github/dependabot.yml— replaces legacydependabot.yaml; coverscore/wren-core-py,core/wren,core/wren-core,core/wren-core-base,core/wren-core-wasm, plusgithub-actions.github/labeler.yml— path-based auto-labels (core,rust,python,wasm,skills,sdk,documentation,examples,ci,dependencies, plus per-SDK sub-labels).github/actions/rust/— composite actions carried verbatim (audited; noworking-directoryor path refs needed editing)Release-please (03e folded in)
release-please-config.json— dropsibis-server/mcp-serverpackages; remaining packages keyed bycore/wren-core-py,core/wren,core/wren-core-wasm.release-please-manifest.json— version anchorswren-core-py: 0.4.0,wren: 0.3.0,wren-core-wasm: 0.1.0Known release-please anchor mismatch
wren-core-wasm-v0.1.0final tag does not exist on origin — onlywren-core-wasm-v0.1.0-rc.1. Manifest claims 0.1.0 was released. release-please uses the manifest as ground truth, so on the nextfeat(wren-core-wasm):commit it'll bump from 0.1.0 → 0.2.0 (or 0.1.1) regardless. The risk is just that release-please's CHANGELOG generation might span more than expected. Monitor the first auto-generated release PR; if it looks wrong, add awren-core-wasm-v0.1.0lightweight tag (pointing at the same commit as-rc.1) before merging the release PR.Production-safety notes
The
release-please.ymlworkflow triggers on push to main and the publish chain auto-runs on release-PR merges. Both are dormant until secrets are configured:NPM_TOKENforpublish-wren-core-wasm.ymlpublish-wren-core-py.yml/publish-wren.ymlThese come in 04a (secrets-setup). Until then the release-please run will succeed but won't actually publish anything.
Test plan
yamllint .github/passesactionlinton each workflow file (catches typos inpaths:/step refs)release-please.ymltriggers, scans for conventional commits since the manifest anchors, exits cleanly without opening a release PR (no new feat/fix commits since import)What's NOT in this PR
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Chores