Filed by the domain:services execution seat (session session_01ToDPcx9AESFubJkDiFMtKW) from the delivering dev's out_of_scope_findings on #15166. ⛔ Not graded, no domain:* — that is triage's. Expected landing point: packages/plugins/plugin-audit ⇒ domain:services.
The dev deliberately did not file this itself and handed the call to the PM (「filing it is PM's call」), to avoid a duplicate against a PM-created sibling. ⇒ This is that card, filed after a dedupe search with a firing control (6 real hits, no open duplicate).
The finding
packages/plugins/plugin-audit/src/auth-event-audit.ts carries a second, independent copy of both defects that #15166 just fixed in audit-writers.ts:
- Its own process-level boolean —
let failureReported = false — so after the first failure of ANY cause, every later failure of every other cause degrades to debug.
- Its own fixed message literal in
reportAuthEventWriteFailure, printing the ADR-0057 §3.6 / OS_TELEMETRY_DB datasource guidance unconditionally, regardless of what actually failed.
⇒ Exactly the two properties #15166 was graded priority:p1-adjacent for, in a file the fix did not reach.
Why it was not fixed in #15166
The dispatch asked the dev to check whether auth-event-audit.ts shares the reporter, and instructed: fix it only if it is the same reporter, ⛔ otherwise report it rather than widening. It measured: separate reporter, separate boolean, separate message literal ⇒ reported, not widened. ⭐ That was the correct call and this card is its consequence, not a miss.
Why it matters as much as the original
Its callee persistAuthEventAuditRow is also registered in DURABILITY_CRITICAL_CALLEES (scripts/check-durability-degradation-log-level.mjs), whose entire purpose is that durability loss is reported at error. ⇒ The same declared invariant is violated here, on the sign-in/sign-out audit path.
⭐ The file's own docblock states the kinship in as many words: 「Same discipline, and the same reason, as reportAuditWriteFailure in audit-writers.ts」. ⇒ It was written as a deliberate mirror, which is why the fix has to mirror too.
What makes this cheap
Whoever takes it inherits PR #17450's cause-key helper shape verbatim — the same (error code | absent, object) key and the same conditional-remedy pattern via the shared isMissingTableError predicate. ⇒ This is a port, ⛔ not a fresh design, and the ruling that governs it is already recorded on #15166 (#issuecomment-5620232936), including its named falsifier and its ⛔ prohibitions.
⚠️ Do not dispatch before PR #17450 merges — taking it earlier means two devs editing the same package's reporting seam from opposite ends, and the shape to port does not exist on main yet. Re-check with git log origin/main --oneline | grep '(#17450)' on a NON-shallow checkout.
⚠️ ⛔ DURABILITY_CRITICAL_CALLEES is not to be edited — that register is the declaration this restores, not the target.
Refs: #15166 · PR #17450 · packages/plugins/plugin-audit/src/auth-event-audit.ts
Blocked-by: #15166
Generated by Claude Code
Filed by the
domain:servicesexecution seat (sessionsession_01ToDPcx9AESFubJkDiFMtKW) from the delivering dev'sout_of_scope_findingson #15166. ⛔ Not graded, nodomain:*— that is triage's. Expected landing point:packages/plugins/plugin-audit⇒domain:services.The dev deliberately did not file this itself and handed the call to the PM (「filing it is PM's call」), to avoid a duplicate against a PM-created sibling. ⇒ This is that card, filed after a dedupe search with a firing control (6 real hits, no open duplicate).
The finding
packages/plugins/plugin-audit/src/auth-event-audit.tscarries a second, independent copy of both defects that #15166 just fixed inaudit-writers.ts:let failureReported = false— so after the first failure of ANY cause, every later failure of every other cause degrades todebug.reportAuthEventWriteFailure, printing the ADR-0057 §3.6 /OS_TELEMETRY_DBdatasource guidance unconditionally, regardless of what actually failed.⇒ Exactly the two properties #15166 was graded
priority:p1-adjacent for, in a file the fix did not reach.Why it was not fixed in #15166
The dispatch asked the dev to check whether
auth-event-audit.tsshares the reporter, and instructed: fix it only if it is the same reporter, ⛔ otherwise report it rather than widening. It measured: separate reporter, separate boolean, separate message literal ⇒ reported, not widened. ⭐ That was the correct call and this card is its consequence, not a miss.Why it matters as much as the original
Its callee
persistAuthEventAuditRowis also registered inDURABILITY_CRITICAL_CALLEES(scripts/check-durability-degradation-log-level.mjs), whose entire purpose is that durability loss is reported aterror. ⇒ The same declared invariant is violated here, on the sign-in/sign-out audit path.⭐ The file's own docblock states the kinship in as many words: 「Same discipline, and the same reason, as
reportAuditWriteFailureinaudit-writers.ts」. ⇒ It was written as a deliberate mirror, which is why the fix has to mirror too.What makes this cheap
Whoever takes it inherits PR #17450's cause-key helper shape verbatim — the same
(error code | absent, object)key and the same conditional-remedy pattern via the sharedisMissingTableErrorpredicate. ⇒ This is a port, ⛔ not a fresh design, and the ruling that governs it is already recorded on #15166 (#issuecomment-5620232936), including its named falsifier and its ⛔ prohibitions.mainyet. Re-check withgit log origin/main --oneline | grep '(#17450)'on a NON-shallow checkout.DURABILITY_CRITICAL_CALLEESis not to be edited — that register is the declaration this restores, not the target.Refs: #15166 · PR #17450 ·
packages/plugins/plugin-audit/src/auth-event-audit.tsBlocked-by: #15166
Generated by Claude Code