Redact credentials in textual Planner tool activity
Scrub sensitive assignments before publishing tool text, decode serialized outputs to mask nested content, and redact unchecked deep subtrees. Preserve benign results, token masking, output bounds, and adjacent JSON-like fields. Cover progress, completion, broadcasts, and history replay with regressions. Related streaming verification history: 2 anecdotal records, duration median 1h41m24s, range 7m47s-3h15m. Reused their checks, not their duration as an estimate. Assistant-model: GPT-6.1 Sol (fast) Assistant-workflow: inline Assistant-duration: 16m10s converged, estimated unmeasured Assistant-verification: bun test regression failed: original textual JSON credentials, nested depth, delimiter suffixes, repeated-key performance, and line-numbered credential cases reproduced leaks or slowdown before fixes Assistant-verification: bun test focused passed: apps/server/src/chat/activity.test.ts and apps/server/src/chat/service.test.ts, 52 pass, 0 fail on final code Assistant-verification: bun run fix passed: final formatting and safe lint fixes; 10 existing warnings, 0 errors; no unrelated tracked changes Assistant-verification: bun run types passed: all workspaces and E2E on final code Assistant-verification: bun test passed: final full suite with command-scoped GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=commit.gpgsign GIT_CONFIG_VALUE_0=false; 4025 pass, 3 PostgreSQL skips, 0 fail; no persistent Git config change Assistant-verification: bun run ci failed: first run found generated untracked .atomic todo frontmatter unformatted; subsequent bun run fix repaired it without staging local artifacts Assistant-verification: bun run ci passed: final dprint, oxlint, tokens, design contract, design record, and Impeccable checks; 10 existing warnings, 0 errors, no new design findings Assistant-verification: playwright E2E passed: bun run e2e e2e/harness.e2e.ts e2e/smoke.e2e.ts e2e/responsive-activity.e2e.ts, 33 pass; final affected-spec rerun bun run e2e e2e/harness.e2e.ts, 5 pass, including credential broadcast/history regression Assistant-verification: manual synthetic benchmark passed: repeated sensitive-key identifiers at 20k/40k/80k/160k characters completed in 0.63/0.44/0.88/1.76ms after repair, versus quadratic 93/371/1491ms at 20k/40k/80k before repair Assistant-verification: git passed: staged diff --check; exactly four intended server/test/E2E paths, no .atomic or apps/web changes Assistant-verification: gh read-only passed: PR title/body hash unchanged; no auth/account-switch commands issued User-preference: Keep the active gh account as it is; do not edit the PR title/body or apps/web chat/composer design User-preference: Never push to main; push only with git push --force-with-lease origin planner-live-streaming User-preference: Every subagent must run on a -fast model User-preference: Never stage or commit .atomic; use explicit paths with git add Co-authored-by: Alex Lavaee <lavaman131@github.com>
Parente95c3db
4 files changed+285-2
StackedSplit