bareloop 0.27.0 → 0.29.0

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,120 @@ All notable changes to bareloop are documented here. Format:
5
5
  [SemVer](https://semver.org/spec/v2.0.0.html). Pre-1.0: **minor** = a ladder rung or
6
6
  feature lands, **patch** = docs, fixes, scaffolding.
7
7
 
8
+ ## [0.29.0] — 2026-09-26
9
+
10
+ ### Added
11
+
12
+ - **`bareloop` panel (N6/P0/P1)** — a read-only HTTP server (`bareloop panel`, bound to
13
+ `127.0.0.1:4700`) serving a single-page app built from one run list
14
+ (`~/.config/bareloop/runs.jsonl`, populated by `bareloop run`/`bareloop runs backfill`).
15
+ The page reads the library's own `replayRun`/spine/gate-audit functions directly, in-process
16
+ — the same read side `bareloop replay` uses, never a duplicated parser.
17
+ - **Run tab: step-map + per-part cards.** A plan-shape run renders one two-line card per PART
18
+ (scout, plan, each step, each replan, the post-step fix loop, judge when recorded), each
19
+ clickable through to its own slice of the Audit tab; an old-shape (iterations, no
20
+ step-start) run collapses to one "run" card.
21
+ - **Audit tab: Grouped (part → attempt → rounds table) and Flat views**, a search box
22
+ (matches job/runid/model), and All/Writes/Blocked filter chips that auto-open every
23
+ matching group.
24
+ - **Job tab** resolves the real spec (bundle `spec.json`, `jobs/<job>.json`, or the run's own
25
+ job-start record) and shows Success/Guardrails/Tools/Judge-examples fields plus the full
26
+ granted-tools "offered" list.
27
+ - **Run Summary** gained `model` (with provider) and `judge` lines, and a died glyph `[?]`
28
+ distinct from a real failed verdict `[✗]`.
29
+
30
+ ### Changed
31
+
32
+ - **Workflows and History merged into one `Runs` tab**, toggled between a grouped-by-job
33
+ "Workflows" view (default) and a flat "History" view — both built from the one `/api/runs`
34
+ list; `/api/workflows` and the client's `listWorkflows` were deleted.
35
+ - Audit-tab paths shorten to the run's own resolved tree root (`pathShort`) when one can be
36
+ found; an older run with no resolvable root keeps its full absolute path.
37
+
38
+ ### Fixed
39
+
40
+ - **`bareloop replay`'s tool-call count was contaminated by a shared gate-audit sidecar** — a
41
+ sidecar file can carry rows from several runs that happen to reuse the same filename;
42
+ `auditWindow` now scopes every reader (CLI and panel alike) to the run's own
43
+ `job-start`..`job-end` window, so the two can never disagree.
44
+ - **Panel tests bound a fixed port, flaking under a taken port** — every test now asks the OS
45
+ for an ephemeral port (`port: 0`) instead of guessing a free one.
46
+ - Audit tab's "Raw log" leaked an EARLIER unrelated run's rows when a gate-audit sidecar is
47
+ shared across runs; it now shows only this run's own ts-windowed lines, byte-for-byte.
48
+ - A `~2`-style backfill-collision runid (two archived spines sharing a basename in different
49
+ directories) echoed the wrong, unsuffixed runid in the run header and its sibling lookups.
50
+ - `toolCalls`/`behaviour` report `null` (unknown), never a fabricated `0`, when a run has no
51
+ gate-audit sidecar at all.
52
+ - Backfill scans recursively (bounded depth) instead of the top directory plus its immediate
53
+ subdirectories only, and dedups by resolved spine path rather than a filename-derived runid
54
+ (two same-basename spines in different directories are different runs, not duplicates).
55
+ - **Workflows job (parent) row is its latest run**: clicking it opens that run (previously a
56
+ dead click after the Runs-tab merge); the expanded child list shows only OLDER runs, never
57
+ repeating the latest as its own first child; the expand caret appears only when a matching
58
+ older run exists under the active filters/search (not just `runCount > 1`); and the row's
59
+ "selected" state and click target both follow whichever run is actually active
60
+ (`representedRun`) — so a search hit or a History pick on an older run correctly expands
61
+ and highlights that run's job, instead of always marking/opening the job's latest.
62
+ - Various Workflows/History/Audit rendering fixes: rows stay two lines and never wrap; the
63
+ meta-line separator carries a leading space; a died run's "why" line uses one plain
64
+ timestamp format; a run that died before its first step reads "0 of 0 done" (never "0 of
65
+ 1"); the Audit tab distinguishes "no sidecar ever written" from "sidecar exists but empty";
66
+ History's filter chips no longer needed two clicks to register; the desktop list scrolls in
67
+ its own pane and mobile gets a "back to list" affordance; check-type labelling correctly
68
+ falls back to "deterministic" for runs that predate `verdictType` (2026-08-18); no-verdict
69
+ parts (scout/plan/replan/judge) render no result glyph rather than a guessed one; the Run
70
+ tab's step-map numbering and card order matched (F197/F198); Summary's "offered" line shows
71
+ the FULL granted-tools list, never truncated to the top few.
72
+
73
+ ## [0.28.0] — 2026-09-24
74
+
75
+ ### Added
76
+
77
+ - **`bareloop run-u`, `bareloop interview`, `bareloop author`, and `bareloop replay` (+
78
+ `--all`)** — four new CLI commands giving the panel's (N6) planned History/Run/Audit
79
+ surfaces, and any other adopter, a library-backed door onto machinery that previously
80
+ existed only as standalone scripts (`scripts/run-u.mjs`, `scripts/run-interview.mjs`,
81
+ `scripts/run-author.mjs`, `scripts/run-replay.mjs`). Each new command dispatches argv
82
+ straight to a library module's own `main(argv, deps)` — one owner per flag grammar — so
83
+ the CLI and the standalone script converge on the exact same code path. `bareloop replay
84
+ --all <dir>` lists every spine under a directory.
85
+
86
+ ### Changed
87
+
88
+ - **`scripts/run-u.mjs`, `scripts/run-interview.mjs`, `scripts/run-author.mjs`, and
89
+ `scripts/run-replay.mjs` lifted into `src/`** (`src/userrun.js`, `src/interviewrun.js`,
90
+ `src/authorrun.js`, `src/replayio.js`, plus `src/authorreadout.js`, `src/u-patient.js`,
91
+ `src/u-readout.js` moved outright to sit under `tsc`'s `rootDir`). Each script is now a
92
+ thin (~15–20 line) adapter over its library module, the same shape `bin/bareloop.mjs`
93
+ already is over `src/cli.js`. Behaviour-preserving: every `console.log`/`console.error`
94
+ became an injectable `out`/`err`, every `process.exit(n)` became a thrown `ExitSignal(n)`
95
+ caught at the function's own boundary (a library function never calls `process.exit`
96
+ itself), and `process.env`/`process.argv` reads became injectable parameters. Moving this
97
+ code under `rootDir` exposed it to `tsc` for the first time, surfacing and fixing ~26 real
98
+ `strictNullChecks` errors (no `!`, `as any`, or `@ts-ignore`), including one genuine
99
+ type-annotation bug (`humanRuling.text` declared `string?` when the real value flows
100
+ `string|null`).
101
+ - **`src/cli.js`'s bare interactive menu** now lists `run-u`, `interview`, `author`, and
102
+ `replay` alongside the existing commands (previously unlisted even though they already
103
+ existed on the command line), and usage/error text in `src/interviewrun.js`/
104
+ `src/authorrun.js` now names the command actually typed (`bareloop interview`/`bareloop
105
+ author`) instead of a hardcoded script path, when invoked that way.
106
+
107
+ ### Fixed
108
+
109
+ - **`doRun`'s job-end spine read could crash an otherwise-successful run's tail.** A
110
+ hand-rolled `readFileSync(...).split('\n').map(JSON.parse)` outside any try/catch threw
111
+ uncaught on a spine with a malformed/truncated final line (e.g. a process killed
112
+ mid-append). Retargeted onto the existing tolerant `parseJsonl` (now in
113
+ `src/replayio.js`), which skips a bad line instead of throwing.
114
+ - **F193/F194 — the prompt-commit-check's prose-only exemption.** A commit touching a
115
+ registered prompt-register file normally needs Failure/Addresses/Corrects labels plus a
116
+ run citation; a narrow, fail-closed exemption now applies when every changed line in
117
+ every touched prompt-register file is provably prose-only (whitespace or a comment),
118
+ decided by scanning real old/new diff text rather than the commit message. F194 closed a
119
+ follow-up hole where a blank line inserted or deleted inside a still-open template
120
+ literal was misclassified prose-only and wrongly exempted.
121
+
8
122
  ## [0.27.0] — 2026-09-21
9
123
 
10
124
  ### Changed