Skip to content

feat(server): redacted on the write responses and 400 secret_detected in strict mode (#1464, part 2b-2b) - #1509

Merged
ajianaz merged 1 commit into
developfrom
feat/privacy-reporting
Oct 21, 2026
Merged

ajianaz merged 1 commit into
developfrom
feat/privacy-reporting

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

What

HTTP reporting for the privacy filter, as agreed with cloud in uteke-cloud#218: POST /remember and POST /room/remember return redacted (boolean, additive); in strict mode a write with a secret is refused with 400 {"error": "secret_detected", "message": ..., "kinds": [...]} (also PUT /memory), and the value is never echoed. POST /import reports redacted and rejected_secret; ImportResult gains the two counters (also counted in skipped).

Why

Part of #1464. Before this, strict mode would surface as a 500 and clients could not tell that the stored text differs from what they sent. MCP and CLI reporting follow in 2b-2c. Refs #1464.

Testing

  • clippy -D warnings, fmt, cargo test --workspace and cargo run -p docgen (no diff) pass
  • 3 new server tests (redacted flag and masked text, strict 400 on remember, room remember and update with nothing stored, room remember flag); the import counters are asserted in the core import test
  • the pinned key list of the /remember response now includes redacted

@ajianaz
ajianaz force-pushed the feat/privacy-reporting branch from e48e03b to cd7ca64 Compare October 21, 2026 07:29
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 1f22cd8 into develop Oct 21, 2026
15 checks passed
@ajianaz
ajianaz deleted the feat/privacy-reporting branch October 21, 2026 07:37
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