Problem
The editResolutionLogging.test.ts test (added in both PRs #108 and #109 via shared commit b11c265) asserts that handleEditResolution in backend/src/routes/documents.ts contains no console.log statements referencing userId, editId, or documentId.
However, both PRs also contain a revert commit that restored the original console.log PII statement at line 635 of documents.ts:
console.log(`[edit-resolution] incoming ${mode}`, {
userId,
documentId,
editId,
});
This causes 3 of the test suite's tests to fail on every run of npx vitest run.
Reproduction
cd backend && npx vitest run --reporter=verbose
# Output: 3 FAIL in editResolutionLogging.test.ts
Resolution options
Option A (preferred): Remove the PII console.log statements from handleEditResolution in documents.ts as a scoped fix (file a follow-up issue for the full PII audit). The tests were written to enforce this and are correct.
Option B: Delete editResolutionLogging.test.ts from these PRs and file a separate issue for the PII removal with its own PR.
Affected PRs
Relates to issue #71 (PII logging audit).
Problem
The
editResolutionLogging.test.tstest (added in both PRs #108 and #109 via shared commitb11c265) asserts thathandleEditResolutioninbackend/src/routes/documents.tscontains noconsole.logstatements referencinguserId,editId, ordocumentId.However, both PRs also contain a revert commit that restored the original
console.logPII statement at line 635 ofdocuments.ts:This causes 3 of the test suite's tests to fail on every run of
npx vitest run.Reproduction
Resolution options
Option A (preferred): Remove the PII
console.logstatements fromhandleEditResolutionindocuments.tsas a scoped fix (file a follow-up issue for the full PII audit). The tests were written to enforce this and are correct.Option B: Delete
editResolutionLogging.test.tsfrom these PRs and file a separate issue for the PII removal with its own PR.Affected PRs
Relates to issue #71 (PII logging audit).