pi-goal-list-loop-audit 0.38.2 → 0.38.4

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
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.38.4 — human-input zombie stand-down (PR #36 slice) + AVO close (2026-09-02)
4
+
5
+ ### Fixed
6
+ Zombie watchdog no longer aborts while waiting on human input: `pause_goal`, `propose_goal_draft`, `propose_loop_draft`, `propose_loop_refine`, `propose_task_list`, `list_add`, `list_activate`, and `ask_user_question` now stand down the `BUSY + zero stream` abort exactly like `subagent` waits (field: drafting confirm / decision popup / `ask_user_question` looked like a hung provider, the bounded abort parked the dialog and the retry re-opened the same dialog). Own ledger `zombie_run_stood_down_user_input` vs `zombie_run_stood_down_subagent_wait`; genuinely hung streams still abort after the grace window. Selective port of PR #36 `USER_INPUT_WAIT_TOOL_NAMES` + `isUserInputWaitCall` with `heartbeatTick` carve-out; `tests/zombie-user-input-standdown.test.ts` pins the set and the branch.
7
+
8
+ ### Changed
9
+ AVO consideration closed: `audit/AVO-DEEP-DIVE-2026-09-02.md` remains the full read (`Vary(Pt)=Agent(Pt,K,f)`, §3.3 3-sentence supervisor). PR #22 (stagnation nudge, true AVO pattern but P1s: raw HEAD, no fencing, cycling-cap bypass) and PR #36 (commissar not AVO) dispositioned as `no merge as-is`; only the zombie stand-down ships in this release. PRs to be closed.
10
+
11
+ ## 0.38.3 — truncate picker/settings titles to terminal width (PR #41) (2026-09-02)
12
+
13
+ ### Fixed
14
+ `Rendered line N exceeds terminal width` crash when opening `Main/Auditor fallback models` (and `ModelPicker` / `SettingsMenu`) — long help titles now truncated with `truncateToWidth(…, "…")` to the available width, matching existing picker-row truncation. Prevents `pi` TUI crash that made the `glla: [LIVE]` widget disappear between audit/loop iterations and after `page.reload()`/`/reload` (Next item `audit ended between loops, and the ui disappeared` / Screenshot_20260902_121313). Regression test `multi-model-picker: render truncates a long title to the terminal width` pins 140-col rendering.
15
+
3
16
  ## 0.38.2 — thinking selected with model, remove standalone rows (2026-09-02)
4
17
 
5
18
  ### Changed
package/docs/INDEX.md CHANGED
@@ -18,7 +18,7 @@ For shipped docs, the relevant entry points are:
18
18
  failback; v0.35.9 hardened cross-version npm tarball checks; v0.35.10
19
19
  handles multi-entry npm dry-run reports; v0.35.11 accepts both npm report
20
20
  shapes; v0.35.12 supports npm 12's keyed pack reports; v0.35.13 fixes stale-API recovery loops.
21
- v0.35.14–v0.38.2 continue through the supervisor freeze (`/glla pause`),
21
+ v0.35.14–v0.38.4 continue through the supervisor freeze (`/glla pause`),
22
22
  load hold, auditor picker parity, Windows launch fix, zombie-watchdog
23
23
  subagent carve-out, due-wait backstop, the `/glla agents` visibility panel,
24
24
  durable state-root selection, blank-until-resume auditor context, frozen
@@ -202,6 +202,32 @@ const SUBAGENT_WAIT_TOOL_NAMES: ReadonlySet<string> = new Set([
202
202
  const isSubagentWaitCall = (t: { name?: string }): boolean =>
203
203
  typeof t.name === "string" && SUBAGENT_WAIT_TOOL_NAMES.has(t.name);
204
204
 
205
+ // v0.36.1 (field: resume-after-long-decision-wait): a turn blocked INSIDE a
206
+ // tool handler that is waiting on HUMAN input is stream-silent by design —
207
+ // glla's own goal-toolkit verbs await Confirm/select pickers (drafting
208
+ // confirms, decision popups, task-list review), and the structured-question
209
+ // provider blocks in `ask_user_question` for as long as the user is away.
210
+ // The zombie watchdog read that silence as a hung provider stream, aborted
211
+ // the dialog mid-answer ("Operation aborted"), parked the goal, and its
212
+ // one bounded auto-retry re-opened the SAME dialog — so the second silence
213
+ // parked permanently. A human-input wait must stand the zombie branch down
214
+ // exactly like a subagent wait: detection+notify territory (wedge alert),
215
+ // never an abort.
216
+ const USER_INPUT_WAIT_TOOL_NAMES: ReadonlySet<string> = new Set([
217
+ // glla goal-toolkit verbs whose handlers can await user UI:
218
+ "pause_goal", // decision popup (maybeDecisionPopup)
219
+ "propose_goal_draft", // drafting confirm + interview
220
+ "propose_loop_draft",
221
+ "propose_loop_refine",
222
+ "propose_task_list",
223
+ "list_add", // batch drafting interview
224
+ "list_activate", // item activation → drafting
225
+ // structured-question providers (the companion we test against):
226
+ "ask_user_question",
227
+ ]);
228
+ export const isUserInputWaitCall = (t: { name?: string }): boolean =>
229
+ typeof t.name === "string" && USER_INPUT_WAIT_TOOL_NAMES.has(t.name);
230
+
205
231
  // ============================================================================
206
232
  // v0.35.28 (issue #16): due-wait backstop — the durable invariant that a
207
233
  // pauseKind "wait" actually resumes when its pauseResumeAt lapses.
@@ -1350,9 +1376,25 @@ function heartbeatTick(): void {
1350
1376
  // event has not reached the probe registry yet. Once a probe is already
1351
1377
  // stale, however, the same ambiguous tool name must not shield cleanup.
1352
1378
  const subagentWaitInFlight = healthySubagentWait || (inFlightSubagentTool && !staleSubagent);
1353
- if (subagentWaitInFlight) {
1379
+ // v0.37.0: a tool blocking on HUMAN input (decision popups, drafting
1380
+ // confirms, ask_user_question) is legitimately stream-silent for as long
1381
+ // as the user is away — never abort it (see USER_INPUT_WAIT_TOOL_NAMES).
1382
+ // This shield is independent of child-probe health: the parent turn is
1383
+ // waiting on its operator, not on a subagent.
1384
+ const userInputWaitInFlight = [...flags.inFlightToolCalls.values()].some(
1385
+ isUserInputWaitCall,
1386
+ );
1387
+ if (subagentWaitInFlight || userInputWaitInFlight) {
1354
1388
  if (streamSilentMs >= zombieAbortMs && !flags.abortedStandDown) {
1355
- appendLedger(ctx.cwd, "zombie_run_stood_down_subagent_wait", { streamSilentMs });
1389
+ appendLedger(
1390
+ ctx.cwd,
1391
+ subagentWaitInFlight
1392
+ ? "zombie_run_stood_down_subagent_wait"
1393
+ : "zombie_run_stood_down_user_input",
1394
+ {
1395
+ streamSilentMs,
1396
+ },
1397
+ );
1356
1398
  }
1357
1399
  return;
1358
1400
  }
@@ -210,7 +210,7 @@ export class ModelPickerComponent {
210
210
  render(width: number): string[] {
211
211
  const w = Math.max(20, width - 2);
212
212
  const lines: string[] = [];
213
- lines.push(this.theme.fg("accent", this.theme.bold(this.title)));
213
+ lines.push(this.theme.fg("accent", this.theme.bold(truncateToWidth(this.title, w, "…"))));
214
214
  lines.push("");
215
215
  const searchLine = `search: ${this.query}`;
216
216
  lines.push(this.theme.fg("muted", truncateToWidth(searchLine, w, "…") + "▏"));
@@ -322,7 +322,7 @@ export class MultiModelPickerComponent {
322
322
  render(width: number): string[] {
323
323
  const w = Math.max(20, width - 2);
324
324
  const lines: string[] = [];
325
- lines.push(this.theme.fg("accent", this.theme.bold(this.title)));
325
+ lines.push(this.theme.fg("accent", this.theme.bold(truncateToWidth(this.title, w, "…"))));
326
326
  if (this.unorderedSet) {
327
327
  lines.push(this.theme.fg("muted", "selected extensions are loaded by the auditor; order does not matter:"));
328
328
  } else if (this.currentRef) {
@@ -762,7 +762,7 @@ export class SettingsMenuComponent implements Component {
762
762
 
763
763
  const lines: string[] = [];
764
764
 
765
- lines.push(this.theme.fg("accent", this.theme.bold(this.title)));
765
+ lines.push(this.theme.fg("accent", this.theme.bold(truncateToWidth(this.title, Math.max(20, width - 2), "…"))));
766
766
 
767
767
  // v0.28.19: color-only tabs (user call: "dropping the brackets") —
768
768
  // active = accent + bold, inactive = dim. No bracket chrome.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-goal-list-loop-audit",
3
- "version": "0.38.2",
3
+ "version": "0.38.4",
4
4
  "description": "Mission control for autonomous pi: interview-drafted goals, an audited task queue, and forever-loops (metric, spec, project-audit) that run for hours. A detached extension-less auditor process re-verifies every completion with raw evidence without holding the main pi turn; confirmed drafts, decision pauses and consent gates keep you in charge.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "author": "dracon",