Phase 464: extend role.update and permission.overwrite span metadata.
Include role name on role.update span.end and targetType on permission.overwrite span.end for P2P permission debugging. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -35,6 +35,8 @@ Expose a single `EventEmitter` API the UI drives over IPC (`apps/pearcord/index.
|
|||||||
| `onboarded`, `identity`, `storagePath`, `db`, `dbPath` | Session state |
|
| `onboarded`, `identity`, `storagePath`, `db`, `dbPath` | Session state |
|
||||||
| `listGuilds()`, `loadGuild(guildId)`, `createGuild({ name, publicListing? })`, `joinInvite(code)` | Guild session |
|
| `listGuilds()`, `loadGuild(guildId)`, `createGuild({ name, publicListing? })`, `joinInvite(code)` | Guild session |
|
||||||
|
|
||||||
|
**v0.8.427 (Phase 464):** `role.update` span.end includes `name`; `permission.overwrite*` span.end includes `targetType`. Bundle: `npm run test:phase464-roles-permissions`. See [ROLES.md](../../docs/ROLES.md), [PERMISSIONS.md](../../docs/PERMISSIONS.md).
|
||||||
|
|
||||||
**v0.8.426 (Phase 463):** `audit.append`, `audit.export` (end metadata), `compliance.snapshot` spans with `guildId`. Bundle: `npm run test:phase463-audit-compliance`. See [AUDIT.md](../../docs/AUDIT.md), [COMPLIANCE.md](../../docs/COMPLIANCE.md).
|
**v0.8.426 (Phase 463):** `audit.append`, `audit.export` (end metadata), `compliance.snapshot` spans with `guildId`. Bundle: `npm run test:phase463-audit-compliance`. See [AUDIT.md](../../docs/AUDIT.md), [COMPLIANCE.md](../../docs/COMPLIANCE.md).
|
||||||
|
|
||||||
**v0.8.425 (Phase 462):** `automod.evaluate` on send; `ban.member`/`kick.member`/`timeout.member` re-verified with `guildId`. Bundle: `npm run test:phase462-moderation-automod`. See [MODERATION.md](../../docs/MODERATION.md), [AUTOMOD.md](../../docs/AUTOMOD.md).
|
**v0.8.425 (Phase 462):** `automod.evaluate` on send; `ban.member`/`kick.member`/`timeout.member` re-verified with `guildId`. Bundle: `npm run test:phase462-moderation-automod`. See [MODERATION.md](../../docs/MODERATION.md), [AUTOMOD.md](../../docs/AUTOMOD.md).
|
||||||
|
|||||||
@@ -5087,7 +5087,11 @@ class PearcordPlatform extends EventEmitter {
|
|||||||
const row = await this.guildRoles.updateRole(this.guild.guild.id, roleId, patch)
|
const row = await this.guildRoles.updateRole(this.guild.guild.id, roleId, patch)
|
||||||
this.guild.gossipRoleUpsert(row)
|
this.guild.gossipRoleUpsert(row)
|
||||||
this.emit('guild-role', row)
|
this.emit('guild-role', row)
|
||||||
span.end({ roleId: row?.id || roleId, guildId })
|
span.end({
|
||||||
|
roleId: row?.id || roleId,
|
||||||
|
guildId,
|
||||||
|
name: String(row?.name || patch.name || '').slice(0, 32)
|
||||||
|
})
|
||||||
return row
|
return row
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.log.error('role.update error', {
|
this.log.error('role.update error', {
|
||||||
@@ -5386,7 +5390,12 @@ class PearcordPlatform extends EventEmitter {
|
|||||||
await this._audit('channel.overwrite', { guildId: this.guild.guild.id, targetId: chId })
|
await this._audit('channel.overwrite', { guildId: this.guild.guild.id, targetId: chId })
|
||||||
this.emit('channel-overwrite', row)
|
this.emit('channel-overwrite', row)
|
||||||
await this._fanoutAppEvent(APP_EVENTS.CHANNEL_PERMISSION_UPDATE, { overwrite: row })
|
await this._fanoutAppEvent(APP_EVENTS.CHANNEL_PERMISSION_UPDATE, { overwrite: row })
|
||||||
span.end({ channelId: chId, guildId, targetId: payload.targetId })
|
span.end({
|
||||||
|
channelId: chId,
|
||||||
|
guildId,
|
||||||
|
targetType: payload.targetType,
|
||||||
|
targetId: payload.targetId
|
||||||
|
})
|
||||||
return row
|
return row
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.log.error('permission.overwrite error', {
|
this.log.error('permission.overwrite error', {
|
||||||
@@ -5434,7 +5443,7 @@ class PearcordPlatform extends EventEmitter {
|
|||||||
await this._fanoutAppEvent(APP_EVENTS.CHANNEL_PERMISSION_DELETE, {
|
await this._fanoutAppEvent(APP_EVENTS.CHANNEL_PERMISSION_DELETE, {
|
||||||
delete: { channelId: chId, targetType, targetId }
|
delete: { channelId: chId, targetType, targetId }
|
||||||
})
|
})
|
||||||
span.end({ channelId: chId, guildId, targetId })
|
span.end({ channelId: chId, guildId, targetType, targetId })
|
||||||
return prev
|
return prev
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.log.error('permission.overwrite.delete error', {
|
this.log.error('permission.overwrite.delete error', {
|
||||||
|
|||||||
Reference in New Issue
Block a user