发布

  • fix: remove PII from log messages (#1237)

    frostbyte_neo 发布于 2026-02-17 19:58:34 +00:00

    • fix: remove PII from log messages

    Remove entity names, edge facts, and LLM input/output content from log
    messages to prevent personally identifiable information from leaking
    into logs. Replace with UUIDs, counts, and structural metadata only.

    Changes:

    • edge_operations.py: Remove entity names from WARNING logs, replace
      full edge objects and name tuples with UUIDs in DEBUG logs
    • node_operations.py: Remove entity names from WARNING and DEBUG logs,
      log only UUIDs and counts instead of (name, uuid) tuples
    • llm_client/client.py: Replace full message content dump in
      _get_failed_generation_log with message count and role metadata

    Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

    • fix: preserve schema metadata and truncated output in logs

    Address review feedback — the initial PII fix overcorrected by removing
    non-PII debugging context:

    • Restore relation types in edge WARNING logs (schema metadata, not PII)
    • Restore truncated duplicate_name in dedup WARNING (needed for diagnosis)
    • Restore truncated entity name (first 30 chars) in summary WARNING
    • Restore truncated raw LLM output (first 500 chars) in failed generation
      ERROR logs — malformed output is structural, not user content

    Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com


    Co-authored-by: Claude Opus 4.6 noreply@anthropic.com

    下载附件