feat: Make Kimchi Workflows bundle-safe - #43
Merged
Conversation
Kimchi Code ReviewA review is being prepared and will be posted shortly.
What to expectKimchi will analyze the changes in this pull request and post:
The review typically completes within a few minutes. This comment will be updated once the review is ready. Interact with Kimchi
ConfigurationReviews are configured by your organization admin. Powered by Kimchi — AI-powered code review by CAST AI |
Replace prepareWorkflowPackage's import.meta.url-relative read of the framework package.json with package-owned generated metadata, so a bundled executable can prepare a project workflow package without a workflows manifest beside it. prepack regenerates the stamp after the release version injection; a dist:check CI job guards staleness, and a packaging test asserts the packed metadata matches the packed manifest. Unstamped source builds resolve the framework location through an explicit KIMCHI_WORKFLOWS_PACKAGE_DIR, validated to belong to the workflow package, with the on-disk package root as fallback. A Bun compiled-executable regression fixture proves project preparation with no package metadata on disk; Bun ships as a pinned devDependency so local, CI, and release runs share one version. Co-Authored-By: Kimchi <noreply@kimchi.dev>
The project's `.kimchi/workflows` package is now the explicit environment for static validation and focused-test verification. Run and resume prepare it lazily before validating; read-only discovery never installs. - Extract shared toolchain resolution into `src/verification/toolchain.ts` (package-owned declarations, native compiler, runtime module resolver) - Remove `FRAMEWORK_ROOT` / `nearestPackageRoot` fallback in `workflow-candidate-validator.ts` — no production path resolves a toolchain from the physical extension package (`import.meta.url`) - `verify.ts` resolves framework aliases from the project package, not `import.meta.url`; removes `assertInsidePackage` so external-path workflows validate against the central package - `run` / `resume` call `prepareProjectWorkflowPackage` before validation - Update all test fixtures to prepare the project package offline - Switch jiti to its static entry for Bun standalone compatibility Phase 2 of the bundled-kimchi-workflows-extension plan. Co-Authored-By: Kimchi <noreply@kimchi.dev>
Co-Authored-By: Kimchi <noreply@kimchi.dev>
Align the workflows extension with a Node.js 22.19+ floor and make Node and pnpm requirements apply only when a workflow command needs to prepare or verify the project toolchain. - Lower engines.node from >=24 to >=22.19 in package.json and examples - Lower @types/node from ^26.2.0 to ^22.19.18 to match the runtime floor - Add src/host/workflow-prerequisites.ts: probes external node and pnpm commands (not process.versions, which reflects Bun in a compiled binary) and produces concise errors with recovery commands - Wire checkWorkflowPrerequisites into prepareWorkflowPackage (only when installation is required) and verifyWorkflowTest, with test seams - Forward the checkPrerequisites seam through prepareProjectWorkflowPackage - Add compiled-binary test proving the host loads without Node/pnpm on PATH - Add Node 22.19 to the CI test matrix Phase 3 of the bundled-kimchi-workflows-extension plan. Co-Authored-By: Kimchi <noreply@kimchi.dev>
pmateusz
force-pushed
the
feat/bundled-kimchi-workflows
branch
from
August 25, 2026 13:00
fb51030 to
f4cc215
Compare
Test seams bypass the external node/pnpm probe so fixture-based tests never spawn real processes. Also adds ENOENT recovery message test and asserts the prerequisite check fires exactly once per install. Co-Authored-By: Kimchi <noreply@kimchi.dev>
pmateusz
force-pushed
the
feat/bundled-kimchi-workflows
branch
from
August 25, 2026 13:06
f4cc215 to
a8c46c1
Compare
The kimchi-binary-e2e job failed with `bun: not found` because the runner has no Bun on PATH. Add an oven-sh/setup-bun step (pinned to 1.4.0, matching the Kimchi devDependency) before the build step. Co-Authored-By: Kimchi <noreply@kimchi.dev>
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
Prepares the Kimchi Workflows extension for bundling into a standalone Kimchi executable. The release
build now carries its package identity as ordinary code, the project's .kimchi/workflows package is the
sole validation environment (no production path resolves a toolchain from the physical extension
package), and Node.js 22.19+ is the supported floor with actionable prerequisite errors.
What changed
Bundle-safe distribution metadata
versions embedded in source so a compiled binary carries release identity without package-relative
filesystem reads
metadata is stale
Project-owned validation environment
TypeBox, PI types, native TypeScript compiler, and runtime module resolver all resolved through the
project package
import.meta.url (which points into Bun's virtual filesystem in a compiled binary)
external-path workflows validate against the central package
Supported runtime floor and prerequisite UX
process.versions, which reflects Bun in a compiled binary) and produces concise errors with recovery
commands
works without Node or pnpm on PATH