Skip to content

Commit ce60cda

Browse files
committed
Add generated stack runtime matrix and CI verification
1 parent 6d9fd29 commit ce60cda

File tree

16 files changed

+1337
-32
lines changed

16 files changed

+1337
-32
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,51 @@ on:
66

77
jobs:
88
validate:
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
node-version: [20, 22]
913
runs-on: ubuntu-latest
1014
steps:
1115
- uses: actions/checkout@v4
1216
- uses: actions/setup-node@v4
1317
with:
14-
node-version: 22
18+
node-version: ${{ matrix.node-version }}
1519
cache: npm
1620
- run: npm ci
1721
- run: npm run check
22+
23+
generated-runtime-matrix:
24+
runs-on: ubuntu-latest
25+
timeout-minutes: 30
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
scenario:
30+
- landing-react-vite
31+
- frontend-nextjs
32+
- frontend-astro
33+
- frontend-vue-vite
34+
- frontend-nuxt
35+
- frontend-svelte
36+
- frontend-solidjs
37+
- backend-express
38+
- backend-fastify
39+
- backend-hono
40+
- backend-koa-javascript
41+
- backend-nestjs
42+
- fullstack-nextjs
43+
- fullstack-react-api
44+
- microfrontend-workspace
45+
- chrome-extension-react
46+
- chrome-extension-vanilla-ts
47+
- cli-tool
48+
steps:
49+
- uses: actions/checkout@v4
50+
- uses: actions/setup-node@v4
51+
with:
52+
node-version: 22
53+
cache: npm
54+
- run: npm ci
55+
- run: npm run build
56+
- run: node dist/bin/runtime-matrix.js --scenario ${{ matrix.scenario }}

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,25 @@ The format follows Keep a Changelog and the version numbers follow Semantic Vers
66

77
## [Unreleased]
88

9+
## [0.3.0] - 2026-03-26
10+
11+
### Added
12+
13+
- Added a generated-project runtime matrix runner that scaffolds representative stacks, installs dependencies, builds them, and verifies real runtime surfaces or production artifacts.
14+
- Added a GitHub Actions matrix job for generated stack verification alongside the existing repository validation job.
15+
- Added regression coverage that enforces runtime-matrix coverage across every primary project intent and every backend framework surface.
16+
17+
### Changed
18+
19+
- Raised generated frontend and extension project engine declarations to match the current Vite-family toolchain requirements.
20+
- Documented the local runtime-matrix workflow in contributor docs and development docs.
21+
22+
### Fixed
23+
24+
- Added Node compatibility warnings when users choose a custom Node version that is too old for the selected frontend-oriented scaffold.
25+
- Added Node type definitions to generated TypeScript configs so backend, fullstack, and CLI projects build cleanly when they reference `process`.
26+
- Tightened the runtime verifier so CLI JSON checks execute the built binary directly instead of parsing npm wrapper output.
27+
928
## [0.2.3] - 2026-03-25
1029

1130
### Added

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ npm run check
2828
```bash
2929
npm run check
3030
npm run smoke
31+
npm run runtime:matrix -- --scenario backend-hono --scenario cli-tool
3132
```
3233

34+
For generated frontend, extension, and fullstack runtime scenarios, use Node `20.19.0+` or `22.12.0+` so the current Vite-family toolchain can install and build cleanly.
35+
3336
## Pull Request Expectations
3437

3538
- explain what changed and why

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ npm run test
4545
npm run build
4646
npm run check
4747
npm run smoke
48+
npm run runtime:matrix -- --scenario backend-hono --scenario cli-tool
4849
```
4950

5051
## Documentation

docs/development.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ title: Development
88

99
- Node.js 20+
1010
- npm 10+ recommended
11+
- Use Node `20.19.0+` or `22.12.0+` when running generated frontend or extension runtime scenarios locally.
1112

1213
## Local Setup
1314

@@ -24,11 +25,13 @@ npm run build
2425
npm run test
2526
npm run lint
2627
npm run smoke
28+
npm run runtime:matrix -- --scenario backend-hono --scenario cli-tool
2729
```
2830

2931
## Workflow
3032

3133
1. Make changes in `src/`.
3234
2. Run `npm run check`.
3335
3. Use `npm run smoke` for an end-to-end non-interactive scaffold.
34-
4. Update docs when command behavior or generated output changes.
36+
4. Use `npm run runtime:matrix` to verify generated installs, builds, and runtime surfaces for representative stacks.
37+
5. Update docs when command behavior or generated output changes.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ali-dev11/devforge",
3-
"version": "0.2.3",
3+
"version": "0.3.0",
44
"description": "Production-focused AI-native project scaffolding CLI for JavaScript and TypeScript teams.",
55
"license": "MIT",
66
"author": "Ali-dev11",
@@ -50,6 +50,7 @@
5050
"typecheck": "tsc -p tsconfig.json --noEmit",
5151
"test": "node --import tsx --test test/**/*.test.ts",
5252
"check": "npm run lint && npm run typecheck && npm run test && npm run build",
53+
"runtime:matrix": "npm run build && node dist/bin/runtime-matrix.js",
5354
"release:check": "npm run check && npm pack --dry-run --ignore-scripts --cache /tmp/devforge-npm-cache",
5455
"release:patch": "npm version patch",
5556
"release:minor": "npm version minor",

src/bin/runtime-matrix.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env node
2+
import { runRuntimeMatrix } from "../runtime-matrix.js";
3+
4+
runRuntimeMatrix().catch((error: unknown) => {
5+
const message = error instanceof Error ? error.message : String(error);
6+
console.error(message);
7+
process.exitCode = 1;
8+
});

src/engines/decision.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ import type {
1111
ProjectPlan,
1212
RuleCategory,
1313
} from "../types.js";
14+
import {
15+
isNodeVersionSupportedForPlan,
16+
minimumSupportedNodeVersionHint,
17+
} from "../utils/node-compat.js";
1418
import { dedupe } from "../utils/strings.js";
1519

1620
function supportsShadcn(framework: FrontendFramework): boolean {
@@ -169,6 +173,18 @@ export function normalizeProjectPlan(
169173
plan.ai.tools = ["codex"];
170174
}
171175

176+
if (
177+
plan.nodeStrategy === "custom" &&
178+
plan.customNodeVersion &&
179+
!isNodeVersionSupportedForPlan(plan, plan.customNodeVersion)
180+
) {
181+
warnings.push(
182+
`Selected Node.js ${plan.customNodeVersion} is below the recommended minimum for this stack (${minimumSupportedNodeVersionHint(
183+
plan,
184+
)}). Upgrade Node or choose LTS/latest to avoid install and build failures.`,
185+
);
186+
}
187+
172188
if (!plan.testing.enabled) {
173189
plan.testing.runner = "none";
174190
plan.testing.environment = "none";

src/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,13 @@ export { detectEnvironment } from "./engines/environment.js";
66
export { generateProject } from "./engines/generator.js";
77
export { runInstallers } from "./engines/installer.js";
88
export { buildDefaultPlan, collectProjectPlan } from "./engines/prompts.js";
9+
export {
10+
expectedBackendFrameworkCoverage,
11+
expectedIntentCoverage,
12+
getRuntimeScenario,
13+
runRuntimeMatrix,
14+
runtimeScenarioCoverage,
15+
runtimeScenarios,
16+
} from "./runtime-matrix.js";
917
export { buildProjectFiles } from "./templates.js";
1018
export type * from "./types.js";

0 commit comments

Comments
 (0)