Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
Merge pull request #395 from atomantic/claim/agent-tui-spawn-truncation-warn-parity
[._.]/ Adam Eivy9983c6de59b6
diff --cc PLAN.mdindex 31a159e203,beb654389f..31d2331acd--- a/PLAN.md+++ b/PLAN.md@@@ -12,9 -12,10 +12,8 @@@ _Nothing currently parked — pick the### Code quality / dedup (from `/simplify` passes)-- [ ] [audit-remaining-getissue-prechecks-in-pipeline-routes] **[LOW][EFF]** Audit the remaining `issuesSvc.getIssue(req.params.id).catch((err) => { throw mapServiceError(err); })` precheck pattern at `server/routes/pipeline.js:601, 683, 759, 785, 799, 1239, 1277, 1348, 1580, 1741`. Several of these handlers call services that themselves do `getIssue` internally on the first read (e.g. `generateStage` ~line 1267; `enqueueVisualImage` ~line 1729) — same pattern as the comic-cover routes we just consolidated, where the precheck was a duplicate `data/issues.json` read with no error-mapping difference. For each site, trace the called service to verify whether its first persisted read is `getIssue(id)` (or an equivalent `PIPELINE_ISSUE_NOT_FOUND` raiser) and drop the precheck where it is strictly redundant; leave precheck-only-error-shape cases alone. Surfaced by /simplify reuse-agent during `[drop-redundant-getissue-precheck-comic-cover-render]`; deferred to keep that PR a one-route consolidation.-### v2.1.0 pre-release review residue (deferred from main→release multi-agent review, 2026-05-16)- - [ ] [agent-tui-spawn-truncation-warn-parity] **[LOW][AI-DISPATCH]** `server/services/agentTuiSpawning.js:177-179` (and the `rawBuffer` slice at line ~273-274) silently slice the head of the same buffers when they cross `OUTPUT_BUFFER_HEADROOM` / `RAW_BUFFER_HEADROOM`, with no warning and no agent-metadata flag. The companion one-shot runner now sets `outputBufferTruncated` and surfaces it through the run record (see `[med-ai-dispatch-server-lib-tuipromptrunner-js-198]`). Long-running CoS agents using `agentTuiSpawning.js` mostly stream to `output.txt` via `appendAgentOutputLines`, so the buffer overflow here is less load-bearing — but the same warn-once + agent-metadata flag would close the visibility gap. Deferred from `[med-ai-dispatch-server-lib-tuipromptrunner-js-198]` to keep that PR scoped.- [ ] [med-importer-server-services-importer-test-js-no] **[MED][IMPORTER]** `server/services/importer.test.js` — no test exercises `existingCanonBlock` dedupe wiring. A regression that wires `null` would silently degrade second-pass imports. Assert `mockRunStagedLLM.mock.calls[0][1].existingCanonBlock` contains a seeded character name.- [ ] [med-canon-server-services-canonusage-js-zero-test] **[MED][CANON]** `server/services/canonUsage.js` — zero test coverage for `getUniverseCanonUsage`. The "Appears-in sort: issueCount desc + alpha tiebreaker" invariant lives at line ~101 with no test. Add a `canonUsage.test.js`.- [ ] [add-emitrunstarted-hook-shape-test-to-runner] **[LOW][TESTS]** `server/services/runner.test.js` has no coverage for `emitRunStarted`'s payload shape — `runner.js:198-204` flattens `provider` to `provider?.name || provider?.id` and falls back `model ?? provider?.defaultModel`, but no test pins that contract. The `executeTuiRun` PTY tests intentionally mock `emitRunStarted`, so a regression in the flattening logic (e.g. dropping the `name` preference or breaking the model fallback) would slip past `tuiPromptRunner.test.js`. Add a focused test that registers a `runnerConfig.hooks.onRunStarted` mock, calls `emitRunStarted({ runId, provider, model })` with `{ name, id, defaultModel }` variants, and asserts the hook payload shape. Surfaced by codex review iter 1 during `[med-tests-no-direct-tests-for-executetuirun-pty]`; deferred because the scope of that PR was `executeTuiRun` (not `runner.js`), and the fix touches a different test file.