Skip to content

PR #108 and #109: editResolutionLogging tests fail — PII console.log still present after revert #116

@bmersereau

Description

@bmersereau

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions