Skip to content

chore(redact): remove the dead Redacted<T> wrapper - #92

Closed
sandstream wants to merge 1 commit into
mainfrom
chore/remove-dead-redacted
Closed

sandstream wants to merge 1 commit into
mainfrom
chore/remove-dead-redacted

Conversation

@sandstream

Copy link
Copy Markdown
Owner

What Linus would do: delete the dead code that lies about safety.

Redacted<T> (added 1.15.0, #46) was never threaded through any secret-bearing path — grep confirms zero production references — so it protected nothing, while THREAT_MODEL/CHANGELOG advertised it as a secret-safety mechanism (a false sense of security). The concrete leak it was meant to stop is already fixed where the values actually flow:

So the wrapper + its test are removed rather than kept as advertised-but-inert code. A CHANGELOG [Unreleased] → Removed note records the rationale; the 1.15.0 entry is left intact (history isn't rewritten). Re-introduce only if genuinely wired through resolve→write→sync (exposing via .expose() only at the exec/stdin boundary).

Full suite 1436/0 (TSC confirms nothing imported it). Closes the Redacted item in #81 → #81 fully done.


Generated by Claude Code

`Redacted<T>` (added 1.15.0, #46) was never threaded through any secret-bearing
path — grep confirms zero production references — so it protected nothing while
the THREAT_MODEL/CHANGELOG advertised it as a secret-safety mechanism: a false
sense of security. The concrete leak it was meant to stop is already fixed where
the values actually flow (`safeErrorMessage` in `kit secrets sync`, `redactSecrets`
at log/error boundaries, opt-in `KIT_MEMORY_REDACT` redaction-at-capture).

Delete the wrapper + its test rather than keep advertised-but-inert code. A
CHANGELOG [Unreleased] "Removed" note records the rationale (the 1.15.0 entry is
left intact — history isn't rewritten). Re-introduce only if genuinely wired
through resolve→write→sync. Closes the #81 Redacted item.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg
@github-actions

Copy link
Copy Markdown

✅ Docker image built successfully

  • CLI image: docker.io/sandstream/kit:test

sandstream added a commit that referenced this pull request Jun 24, 2026
…per → 1.25.0 (#99)

Recovers two redaction PRs that conflicted with the 1.23/1.24 work:
- #91 KIT_MEMORY_REDACT=1 masks secret-shaped substrings in content/tool_input
  before they land in memory.db (spillage prevention). Off by default. Integrated
  into the current insertMessage/insertToolUse (post cache-column changes).
- #92 remove the dead src/utils/redacted.ts Redacted<T> wrapper (no importers;
  redactSecrets does the masking).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@sandstream

Copy link
Copy Markdown
Owner Author

Recovered + merged via #99 (1.25.0). This PR conflicted with the 1.23/1.24 work; its change was rebased onto current main and landed there.

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.

2 participants