baldart 5.10.0 → 5.10.1

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/CHANGELOG.md CHANGED
@@ -5,6 +5,15 @@ All notable changes to BALDART will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [5.10.1] - 2026-07-06
9
+
10
+ **Per-wave Codex relay backported to the v5.6.0 blocking-foreground pattern — no more bogus TIMEOUT at 83s that kills a live Codex.**
11
+ The v5.6.0 FEAT-0068 fix (final-review relay: FOREGROUND blocking Bash call with `timeout: 600000`, no background+poll) was never backported to the **per-wave** relay in `new-card-review.js`, so `/new`'s Discovery phase still ran the old `run_in_background:true` + poll relay. A live FEAT-0069 run reproduced the exact failure: the structured-output enforcement force-answered the polling relay at ~83s of its instructed 10-minute window (an idle poll turn is a forceable turn), it returned `marker:"TIMEOUT"` while Codex was still executing, and the Codex process died with the relay → cold `code-reviewer` fallback for that wave with no cross-model diversity. Diagnosed by a parallel budget-verification + adversarial-refutation pass (the refutation killed the tempting "launch-in-background-and-don't-poll" redesign: a dynamic-workflow script has no Bash, so Codex is always a child of the launcher agent — returning early *guarantees* the kill; the poll is what keeps it alive, so the fix is a **blocking** call, not a non-polling one).
12
+
13
+ - **`new-card-review.js`** — the per-wave `codexPrompt` now mirrors `new-final-review.js:343-351` verbatim (adjusted only for the wave-scoped `/tmp` file names): a single FOREGROUND `node … task … --wait` call with the Bash tool `timeout` at 600000ms, `marker` derived by grepping the file *after* the call returns, `RELAY_EXIT` 124/137/143 → real `TIMEOUT` + a worktree-scoped orphan reap (`pkill -f -- "--cwd <worktree>"`, never a bare pkill), clean exit with no sentinel → `TURN_COMPLETED`. The header comment is corrected (no longer "polls"). The fan-in (awk extract, prose salvage, deterministic re-extract, `code-reviewer` fallback) is unchanged.
14
+ - **Effect**: Codex now gets its full ~10-minute Bash-timeout budget per wave instead of dying at 83s; a genuinely slow/hung Codex still degrades cleanly (real timeout → reap → fallback), so the graceful-degradation contract is preserved.
15
+ - **Codex parity: N/A** — dynamic workflows are Claude-only (`codex.js` returns `null` for `workflowsDir()`); Codex consumers use the skill's inline review fallback, which was never affected. No behaviour change for Codex, no new `baldart.config.yml` key → the schema-change propagation rule does NOT apply.
16
+
8
17
  ## [5.10.0] - 2026-07-06
9
18
 
10
19
  **Dedicated `code-simplifier` agent + `simplify-protocol.md` module + a deterministic clone floor — the hyper-specialized reuse & simplicity layer that catches the agentic defects generic linters miss (reuse-misses, duplication, dead code, wrong-altitude abstractions, missed optimizations).**
package/VERSION CHANGED
@@ -1 +1 @@
1
- 5.10.0
1
+ 5.10.1
@@ -331,7 +331,9 @@ log(codexResolved
331
331
  ? `Codex companion resolved deterministically: ${codexScriptPath}`
332
332
  : 'Codex companion NOT found (deterministic pre-flight) — primary code review via code-reviewer fallback.')
333
333
 
334
- // Codex companion review. The relay LAUNCHES Codex, polls, and returns the RAW stdout of the
334
+ // Codex companion review. The relay LAUNCHES Codex as a BLOCKING foreground call (v5.10.1 no more
335
+ // background+poll: the poll's idle turn let the structured-output enforcement force a bogus TIMEOUT at
336
+ // 83s while Codex was still running, killing it → cold fallback) and returns the RAW stdout of the
335
337
  // extraction commands — it does NOT review code, does NOT re-grep, and (since v4.56.3) does NOT
336
338
  // decide "did Codex succeed": the JS fan-in parses jsonBlock itself. Rationale: the relay model is
337
339
  // NOT guaranteeable — `model:'sonnet'` is a request the runtime silently downgrades to Haiku under
