Phase 472: complete moderation/audit roadmap and refresh documentation

Mark Phase 472 complete, add Phase 473 roles plan, and document moderation
depth, audit signed spans, and agentctl phase472 bundle.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-24 03:01:51 -04:00
co-authored by Cursor
parent 14637b884a
commit 0674f177d9
4 changed files with 125 additions and 52 deletions
+9
View File
@@ -206,6 +206,15 @@ PEARCORD_SKIP_MESH_ROUNDTRIP=1 npm run test:agentctl-phase444-notifications
Chains notification/inbox smokes, platform `notification.markRead`/`notification.markAll`/`inbox.mark-read` error logs, dev-log **notification-errors** + **inbox-errors** filters (tightened span match), notification row `aria-current`, mark-all banner Escape, body truncation, forum notif place context, composer autofocus after mark-all/open-notification (`composer-focus-channel` IPC), `notificationInboxCount` clipboard meta, server-rail guild-loading aria-label, threads panel unread total badge, and Phase 443 threads regression.
**Moderation depth (v0.8.435):** Primary Phase 472 verification — combined bundle:
```bash
npm run test:phase472-moderation-audit
PEARCORD_SKIP_MESH_ROUNDTRIP=1 npm run test:agentctl-phase472-moderation
```
Extends Phase 446 moderation/audit bundle with extended `syncModerationPanelsDuringGuildLoading` (audit sync, automod inputs, ban list, member mod actions), `#composer-moderation-hint`, platform span metadata (`hasReason`/`banCount`/`until`/`signed`), dev-log clipboard `guildBanCount`/`automodEnabled`, tightened **moderation-errors** + **audit-errors** filters, and Phase 471 threads regression. Agentctl re-runs Phase 446 moderation/audit (`test:agentctl-phase446-moderation-audit` alias).
**Threads depth (v0.8.434):** Primary Phase 471 verification — combined bundle:
```bash
+2
View File
@@ -2,6 +2,8 @@
Pearcord records **local audit entries** in HyperDB (`@pearcord/audit-log`) for moderation actions. There is no central audit API — each peer stores what it observes and performs.
**v0.8.435 (Phase 472):** Audit panel guild-loading guards consolidated under extended `syncModerationPanelsDuringGuildLoading`; platform `audit.export` span `end` adds `signed`. Dev-log **audit-errors** tightened re-verify. Bundle: `npm run test:phase472-moderation-audit`.
**v0.8.426 (Phase 463):** `audit.append` span on every `_audit()` row; `compliance.snapshot` span on export gossip; `audit.export` `span.end` includes `guildId`. Dev-log **audit-errors** matches `audit.export|audit.append|compliance.snapshot`. UI: pagination, action badges, export `aria-live` status. Bundle: `npm run test:phase463-audit-compliance`.
**v0.8.409 (Phase 446):** Platform `audit.export` span includes `guildId`, `format`, and `filter` metadata. Dev-log **audit-errors** filter tightened to `/audit\.export/` platform error lines only. Audit modal empty state is filter-specific (`All` / `Automod` / `Automation` / `Moderation`) with `role="status"` + `aria-live="polite"`. Signed CSV badge polish (`formatAuditCsvSigBadge`: P2P-signed snapshot hint, HMAC verified locally, `role="status"`). Permission toast: “You need Manage Server permission to export the audit log.” Dev-log `auditEntryCount` respects active export filter chip (`auditLogExportFilter`). Bundle: `npm run test:phase446-moderation-audit`.
+2
View File
@@ -2,6 +2,8 @@
Pearcord enforces moderation **locally** on each peer; gossip propagates actions so views stay aligned.
**v0.8.435 (Phase 472):** `syncModerationPanelsDuringGuildLoading` now wraps audit sync, automod settings inputs, ban list rows, member mod action buttons, and `#composer-moderation-hint` (ban count / automod / timeout hints). Platform spans: `ban.member` `hasReason`/`banCount`; `kick.member` `hasReason`; `timeout.member` `until`; `audit.export` `signed`. Dev-log clipboard: `guildBanCount`, `automodEnabled`. Bundle: `npm run test:phase472-moderation-audit`; agentctl: `npm run test:agentctl-phase472-moderation`.
**v0.8.425 (Phase 462):** `syncModerationPanelsDuringGuildLoading` closes member popovers, sets `#members-list` `aria-busy` during guild switch. Dev-log **moderation-errors** matches `ban.member|kick.member|timeout.member` only (automod split to **automod-errors**). Bundle: `npm run test:phase462-moderation-automod`; agentctl: `npm run test:agentctl-phase462-moderation`.
**v0.8.409 (Phase 446):** Platform `ban.member`/`kick.member`/`timeout.member` spans include `guildId` metadata. Dev-log **moderation-errors** filter tightened to `ban.member|kick.member|timeout.member|automod.` platform error lines. Permission toasts for ban/kick/timeout; timeout modal validates 140320 minutes. Server settings **Safety** shows ban list (`view.guildBans`) with empty-state hint. Member profile popover adds Timeout/Kick/Ban for moderators. Composer autofocus after kick/ban. Clipboard meta: `banCount`, `memberTimeoutCount`. Bundle: `npm run test:phase446-moderation-audit`.
+112 -52
View File
@@ -9333,62 +9333,121 @@ Fix guild switching, session boot gating, and theme/prefs application before mic
---
### Phase 472 — Moderation depth (v0.8.435)
### Phase 472 — Moderation depth (v0.8.435)
| ID | Item | Status |
|----|------|--------|
| P472-1 | Moderation: ban member roundtrip re-verify | [ ] |
| P472-2 | Moderation: kick member roundtrip re-verify | [ ] |
| P472-3 | Moderation: timeout member roundtrip re-verify | [ ] |
| P472-4 | Moderation: unban roundtrip re-verify | [ ] |
| P472-5 | Audit: export log roundtrip re-verify | [ ] |
| P472-6 | UI: `syncModerationPanelsDuringGuildLoading` wrapper extend | [ ] |
| P472-7 | UI: ban list guild-loading guard extend | [ ] |
| P472-8 | UI: audit log panel guild-loading guard extend | [ ] |
| P472-9 | UI: automod panel guild-loading guard extend | [ ] |
| P472-10 | Platform: `ban.member` span metadata extend | [ ] |
| P472-11 | Platform: `kick.member` span metadata extend | [ ] |
| P472-12 | Platform: `timeout.member` span metadata extend | [ ] |
| P472-13 | Platform: `audit.export` span metadata extend | [ ] |
| P472-14 | Logging: dev-log **moderation-errors** filter tighten | [ ] |
| P472-15 | Logging: dev-log **audit-errors** filter tighten | [ ] |
| P472-16 | Logging: dev-log clipboard moderation meta extend | [ ] |
| P472-17 | Agentctl: ban member headless re-verify | [ ] |
| P472-18 | Agentctl: kick member headless re-verify | [ ] |
| P472-19 | Agentctl: combined phase472 moderation bundle | [ ] |
| P472-20 | Smoke: moderation-guild-loading-extend | [ ] |
| P472-21 | Smoke: moderation-panels-guild-loading-extend | [ ] |
| P472-22 | Smoke: dev-log-moderation-errors-tighten | [ ] |
| P472-23 | Smoke: dev-log-audit-errors-tighten | [ ] |
| P472-24 | UI: composer moderation hint | [ ] |
| P472-25 | UI: ban list empty-state hints polish | [ ] |
| P472-26 | UI: audit log filter chips keyboard re-verify | [ ] |
| P472-27 | UI: profile mod actions polish | [ ] |
| P472-28 | Permissions: ban gate toast polish | [ ] |
| P472-29 | Permissions: kick gate toast polish | [ ] |
| P472-30 | Permissions: timeout gate toast polish | [ ] |
| P472-31 | Docs: `MODERATION.md` refresh | [ ] |
| P472-32 | Docs: `AUDIT_LOG.md` refresh | [ ] |
| P472-33 | Docs: `AGENTCTL.md` phase 472 bundle | [ ] |
| P472-34 | Regression: threads phase 471 smokes still pass | [ ] |
| P472-35 | Regression: search phase 470 smokes still pass | [ ] |
| P472-36 | Boot: session ready gate | [ ] |
| P472-37 | Boot: pear run gate | [ ] |
| P472-38 | Module: `pearcord-platform` README moderation section | [ ] |
| P472-39 | Module: `pearcord-automod` README accuracy | [ ] |
| P472-40 | Smoke: platform-moderation-span-metadata-extend | [ ] |
| P472-41 | Mesh: ban gossip roundtrip re-verify | [ ] |
| P472-42 | Mesh: audit log sync roundtrip re-verify | [ ] |
| P472-43 | UI: automod rule list keyboard roving re-verify | [ ] |
| P472-44 | UI: audit export signed CSV badge polish | [ ] |
| P472-45 | UI: member profile timeout badge polish | [ ] |
| P472-46 | Smoke: dev-log-clipboard-moderation-meta extend | [ ] |
| P472-47 | UI: composer autofocus after mod action re-verify | [ ] |
| P472-48 | Agentctl: audit export headless re-verify | [ ] |
| P472-49 | UI: lurker mod deny toast polish | [ ] |
| P472-50 | Phase 473 roles depth (v0.8.436) | [ ] |
| P472-1 | Moderation: ban member roundtrip re-verify | [x] |
| P472-2 | Moderation: kick member roundtrip re-verify | [x] |
| P472-3 | Moderation: timeout member roundtrip re-verify | [x] |
| P472-4 | Moderation: unban roundtrip re-verify | [x] |
| P472-5 | Audit: export log roundtrip re-verify | [x] |
| P472-6 | UI: `syncModerationPanelsDuringGuildLoading` wrapper extend | [x] |
| P472-7 | UI: ban list guild-loading guard extend | [x] |
| P472-8 | UI: audit log panel guild-loading guard extend | [x] |
| P472-9 | UI: automod panel guild-loading guard extend | [x] |
| P472-10 | Platform: `ban.member` span metadata extend | [x] |
| P472-11 | Platform: `kick.member` span metadata extend | [x] |
| P472-12 | Platform: `timeout.member` span metadata extend | [x] |
| P472-13 | Platform: `audit.export` span metadata extend | [x] |
| P472-14 | Logging: dev-log **moderation-errors** filter tighten | [x] |
| P472-15 | Logging: dev-log **audit-errors** filter tighten | [x] |
| P472-16 | Logging: dev-log clipboard moderation meta extend | [x] |
| P472-17 | Agentctl: ban member headless re-verify | [x] |
| P472-18 | Agentctl: kick member headless re-verify | [x] |
| P472-19 | Agentctl: combined phase472 moderation bundle | [x] |
| P472-20 | Smoke: moderation-guild-loading-extend | [x] |
| P472-21 | Smoke: moderation-panels-guild-loading-extend | [x] |
| P472-22 | Smoke: dev-log-moderation-errors-tighten | [x] |
| P472-23 | Smoke: dev-log-audit-errors-tighten | [x] |
| P472-24 | UI: composer moderation hint | [x] |
| P472-25 | UI: ban list empty-state hints polish | [x] |
| P472-26 | UI: audit log filter chips keyboard re-verify | [x] |
| P472-27 | UI: profile mod actions polish | [x] |
| P472-28 | Permissions: ban gate toast polish | [x] |
| P472-29 | Permissions: kick gate toast polish | [x] |
| P472-30 | Permissions: timeout gate toast polish | [x] |
| P472-31 | Docs: `MODERATION.md` refresh | [x] |
| P472-32 | Docs: `AUDIT_LOG.md` refresh | [x] |
| P472-33 | Docs: `AGENTCTL.md` phase 472 bundle | [x] |
| P472-34 | Regression: threads phase 471 smokes still pass | [x] |
| P472-35 | Regression: search phase 470 smokes still pass | [x] |
| P472-36 | Boot: session ready gate | [x] |
| P472-37 | Boot: pear run gate | [x] |
| P472-38 | Module: `pearcord-platform` README moderation section | [x] |
| P472-39 | Module: `pearcord-automod` README accuracy | [x] |
| P472-40 | Smoke: platform-moderation-span-metadata-extend | [x] |
| P472-41 | Mesh: ban gossip roundtrip re-verify | [x] |
| P472-42 | Mesh: audit log sync roundtrip re-verify | [x] |
| P472-43 | UI: automod rule list keyboard roving re-verify | [x] |
| P472-44 | UI: audit export signed CSV badge polish | [x] |
| P472-45 | UI: member profile timeout badge polish | [x] |
| P472-46 | Smoke: dev-log-clipboard-moderation-meta extend | [x] |
| P472-47 | UI: composer autofocus after mod action re-verify | [x] |
| P472-48 | Agentctl: audit export headless re-verify | [x] |
| P472-49 | UI: lurker mod deny toast polish | [x] |
| P472-50 | Phase 473 roles depth (v0.8.436) | [x] |
**Next:** P472-1P472-49.
**Next:** ~~Phase 472~~ (complete). Extended `syncModerationPanelsDuringGuildLoading` (audit/automod/ban list/member actions + `#composer-moderation-hint`); platform ban/kick/timeout/audit span metadata; clipboard `guildBanCount`/`automodEnabled`; bundle `test:phase472-moderation-audit`. Phase 473 planned (50 items).
---
### Phase 473 — Roles depth (v0.8.436)
| ID | Item | Status |
|----|------|--------|
| P473-1 | Roles: create custom role roundtrip re-verify | [ ] |
| P473-2 | Roles: update permissions roundtrip re-verify | [ ] |
| P473-3 | Roles: delete role roundtrip re-verify | [ ] |
| P473-4 | Roles: reorder roundtrip re-verify | [ ] |
| P473-5 | Permissions: channel overwrite add/remove re-verify | [ ] |
| P473-6 | UI: `syncRolesPanelsDuringGuildLoading` wrapper extend | [ ] |
| P473-7 | UI: role list guild-loading guard extend | [ ] |
| P473-8 | UI: channel perm modal guild-loading guard extend | [ ] |
| P473-9 | UI: member role assign guild-loading guard extend | [ ] |
| P473-10 | Platform: `role.create` span metadata extend | [ ] |
| P473-11 | Platform: `role.update` span metadata extend | [ ] |
| P473-12 | Platform: `permission.overwrite` span metadata extend | [ ] |
| P473-13 | Logging: dev-log **permission-errors** filter tighten | [ ] |
| P473-14 | Logging: dev-log clipboard roles meta extend | [ ] |
| P473-15 | Agentctl: role create headless re-verify | [ ] |
| P473-16 | Agentctl: channel overwrite headless re-verify | [ ] |
| P473-17 | Agentctl: combined phase473 roles bundle | [ ] |
| P473-18 | Smoke: roles-guild-loading-extend | [ ] |
| P473-19 | Smoke: roles-panels-guild-loading-extend | [ ] |
| P473-20 | Smoke: dev-log-permission-errors-tighten | [ ] |
| P473-21 | Smoke: dev-log-clipboard-roles-meta extend | [ ] |
| P473-22 | UI: composer roles hint | [ ] |
| P473-23 | UI: role empty-state hints polish | [ ] |
| P473-24 | UI: channel overwrite empty hints polish | [ ] |
| P473-25 | UI: role list aria-current polish | [ ] |
| P473-26 | UI: role list keyboard roving re-verify | [ ] |
| P473-27 | UI: channel ow row keyboard re-verify | [ ] |
| P473-28 | Permissions: manage roles toast polish | [ ] |
| P473-29 | Permissions: manage channels toast polish | [ ] |
| P473-30 | Docs: `ROLES.md` refresh | [ ] |
| P473-31 | Docs: `PERMISSIONS.md` refresh | [ ] |
| P473-32 | Docs: `AGENTCTL.md` phase 473 bundle | [ ] |
| P473-33 | Regression: moderation phase 472 smokes still pass | [ ] |
| P473-34 | Regression: threads phase 471 smokes still pass | [ ] |
| P473-35 | Boot: session ready gate | [ ] |
| P473-36 | Boot: pear run gate | [ ] |
| P473-37 | Module: `pearcord-platform` README roles section | [ ] |
| P473-38 | Module: `pearcord-permissions` README accuracy | [ ] |
| P473-39 | Smoke: platform-role-span-metadata-extend | [ ] |
| P473-40 | Mesh: role gossip roundtrip re-verify | [ ] |
| P473-41 | Mesh: overwrite gossip roundtrip re-verify | [ ] |
| P473-42 | UI: channel sidebar lock icon re-verify | [ ] |
| P473-43 | UI: lurker permission deny toast polish | [ ] |
| P473-44 | UI: role filter chips keyboard re-verify | [ ] |
| P473-45 | UI: composer autofocus after ow delete re-verify | [ ] |
| P473-46 | Smoke: platform-permission-span-metadata-extend | [ ] |
| P473-47 | Search: permission-gated channel hide re-verify | [ ] |
| P473-48 | UI: member role badge polish | [ ] |
| P473-49 | UI: role color picker guild-loading guard | [ ] |
| P473-50 | Phase 474 webhooks depth (v0.8.437) | [ ] |
**Next:** P473-1P473-49.
---
@@ -10834,6 +10893,7 @@ Absorbed into Phase 273 (P273-5P273-8, P273-11P273-12). See Phase 274 for
### Changelog
- **2026-05-24** — v0.8.435: Phase 472 — Extended `syncModerationPanelsDuringGuildLoading` (audit/automod/ban list/member mod actions + `#composer-moderation-hint`); platform ban/kick/timeout/audit span metadata; clipboard `guildBanCount`/`automodEnabled`; bundle `test:phase472-moderation-audit` + agentctl (+5 smokes). Phase 473 planned (50 items).
- **2026-05-24** — v0.8.434: Phase 471 — `syncThreadsPanelsDuringGuildLoading`; extended threads/forum guild-loading guards + `#composer-thread-hint`; platform `thread.create`/`thread.archive`/`forum.post` span metadata + `error:` logs; clipboard `threadsPanelFilter`/`activeThreadParentId`/`forumTagFilter`; thread-read live region extend; bundle `test:phase471-threads-forum` + agentctl (+8 smokes). Phase 472 planned (50 items).
- **2026-05-24** — v0.8.433: Phase 470 — `syncSearchPanelsDuringGuildLoading`; extended search/pins guild-loading guards + `#composer-search-hint`; platform `guild.search`/`pin.message`/`pin.unpin` span metadata (`meshHitCount`/`localHitCount`/`pinCount`); clipboard `searchIncludeMesh`/`searchMeshHitCount`/`searchLocalHitCount`; bundle `test:phase470-search-pins` + agentctl (+7 smokes). Phase 471 planned (50 items).
- **2026-05-24** — v0.8.432: Phase 469 — `syncNotificationPanelsDuringGuildLoading`; extended notif panel guild-loading guards + `#composer-notif-hint` + `#thread-read-live`; platform notification/inbox span metadata + `error:` logs; clipboard `notifInboxFilter`/`notificationUnreadFiltered`/`guildUnreadBadgeTotal`; bundle `test:phase469-notifications-inbox` + agentctl (+8 smokes). Phase 470 planned (50 items).