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.
- package/package.json +1 -1
- package/v3/orchestrator.js +28 -12
package/package.json
CHANGED
package/v3/orchestrator.js
CHANGED
|
@@ -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
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
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
|
-
|
|
2347
|
-
|
|
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
|
|