Skip to content

fix: preserve capture context across redaction edge cases - #144

Merged
Dhravya merged 2 commits into
mainfrom
capy/fix-capture-redaction-edges
Oct 12, 2026
Merged

Dhravya merged 2 commits into
mainfrom
capy/fix-capture-redaction-edges

Conversation

@Dhravya

@Dhravya Dhravya commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Focused follow-up to #143 / #122. #143 merged before its independent-review corrections were ready; this PR changes only plugin/hooks/lib/redact.js on fresh merged main.

  • Preserve URL schemes when replacing user info, including empty-password URLs whose user name overlaps the scheme suffix.
  • Stop truncated PEM removal at the current formatted tool field's closing quote, retaining subsequent description/timeout fields without exposing the remaining key body.
  • Filter complete multiline quoted credential assignments, bounded to their capture message so later messages remain intact.

Cold source archives pass the existing suites unchanged (32/32 for focused source and scratch #138 integration), syntax checks, official Claude Code 2.1.296 strict plugin validation, 47 positive/20 negative scratch cases, two URL edge assertions, and the independent reviewer's actual-formatter reproductions. Seven official persistent sessions make 15 local synthetic document requests: one merged-main baseline demonstrates the old URL corruption, and 14 corrected captures exercise the fixed paths. Actual normally allowed Bash commands print synthetic PEM/multiline fixtures; capture preserves their description/timeout and useful tool output. Read/signal/pending, original state preservation, same session/namespace, failure retry, and #138's real legacy/v5 adapters remain covered. No paid inference or production backend was used. Probes/artifacts remain outside Git.

No test files, settings, interfaces, tracking/dedup, recall/UI/MCP behavior, workflows, or version metadata change. This remains capture-only protection: original prompt text can reach recall/search unchanged; explicit MCP writes and stored history are not sanitized. Release/cache delivery and #138/#142 version coordination remain separate. Independent re-review of all three corrections is complete with no open finding, including a separate full cold native reproduction and verification of the updated #138 merge tree. Human approval and explicit merge authorization remain required; no merge is authorized.

Open in Capy

Dhravya and others added 2 commits October 12, 2026 11:26
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capy found no issues.

View 3 other findings in Capy.

Open in Capy

@Dhravya
Dhravya merged commit 8e98cb4 into main Oct 12, 2026
5 checks passed

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capy found no issues.

View 1 other finding in Capy.

Open in Capy

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