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
docs([cos-task-id-uniqueness-validation]): remove from PLAN.md and log to changelog
[._.]/ Adam Eivy5d7e31a12fe1
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 5bdf0619d4..1bf2ea0727 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -36,6 +36,7 @@## Fixed+- **[cos-task-id-uniqueness-validation] Reordering a CoS task list with duplicate task IDs no longer silently drops tasks.** If a hand-edited or corrupted task file holds two tasks sharing the same ID, reordering it previously kept only one and discarded the rest; every task is now preserved, with any collision given a distinct ID.- **[banner-icon-aria-hidden] Screen readers no longer announce the decorative icon on alert banners.** The warning/error/info banners' leading icon is now hidden from assistive tech by default, so only the message text is read aloud instead of an unhelpful icon name preceding it.- **[media-job-sse-transient-reconnect-resilience] A brief network blip mid-render no longer fails the whole image or video generation.** The live progress stream now distinguishes a transient connection hiccup — which the browser silently reconnects, picking up where the render left off — from a real disconnect, so a momentary Wi-Fi/Tailscale drop while a render is in flight no longer aborts it with a "Lost connection to server" error.- **[ollama-context-truncation] Local-Ollama runs no longer silently truncate long prompts to ~4K tokens.** PortOS sends stage prompts to Ollama's OpenAI-compatible `/v1/chat/completions`, which defaults to a ~4K context window and silently drops anything past it — so whole-manuscript editorial passes (the completeness pass concatenates up to 200K chars ≈ 50K tokens) were really only reviewing the tail of the manuscript with no error raised. The toolkit runner now sends a per-request `num_ctx` when the provider config carries one (a new optional `numCtx` provider field, honored by Ollama and ignored by other OpenAI-style endpoints), and `ensureBackendProvider` defaults the Ollama provider to a generous window at boot (`OLLAMA_NUM_CTX` env override, default 32768). LM Studio is unaffected (it sets context at model load). Cloud providers were never affected. This is the urgent half of the editorial context work; the full context-window-aware full-manuscript↔chunked strategy is planned in `docs/plans/2026-05-31-context-aware-manuscript-editorial.md` (`[context-aware-editorial-budgeting]`).diff --git a/PLAN.md b/PLAN.mdindex 24c2eaebdc..8e71d29c52 100644--- a/PLAN.md+++ b/PLAN.md@@ -6,7 +6,6 @@ For project goals, see [GOALS.md](./GOALS.md). For completed work, see [.changelClaimable, well-specified, no decision needed — `/claim`-able. Unordered.-- [ ] [cos-task-id-uniqueness-validation] **CoS task-ID uniqueness — validate at parse, not silently in `reorderTasks`.** Two related risks: (1) `server/lib/taskParser.js` `parseTasksMarkdown` doesn't detect duplicate task IDs — corrupted markdown propagates downstream; either throw on duplicate or warn + dedupe with a suffix. (2) `server/services/cos.js` `reorderTasks` (~line 2781) builds a `new Map(tasks.map(t => [t.id, t]))` which silently collapses duplicates — only the last wins, losing the others on the reorder write-back. Fix order: harden the parser so reorder can rely on uniqueness, then keep the Map-build as-is or assert uniqueness defensively.- [ ] [cos-runner-client-non-json-response-handling] **`cosRunnerClient.js` fetch wrappers — handle non-JSON runner responses.** `spawnAgentViaRunner` and siblings (~`server/services/cosRunnerClient.js:139`) `await response.json()` unconditionally; if the runner returns a 500 HTML error page (e.g. PM2 crash mid-restart) the client crashes with `Unexpected token <` instead of surfacing the runner's actual error. Wrap each parse in `try { JSON.parse(text) } catch { { error: text } }` and propagate the synthesized error so the caller sees a useful message.- [ ] [cos-agent-output-write-amplification] **`appendAgentOutput` write-amplification — already batched via `appendAgentOutputLines`, audit non-runner producers.** CLAUDE.md documents the streaming-producers convention (batched variant + ~250ms debounce + drain on completion); the runner path uses it. Verify every producer that calls `appendAgentOutput` directly (`server/services/cosAgents.js:216`) is human-pace, not a hot loop. If any hot producer is still calling the per-line variant, migrate it. Likely a no-op audit; capture it so the convention doesn't silently drift.- [ ] [cos-on-demand-mark-app-review-started-dedupe] **`evaluateTasks` on-demand loop — dedupe `markAppReviewStarted` calls per app.** When multiple on-demand requests for the same app are queued in a single evaluation cycle (`server/services/cos.js:730`), `markAppReviewStarted` is called once per request — wasted state writes. Collect unique `appId`s before the loop and call once. Nit-level priority.