fix: remove PII console.log from edit-resolution handler
From the PR description
Summary
- Removed all
console.logcalls from thehandleEditResolutionhandler that emitteduserId,documentId,editId, and internal state at INFO level - These were written during development; in production they link user identities to legal document activity in any log aggregator, conflicting with data minimization under GDPR
console.errorcalls in other handlers (storage, conversion) are untouched - those are genuine failure signals- Also excludes
src/**/__tests__/**from TypeScript compilation so test-only ESM syntax doesn't break the build - Restores error handling for both
document_editsUPDATE calls that were silently swallowed after log removal - Fixes test isolation (was searching for wrong function name
resolveEditHandler, now correctly targetshandleEditResolution)
Closes #71 Closes #86 Closes #94
Changes
backend/src/routes/documents.ts- allconsole.logstatements removed fromhandleEditResolution; DB error handling restored for both UPDATE callsbackend/tsconfig.json- test directories excluded from tsc includebackend/src/lib/__tests__/editResolutionLogging.test.ts- 3 static-analysis tests verifying no PII in handler source; function name corrected
Test plan
- Static analysis tests: no console.log with userId/editId/documentId in handler
- Build and typecheck pass
Our analysis
Strip PII from edit-resolution logs for GDPR data minimization — read the full analysis →
Think the analysis missed something the PR description covers?
Capture this PR into my fork
Download a Markdown prompt that tells Claude how to port every
commit in this PR into your working tree. Run it via
claude -p < capture-pull-80.md from
inside the repo you want the changes in.