fix(zane): sync current envs, optional n1 - #520
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 18 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
WalkthroughHerbatika is added as a default CI-deployable service with preview and production mappings. n1 becomes opt-in, runtime-provider wiring is reassigned, bootstrap environment plans are updated, and CI development Docker support plus explicit service-list overrides are added. ChangesHerbatika CI integration
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant SetupScript
participant executeScope
participant executePlan
participant RuntimeProviders
participant Herbatika
SetupScript->>executeScope: request default or explicit services
executeScope->>executePlan: pass resolved service IDs
executePlan->>RuntimeProviders: collect provider needs for selected consumers
RuntimeProviders-->>executePlan: provider outputs and target mappings
executePlan->>Herbatika: prepare preview service and environment configuration
Herbatika-->>executePlan: expose CI development runtime on port 3000
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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 |
Greptile SummaryThis PR makes Herbatika the default deployed storefront while retaining N1 as an explicitly selectable optional service.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure related to the previous review threads remains. No blocking failure remains. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
Scope[CI service scope] --> Defaults[Default services]
Scope -->|explicit selection| N1[Optional N1]
Defaults --> Plan[Preview or main plan]
N1 --> Plan
Plan --> Providers[Runtime providers]
Providers --> Zane[Zane deployment]
Zane --> Herbatika[Herbatika]
Zane --> Backend[Medusa and Payload]
Zane -->|when selected| N1
Reviews (4): Last reviewed commit: "fix(zane): generic test URLs, keep local..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/new-engine-ctl/src/contracts/stack-manifest.ts`:
- Around line 153-162: Extract the duplicated DeployableService field mapping
from getZaneService and toDeployableService into a shared
buildDeployableService(service) helper, then reuse it at both call sites. Keep
each existing guard unchanged: getZaneService should only check ci.zane, while
toDeployableService must continue requiring deployable === true.
🪄 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: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 07c64af1-2e85-4848-a8dc-5a663876907e
📒 Files selected for processing (20)
.env.dockerREADME.mdapps/herbatika/package.jsonapps/new-engine-ctl/NEW_ENGINE_CTL_ARCHITECTURE.mdapps/new-engine-ctl/config/stack-inputs.yamlapps/new-engine-ctl/config/stack-manifest.yamlapps/new-engine-ctl/src/__tests__/bootstrap-zane-project.test.tsapps/new-engine-ctl/src/__tests__/local-env.test.tsapps/new-engine-ctl/src/__tests__/scope-preview.test.tsapps/new-engine-ctl/src/contracts/stack-inputs.tsapps/new-engine-ctl/src/contracts/stack-manifest.tsapps/new-engine-ctl/src/orchestration/bootstrap/zane-project.tsapps/new-engine-ctl/src/orchestration/plan.tsapps/new-engine-ctl/src/orchestration/prepare.tsapps/new-engine-ctl/src/orchestration/scope.tsdocker-compose.prod.yamldocker-compose.yamldocker/development/herbatika/Dockerfilescripts/dev/run-zane-preview-lane.shscripts/dev/setup-zane-project.sh
📜 Review details
⚠️ CI failures not shown inline (1)
GitHub Check: Kilo Code Review: Kilo Code Review failed
Conclusion: failure
Review failed: The message could not be delivered
🧰 Additional context used
📓 Path-based instructions (6)
**/package.json
📄 CodeRabbit inference engine (CLAUDE.md)
Use pnpm CLI to add dependencies; never edit package.json directly
Files:
apps/herbatika/package.json
apps/herbatika/**
📄 CodeRabbit inference engine (AGENTS.md)
apps/herbatika/**: Read apps/herbatika/AGENTS.md before editing Herbatika app and follow its specific configuration which overrides root assumptions
Herbatika app runs on http://localhost:3001 and routes work through libs/ui/skills and libs/storefront-data/skills workflows
Files:
apps/herbatika/package.json
apps/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Import UI components using the
@techsio/ui-kitnamespace, not@libs/ui, for runtime apps
Files:
apps/new-engine-ctl/src/__tests__/local-env.test.tsapps/new-engine-ctl/src/orchestration/prepare.tsapps/new-engine-ctl/src/orchestration/plan.tsapps/new-engine-ctl/src/contracts/stack-inputs.tsapps/new-engine-ctl/src/__tests__/bootstrap-zane-project.test.tsapps/new-engine-ctl/src/orchestration/scope.tsapps/new-engine-ctl/src/contracts/stack-manifest.tsapps/new-engine-ctl/src/__tests__/scope-preview.test.tsapps/new-engine-ctl/src/orchestration/bootstrap/zane-project.ts
**/*.{test,spec}.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use Vitest for running tests in backend and UI library projects
Files:
apps/new-engine-ctl/src/__tests__/local-env.test.tsapps/new-engine-ctl/src/__tests__/bootstrap-zane-project.test.tsapps/new-engine-ctl/src/__tests__/scope-preview.test.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Run Biome linting and formatting only on changed files using 'bunx biome check --write path/to/file'
Files:
apps/new-engine-ctl/src/__tests__/local-env.test.tsapps/new-engine-ctl/src/orchestration/prepare.tsapps/new-engine-ctl/src/orchestration/plan.tsapps/new-engine-ctl/src/contracts/stack-inputs.tsapps/new-engine-ctl/src/__tests__/bootstrap-zane-project.test.tsapps/new-engine-ctl/src/orchestration/scope.tsapps/new-engine-ctl/src/contracts/stack-manifest.tsapps/new-engine-ctl/src/__tests__/scope-preview.test.tsapps/new-engine-ctl/src/orchestration/bootstrap/zane-project.ts
apps/**/!(medusa-be)/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use modern React patterns and React 19 for frontend applications in the monorepo
Files:
apps/new-engine-ctl/src/__tests__/local-env.test.tsapps/new-engine-ctl/src/orchestration/prepare.tsapps/new-engine-ctl/src/orchestration/plan.tsapps/new-engine-ctl/src/contracts/stack-inputs.tsapps/new-engine-ctl/src/__tests__/bootstrap-zane-project.test.tsapps/new-engine-ctl/src/orchestration/scope.tsapps/new-engine-ctl/src/contracts/stack-manifest.tsapps/new-engine-ctl/src/__tests__/scope-preview.test.tsapps/new-engine-ctl/src/orchestration/bootstrap/zane-project.ts
🧠 Learnings (6)
📚 Learning: 2026-02-05T14:43:17.404Z
Learnt from: KaiUweCZE
Repo: NMIT-WR/new-engine PR: 324
File: apps/medusa-be/package.json:0-0
Timestamp: 2026-02-05T14:43:17.404Z
Learning: Validate and enforce React 19 compatibility across monorepo workspaces. Since Medusa UI supports React 19 via root package.json overrides and Medusa Cloud prerequisites show React 19 overrides for npm workspaces, ensure workspace root and all relevant package.json files align with React 19 (18+ requirement is satisfied). When reviewing, verify that overrides exist in the root package.json and that dependent packages in apps or packages directories declare React 19 (or compatible) in their peerDependencies or dependencies as appropriate for workspace usage.
Applied to files:
apps/herbatika/package.json
📚 Learning: 2026-05-07T19:05:58.339Z
Learnt from: redeyecz
Repo: TechsioCZ/new-engine PR: 390
File: apps/medusa-be/package.json:78-81
Timestamp: 2026-05-07T19:05:58.339Z
Learning: When reviewing changes to `package.json`, do not automatically flag dependency additions/removals as "manually edited" or as "bypassing the pnpm lockfile" just because the `package.json` diff shows only that file changed. First verify whether `pnpm-lock.yaml` is missing the corresponding entries. Since `pnpm add` updates both `package.json` and `pnpm-lock.yaml` together, legitimate changes can appear in the `package.json` diff while still being properly tracked in the lockfile.
Applied to files:
apps/herbatika/package.json
📚 Learning: 2026-05-20T15:58:53.048Z
Learnt from: redeyecz
Repo: TechsioCZ/new-engine PR: 413
File: apps/medusa-be/package.json:77-80
Timestamp: 2026-05-20T15:58:53.048Z
Learning: When reviewing monorepo `package.json` files, treat any dependencies/devDependencies using the `paykit-sdk/*` scope (e.g., `paykit-sdk/core`, `paykit-sdk/stripe`, `paykit-sdk/comgate`, `paykit-sdk/gopay`) as coming from the TechsioCZ/new-engine private npm registry. Do not flag dependency version constraints (e.g., `^1.2.0`) as invalid merely because those packages/versions are not found on the public npm registry. Public-web/private-web availability checks against the public npm API are not applicable for these packages; if validation is needed, rely on the private registry/CI install behavior instead.
Applied to files:
apps/herbatika/package.json
📚 Learning: 2026-02-25T14:46:02.729Z
Learnt from: redeyecz
Repo: TechsioCZ/new-engine PR: 335
File: apps/zane-operator/src/db.ts:205-207
Timestamp: 2026-02-25T14:46:02.729Z
Learning: Enforce PostgreSQL 18+ as the minimum version across docker-compose files. Since the repo uses postgres:18.1-alpine (evidence in docker-compose.yaml), ensure all docker-compose service images for PostgreSQL use 18.1-alpine or newer. When reviewing, look for postgres images with a tag below 18 (e.g., postgres:<older-version>) and update to 18.1-alpine or a newer compatible tag. This guideline applies to all docker-compose YAML files that define PostgreSQL services.
Applied to files:
docker-compose.yaml
📚 Learning: 2026-05-07T22:45:20.745Z
Learnt from: BleedingDev
Repo: TechsioCZ/new-engine PR: 397
File: docker/development/medusa-be/Dockerfile:34-38
Timestamp: 2026-05-07T22:45:20.745Z
Learning: For pnpm-based monorepo Dockerfiles that run `pnpm fetch --frozen-lockfile`, ensure the `patches/` directory is copied into the image (e.g., `COPY patches ./patches`) before running `pnpm fetch`. pnpm’s `fetch` reads `patchedDependencies` from the lockfile/workspace configuration and will fail (e.g., `ERR_PNPM_PATCH_NOT_FOUND`) if patch files aren’t present yet—do not move the `COPY patches` step to after `pnpm fetch`.
Applied to files:
docker/development/herbatika/Dockerfile
📚 Learning: 2026-05-07T22:45:38.566Z
Learnt from: BleedingDev
Repo: TechsioCZ/new-engine PR: 397
File: docker/development/n1/Dockerfile:40-44
Timestamp: 2026-05-07T22:45:38.566Z
Learning: When building this repo in Docker, ensure the `patches/` directory is copied into the image (e.g., `COPY patches ./patches`) before running `pnpm fetch --frozen-lockfile`. `pnpm fetch` validates `patchedDependencies` patch file paths from `pnpm-workspace.yaml`/`package.json`, and if `./patches` doesn’t exist yet it will fail with `ERR_PNPM_PATCH_NOT_FOUND`. Place the `COPY patches` step before the `RUN pnpm fetch` step in the relevant service Dockerfiles; this ordering is intentional and should not be flagged as an unnecessary cache-busting change.
Applied to files:
docker/development/herbatika/Dockerfile
🪛 ast-grep (0.44.1)
apps/new-engine-ctl/src/orchestration/scope.ts
[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFile } from "node:child_process"
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFile } from "node:child_process"
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFile } from "node:child_process"
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
(detect-child-process-typescript)
🪛 dotenv-linter (4.0.0)
.env.docker
[warning] 37-37: [UnorderedKey] The DC_HERBATIKA_NEXT_PUBLIC_PPL_WIDGET_API_KEY key should go before the DC_HERBATIKA_NEXT_PUBLIC_STOREFRONT_AUTH_MODE key
(UnorderedKey)
🪛 LanguageTool
apps/new-engine-ctl/NEW_ENGINE_CTL_ARCHITECTURE.md
[uncategorized] ~141-~141: Possible missing comma found.
Context: ...cted-service scope and ordinary preview baselines while preserving explicit `--services...
(AI_HYDRA_LEO_MISSING_COMMA)
🔇 Additional comments (21)
apps/new-engine-ctl/NEW_ENGINE_CTL_ARCHITECTURE.md (1)
121-143: LGTM!apps/new-engine-ctl/config/stack-inputs.yaml (3)
265-296: Providertarget_envsand the newlocal_env_aliasesentries stay in sync (both useNEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEYforn1/herbatika, andmeili_api_credentials.frontend_keyremainsn1-only with a matching alias). Consistent with the alias-mismatch guard.LGTM!
544-544: 🔒 Security & Privacy | ⚡ Quick winConfirm dropping
n1fromforbidden_service_envis intended.
preview_verification.forbidden_service_envswappedn1→herbatika. Sincen1stays explicitly deployable (--services-csv n1), explicitn1preview runs would no longer be verified against leaking these DB/Zane secret keys. Ifn1can still be deployed, consider keeping both entries rather than replacing.
341-344: LGTM!Also applies to: 413-430, 894-899
apps/new-engine-ctl/config/stack-manifest.yaml (1)
52-52: LGTM!Also applies to: 68-68, 185-215
apps/new-engine-ctl/src/contracts/stack-manifest.ts (1)
13-13: Both default paths converge onenabled_by_default: true(object-level defaultdefaultCiConfigon the ci schema bypasses inner field defaults, so adding it todefaultCiConfigis necessary and correct).listLaneServiceIds(defaultOnly)wiring is sound.LGTM!
Also applies to: 55-55, 83-83, 107-107, 196-209
apps/new-engine-ctl/src/contracts/stack-inputs.ts (1)
510-526: Consumer-aware check reads correctly: only requested IDs that are genuinetarget_envsconsumers but lack a matched alias raise. This aligns with the three newlocal-env.test.tscases.LGTM!
apps/new-engine-ctl/src/orchestration/bootstrap/zane-project.ts (2)
12-12: Selection flow is consistent:n1's conditional plan spread is gated byn1Slug, which is present inserviceSlugByIdexactly whenn1is inbootstrapServices(inspected zane services), so there is no orphaned or missing plan lookup.herbatikabecoming the required slug mirrors the previousn1-required contract now that it is the default storefront.LGTM!
Also applies to: 537-538, 545-550, 1387-1518, 2138-2158
871-984:NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEYis correctly left out of theherbatikaenv plan (runtime-provider-owned) while only theDC_-prefixed key is retained for cleanup, matching the bootstrap/sync prohibition in the architecture doc. RESENDfirstNonEmptyfallbacks and the storefront-URL/herbatika fallback behave as asserted by the new test.LGTM!
Also applies to: 1009-1014, 1148-1169, 1297-1341, 1711-1711
apps/new-engine-ctl/src/orchestration/prepare.ts (1)
49-51: LGTM!.env.docker (1)
35-38: LGTM!apps/new-engine-ctl/src/__tests__/bootstrap-zane-project.test.ts (1)
34-238: Solid end-to-end coverage: default set excludesn1, opt-in path includes it, and the compose-parity check guards against drift between the plan anddocker-compose.yaml. Uses Vitest as required.LGTM!
apps/new-engine-ctl/src/__tests__/local-env.test.ts (1)
19-74: LGTM!apps/herbatika/package.json (1)
7-7: LGTM!docker-compose.prod.yaml (1)
44-44: LGTM!docker-compose.yaml (1)
217-217: LGTM!Also applies to: 336-336
docker/development/herbatika/Dockerfile (1)
27-55: LGTM!Also applies to: 74-82
README.md (1)
88-88: LGTM!scripts/dev/run-zane-preview-lane.sh (1)
49-49: LGTM!scripts/dev/setup-zane-project.sh (1)
22-22: LGTM!Also applies to: 65-65, 84-84, 136-139, 309-309, 1380-1388, 1453-1458
apps/new-engine-ctl/src/orchestration/plan.ts (1)
86-93: 📐 Maintainability & Code QualityRun Biome formatting on the changed TypeScript files.
These files are covered by the app TypeScript guideline, so
bunx biome check --writeneeds to complete with exit code 0 before this can be considered addressed.
|
🎉 This PR is included in version 0.28.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary by CodeRabbit
--services-csv, including explicit N1 deployment support.