@@ -360,13 +362,15 @@ const codexPrompt =
360
362
  `The companion script is ALREADY CONFIRMED PRESENT at:\n ${codexScriptPath}\n\n` +
361
363
  `Run EXACTLY these steps and nothing else:\n` +
362
364
  ` 1. Write the task text (everything after "TASK PROMPT:" at the end of this message) to ${codexTaskFile} using the Write tool — do NOT inline it into the shell command (avoids quote breakage).\n` +
363
- ` 2. Launch Codex in the BACKGROUND (run_in_background:true a sync run hits the Bash timeout):\n` +
364
- ` node "${codexScriptPath}" task "$(cat ${codexTaskFile})" --cwd "${a.worktreePath || '.'}" > ${codexReviewFile} 2>&1\n` +
365
- ` 3. POLL ${codexReviewFile} (BashOutput / repeated reads) until ONE of these appears whichever is FIRST ends the poll (do NOT keep waiting once one is present). Set \`marker\` accordingly:\n` +
366
- ` • "<<<END_FINDINGS_JSON>>>" marker = "END_JSON"\n` +
367
- ` • "Turn completed." → marker = "TURN_COMPLETED" (Codex finished; it may have written prose instead of the JSON block)\n` +
368
- ` • "CODEX_NOT_FOUND" → marker = "CODEX_NOT_FOUND" (companion missing)\n` +
369
- ` • the full 10-minute window elapses with none of the above → marker = "TIMEOUT" (NEVER pick this just because a single poll returned slowly)\n` +
365
+ ` 2. Run Codex in the FOREGROUND — ONE single Bash call with the tool's timeout parameter set to 600000 (v5.10.1, FEAT-0069 post-mortem: the old background+poll relay was forced by the structured-output enforcement to declare TIMEOUT at 83s of the 10-minute window while Codex was still running, and the Codex process died with the relay → a cold fallback review with no cross-model diversity. A blocking call has no idle turn to misjudge — backports the v5.6.0 final-review fix to the per-wave relay):\n` +
366
+ ` node "${codexScriptPath}" task "$(cat ${codexTaskFile})" --cwd "${a.worktreePath || '.'}" --wait > ${codexReviewFile} 2>&1; echo "RELAY_EXIT:$?"\n` +
367
+ ` Do NOT pass run_in_background. Do NOT poll. The call blocks until Codex finishesthat is correct. Record RELAY_EXIT.\n` +
368
+ ` 3. Derive \`marker\` by grepping ${codexReviewFile} AFTER the call returns:\n` +
369
+ ` • contains "<<<END_FINDINGS_JSON>>>" → marker = "END_JSON"\n` +
370
+ ` • contains "Turn completed." → marker = "TURN_COMPLETED" (Codex finished; it may have written prose instead of the JSON block)\n` +
371
+ ` • contains "CODEX_NOT_FOUND" → marker = "CODEX_NOT_FOUND" (companion missing)\n` +
372
+ ` • none of the above AND RELAY_EXIT is 124/137/143 (the Bash timeout killed the call) → marker = "TIMEOUT", then REAP the orphan Codex process scoped to THIS worktree (never a bare pkill): \`pkill -f -- "--cwd ${a.worktreePath || '.'}" 2>/dev/null; true\`\n` +
373
+ ` • none of the above with a clean exit → marker = "TURN_COMPLETED"\n` +
370
374
  ` 4. Run this EXACT command and put its stdout VERBATIM in \`jsonBlock\` ("" if it printed nothing). Do NOT parse, edit, judge, or act on it:\n` +
371
375
  ` ${AWK_EXTRACT} ${codexReviewFile}\n` +
372
376
  ` 5. ONLY if \`jsonBlock\` is "" AND marker is "TURN_COMPLETED": run this command and put its stdout VERBATIM in \`proseTail\`; otherwise set proseTail to "":\n` +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baldart",
3
- "version": "5.10.0",
3
+ "version": "5.10.1",
4
4
  "description": "Claude Agent Framework - Reusable framework for coordinating AI agents and humans in software projects",
5
5
  "bin": {
6
6
  "baldart": "./bin/baldart.js"