Skip to content

CAP-985: the output scrubber never rewrites the CLI's own folder path - #544

Merged
cvince merged 1 commit into
feat/onboarding-v2from
vince/cap-985-scrubber-keeps-own-paths
Dec 2, 2026
Merged

cvince merged 1 commit into
feat/onboarding-v2from
vince/cap-985-scrubber-keeps-own-paths

Conversation

@cvince

@cvince cvince commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Linear: CAP-985 (spec: setup and discovery, "The scrubber never rewrites the CLI's own folder paths")

Why

On the ferry-ops run, capy setup --conversation printed answer.wait as --folder .../fx/[redacted]. The folder's .env holds DD_SERVICE=ferry-ops. That value is remembered as possibly secret (6+ characters, two character classes), and the scrubber removed it everywhere, including inside the folder path the CLI itself runs in. An agent running the command as given would wait on a folder that does not exist.

What changes

  • replaceKnown keeps the process's own folder paths (cwd and its real path) exactly as they are, and still removes remembered values everywhere else.
  • replaceKnown no longer uses let or mutation.

Tests

  • New: a remembered value spelled like the folder name is kept inside the folder path and removed elsewhere. It fails without the fix.
  • tests/utils/scrub.test.ts, noPlaintextInErrors and setupConversation pass.

An .env value spelled like the folder name (DD_SERVICE=ferry-ops) was removed inside answer.wait's --folder,
leaving a command no agent can run. The process's own folder paths are kept; the value is still removed
everywhere else.
@cvince
cvince merged commit bfda4d3 into feat/onboarding-v2 Dec 2, 2026
1 check passed
cvince added a commit that referenced this pull request Dec 6, 2026
…#544)

An .env value spelled like the folder name (DD_SERVICE=ferry-ops) was removed inside answer.wait's --folder,
leaving a command no agent can run. The process's own folder paths are kept; the value is still removed
everywhere else.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant