Skip to content

log(audit): add repo + fileId to writeAuditEntry failure log#290

Merged
kptdobe merged 1 commit into
mainfrom
log/audit-diagnostic
Jun 9, 2026
Merged

log(audit): add repo + fileId to writeAuditEntry failure log#290
kptdobe merged 1 commit into
mainfrom
log/audit-diagnostic

Conversation

@kptdobe

@kptdobe kptdobe commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • writeAuditEntry currently logs only the raw SDK error on failure — no way to pivot by file in Coralogix
  • Adds repo and fileId to the error payload so failures can be correlated to specific files
  • No functional change — log shape only

Motivation (COR-61)

We have 10,055 writeAuditEntry failures per day but can't tell whether they cluster on a handful of hot files or spread uniformly. The file identity is the missing pivot:

  • If concentrated → specific documents are getting concurrent writes (da-collab + direct browser/API writes racing on the same audit.txt)
  • If spread → something systemic (e.g. R2 throttling, transient network errors)

This diagnostic log is the prerequisite before we can pick the right fix (COR-61).

Test plan

  • Deploy to stage, trigger a PUT on an HTML file, verify Coralogix shows { repo, fileId } next to any writeAuditEntry failed entries
  • Confirm no writeAuditEntry failed entries appear for normal single-writer saves

🤖 Generated with Claude Code

Today's `console.error('writeAuditEntry failed', e)` only carries the SDK
error — there's no way to pivot Coralogix by file to tell whether failures
are concentrated on specific files or spread uniformly. Adding repo and fileId
lets us correlate failed writes with the concurrent-writer data we need to
diagnose COR-61.

No functional change: log-shape only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kptdobe
kptdobe merged commit 8af201b into main Jun 9, 2026
4 of 5 checks passed
@kptdobe
kptdobe deleted the log/audit-diagnostic branch June 9, 2026 12:18
@adobe-bot

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 1.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants