feat(platform): Phase 552 compliance span metadata (v0.8.515)

Extend audit.append with auditEntryCount, audit.export with exportLimit and
remainingExportCapacity, and compliance.snapshot with meshPushed and
archiveAppended for dev-log diagnostics.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-24 13:54:04 -04:00
co-authored by Cursor
parent ac96778032
commit 2daaad3696
2 changed files with 8 additions and 0 deletions
+2
View File
@@ -183,6 +183,8 @@ Expose a single `EventEmitter` API the UI drives over IPC (`apps/pearcord/index.
**v0.8.499 (Phase 536):** Compliance/audit spans extend — `audit.append`/`audit.export`/`compliance.snapshot` end metadata (`spanKind`, `activeChannelId`). UI compliance panel compositor wrappers, audit row `lastAuditRowId` + roving `tabindex`, clipboard compliance busy flags. Bundle: `npm run test:phase536-compliance`. See [COMPLIANCE.md](../../docs/COMPLIANCE.md), [AUDIT_LOG.md](../../docs/AUDIT_LOG.md).
**v0.8.515 (Phase 552):** Compliance spans extend — `audit.append` `auditEntryCount`, `audit.export` `exportLimit`/`remainingExportCapacity`, `compliance.snapshot` `meshPushed`/`archiveAppended`. UI split compliance panels; `.compliance-panel-live`. Bundle: `npm run test:phase552-compliance`. See [COMPLIANCE.md](../../docs/COMPLIANCE.md).
**v0.8.514 (Phase 551):** Moderation spans extend — `kick.member` `memberCount`, `timeout.member` `activeTimeoutCount`, `automod.setConfig` `keywordCount`/`blockInvites`. UI split automod/ban/member panels; `.moderation-panel-live`/`.moderation-modal-live`; clipboard `moderationAutomodTogglesBusy`/`moderationTimeoutModalBusy`. Bundle: `npm run test:phase551-moderation`. See [MODERATION.md](../../docs/MODERATION.md).
**v0.8.498 (Phase 535):** Moderation/automod spans extend — `ban.member`/`kick.member`/`timeout.member`/`automod.*` end metadata (`spanKind`, `activeChannelId`). UI moderation panel compositor wrappers, ban/audit `aria-current=location`, clipboard moderation busy flags. Bundle: `npm run test:phase535-moderation`. See [MODERATION.md](../../docs/MODERATION.md).
+6
View File
@@ -3626,11 +3626,13 @@ class PearcordPlatform extends EventEmitter {
}
await this.db.insert(COLLECTIONS.AUDIT_LOG, entry)
if (this.guild) this.guild.gossipAudit(entry)
const auditRows = await this.db.find(COLLECTIONS.AUDIT_LOG, { guildId }, { limit: 500 })
span.end({
guildId,
action: actionLabel,
hasTarget: !!targetId,
hasDetail: detail != null && String(detail).length > 0,
auditEntryCount: auditRows.length,
spanKind: 'audit.append',
activeChannelId: this.activeChannelId
})
@@ -4054,6 +4056,8 @@ class PearcordPlatform extends EventEmitter {
filter: opts.filter || 'all',
signed: !!signature,
format,
meshPushed: true,
archiveAppended: archived,
spanKind: 'compliance.snapshot',
activeChannelId: this.activeChannelId
})
@@ -4097,6 +4101,8 @@ class PearcordPlatform extends EventEmitter {
filter: opts.filter || 'all',
signed: !!signature,
archived,
exportLimit: limit,
remainingExportCapacity: Math.max(0, limit - entries.length),
spanKind: 'audit.export',
activeChannelId: this.activeChannelId
})