iriai-build 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/v3/orchestrator.js +28 -12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iriai-build",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "Iriai Build tool — AI agent orchestration CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -2327,25 +2327,41 @@ export class Orchestrator {
2327
2327
  // Read verification config from plan.yaml — start QA session if local-server
2328
2328
  const verification = this._readVerificationConfig(feature);
2329
2329
  if (verification && verification.type === "local-server" && verification.url) {
2330
+ let devServerOk = !verification.command; // no command = assume already running
2330
2331
  if (verification.command) {
2331
- // Start the dev server in the background
2332
+ // Start the dev server in the background, await startup or error
2332
2333
  try {
2333
2334
  const featureReposDir = path.join(PROJECT_ROOT, ".features", feature.slug, "repos");
2334
- const proc = cpSpawn("sh", ["-c", verification.command], {
2335
- cwd: featureReposDir,
2336
- stdio: "ignore",
2337
- detached: true,
2338
- });
2339
- proc.unref();
2340
- // Brief wait for server startup
2341
- await new Promise(r => setTimeout(r, 3000));
2335
+ await new Promise((resolve) => {
2336
+ const proc = cpSpawn("sh", ["-c", verification.command], {
2337
+ cwd: featureReposDir,
2338
+ stdio: "ignore",
2339
+ detached: true,
2340
+ });
2341
+ proc.on("error", (err) => {
2342
+ console.error(`[orchestrator] Dev server spawn error: ${err.message}`);
2343
+ resolve(false);
2344
+ });
2345
+ proc.unref();
2346
+ // Brief wait for server startup, then assume OK
2347
+ setTimeout(() => resolve(true), 3000);
2348
+ }).then(ok => { devServerOk = ok; });
2342
2349
  } catch (err) {
2343
2350
  console.error(`[orchestrator] Failed to start dev server for gate review:`, err.message);
2344
2351
  }
2345
2352
  }
2346
- qaUrl = await this.reviewSessions.startQaSession(
2347
- reviewSessionKey, verification.url, { featureId: feature.id }
2348
- );
2353
+ if (devServerOk) {
2354
+ qaUrl = await this.reviewSessions.startQaSession(
2355
+ reviewSessionKey, verification.url, { featureId: feature.id }
2356
+ );
2357
+ } else {
2358
+ // Notify FL so it knows QA session is unavailable
2359
+ const tree = this._signalTrees[feature.slug];
2360
+ if (tree?.featureLead) {
2361
+ writeSignal(path.join(tree.featureLead, SIGNAL.USER_MESSAGE),
2362
+ `WARNING: Dev server failed to start (command: "${verification.command}"). QA live-testing unavailable for this gate review. Proceed with doc review only.`);
2363
+ }
2364
+ }
2349
2365
  }
2350
2366
  }
2351
2367