docs: Phase 100 audit archives, digest schedule, worker install (v0.8.64)
Document RPC 71, digest export schedule parity, buildWorkerInstallPlan, new smokes, Phase 100 complete and Phase 101 next items. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -43,6 +43,8 @@ Pearcord records **local audit entries** in HyperDB (`@pearcord/audit-log`) for
|
||||
|
||||
**v0.8.63:** **Scheduled audit export** — mods enable interval (1–168h); timer runs `exportAuditLog` + mesh gossip. **Export audit now** runs immediately. Prefs sync via `GUILD_SYNC.auditExportSchedule`.
|
||||
|
||||
**v0.8.64:** **Audit export archives** — each export is retained locally (max 8, 30 days) and gossipped via `AUDIT_EXPORT_ARCHIVE` (RPC 71). Server settings lists recent mesh exports; `GUILD_SYNC.auditExportArchives` shares metadata with joiners.
|
||||
|
||||
## Tests
|
||||
|
||||
| Script | Marker |
|
||||
@@ -52,6 +54,7 @@ Pearcord records **local audit entries** in HyperDB (`@pearcord/audit-log`) for
|
||||
| `npm run test:audit-export` | `AUDIT_EXPORT_SMOKE_OK` |
|
||||
| `npm run test:audit-export-gossip` | `AUDIT_EXPORT_GOSSIP_SMOKE_OK` |
|
||||
| `npm run test:audit-export-schedule` | `AUDIT_EXPORT_SCHEDULE_SMOKE_OK` |
|
||||
| `npm run test:audit-export-archive` | `AUDIT_EXPORT_ARCHIVE_SMOKE_OK` |
|
||||
|
||||
## P2P gossip (v0.4.2+)
|
||||
|
||||
|
||||
@@ -72,6 +72,9 @@ Pearcord validates itself without manual QA.
|
||||
| `npm run test:audit-export-schedule` | Scheduled audit export (`AUDIT_EXPORT_SCHEDULE_SMOKE_OK`) |
|
||||
| `npm run test:hook-failure-digest-sync` | Hook failure digest mesh (`HOOK_FAILURE_DIGEST_SYNC_SMOKE_OK`) |
|
||||
| `npm run test:worker-version-diff` | Worker semver diff banner (`WORKER_VERSION_DIFF_SMOKE_OK`) |
|
||||
| `npm run test:audit-export-archive` | Audit export mesh archives (`AUDIT_EXPORT_ARCHIVE_SMOKE_OK`) |
|
||||
| `npm run test:digest-export-schedule` | Scheduled digest mesh sync (`DIGEST_EXPORT_SCHEDULE_SMOKE_OK`) |
|
||||
| `npm run test:worker-install-plan` | Worker install plan (`WORKER_INSTALL_PLAN_SMOKE_OK`) |
|
||||
| `npm run test:worker-stage` | Pear stage dry-run includes worker entry |
|
||||
| `npm run test:worker-release` | Optional Pear key release dry-run (`WORKER_RELEASE_OK` or skip) |
|
||||
| `npm run test:automation-export` | Automation manifest export/import (`AUTOMATION_EXPORT_SMOKE_OK`) |
|
||||
|
||||
@@ -142,6 +142,16 @@ Gossip fires when a mod exports the audit log (`gossip` defaults true).
|
||||
| `runScheduledAuditExportNow()` | Force export + gossip (+ digest sync if failures) |
|
||||
| `pushHookFailureDigestToMesh()` | Manage Server — digest gossip |
|
||||
|
||||
## Digest export schedule (v0.8.64)
|
||||
|
||||
Mirrors audit export schedule: `digestExportSchedule` prefs (`enabled`, `intervalHours`, `lastPushAt`), timer calls `pushHookFailureDigestToMesh`, synced on `GUILD_SYNC`.
|
||||
|
||||
| RPC | Value | Payload |
|
||||
|-----|-------|---------|
|
||||
| `AUDIT_EXPORT_ARCHIVE` | 71 | `{ id, guildId, exportedAt, exportedBy?, filter, count, entries[] }` |
|
||||
|
||||
Retention: max 8 archives per guild, 30-day prune.
|
||||
|
||||
## Tests
|
||||
|
||||
| Script | Validates |
|
||||
@@ -158,6 +168,8 @@ Gossip fires when a mod exports the audit log (`gossip` defaults true).
|
||||
| `npm run test:audit-export-gossip` | Audit export mesh snapshot → `AUDIT_EXPORT_GOSSIP_SMOKE_OK` |
|
||||
| `npm run test:audit-export-schedule` | Scheduled audit export → `AUDIT_EXPORT_SCHEDULE_SMOKE_OK` |
|
||||
| `npm run test:hook-failure-digest-sync` | Digest mesh sync → `HOOK_FAILURE_DIGEST_SYNC_SMOKE_OK` |
|
||||
| `npm run test:digest-export-schedule` | Scheduled digest push → `DIGEST_EXPORT_SCHEDULE_SMOKE_OK` |
|
||||
| `npm run test:audit-export-archive` | Audit export archives → `AUDIT_EXPORT_ARCHIVE_SMOKE_OK` |
|
||||
| `npm run test:integration-worker` | Retention + worker templates |
|
||||
| `npm run test:delivery-metrics` | `DELIVERY_METRICS_SMOKE_OK` |
|
||||
| `npm run test:app-events` | App event bridge (unchanged) |
|
||||
|
||||
@@ -20,6 +20,8 @@ When a member joins a guild over an invite, they may have **no local message his
|
||||
"auditRecent": [ /* up to 32 moderation audit rows */ ],
|
||||
"workerReleaseHint": { "workerVersion": "0.8.60", "pearUri": "pear://…", "releaseNotes": "…", "publishedAt": 0 },
|
||||
"auditExportSchedule": { "enabled": false, "intervalHours": 24, "filter": "all", "lastExportAt": 0 },
|
||||
"digestExportSchedule": { "enabled": false, "intervalHours": 24, "lastPushAt": 0 },
|
||||
"auditExportArchives": [ { "id", "exportedAt", "count", "filter" } ],
|
||||
"hookFailureDigest": { "digest": { "totalFailures": 0, "topHooks": [] }, "exportedAt": 0 }
|
||||
}
|
||||
```
|
||||
@@ -30,6 +32,8 @@ When a member joins a guild over an invite, they may have **no local message his
|
||||
|
||||
**v0.8.63:** `auditExportSchedule` and `hookFailureDigest` slices sync scheduled export prefs and latest digest rollup.
|
||||
|
||||
**v0.8.64:** `digestExportSchedule`, `auditExportArchives` (metadata, up to 3) for scheduled digest sync and export retention on mesh.
|
||||
|
||||
## When sync is sent
|
||||
|
||||
| Trigger | Who pushes |
|
||||
|
||||
+1
-1
@@ -154,7 +154,7 @@ Phases **0–2** and **4** are largely complete; **3** (live audio) and **5** (n
|
||||
| P95-1 | Live mesh audit sync + per-user hook mute + worker publish (v0.8.59) | [x] |
|
||||
| P96-1 | Audit filters + hook failure digest + worker release hints (v0.8.60) | [x] |
|
||||
|
||||
**Next tranches (Phase 100+):** Audit export retention on mesh · digest schedule parity · worker auto-update install flow.
|
||||
**Next tranches (Phase 101+):** Audit archive download modal · digest schedule live mesh smoke · one-click worker install runner.
|
||||
|
||||
When Phase 5 checklist is `[x]`, copy open items here into tracked rows in `PLATFORM_ROADMAP.md`.
|
||||
|
||||
|
||||
+15
-1
@@ -294,6 +294,19 @@ When completing work, change `[ ]` → `[x]` and add a one-line note under **Cha
|
||||
|
||||
---
|
||||
|
||||
### Phase 100 — Audit archives, digest schedule & worker install flow (v0.8.64)
|
||||
|
||||
| ID | Item | Status |
|
||||
|----|------|--------|
|
||||
| P100-1 | `AUDIT_EXPORT_ARCHIVE` RPC 71 + retention (8 / 30d) + GUILD_SYNC slice | [x] |
|
||||
| P100-2 | Scheduled digest mesh sync (`digestExportSchedule` parity) | [x] |
|
||||
| P100-3 | `buildWorkerInstallPlan` + Copy Pear install command UI | [x] |
|
||||
| P100-4 | `test:audit-export-archive`, `test:digest-export-schedule`, `test:worker-install-plan` | [x] |
|
||||
|
||||
**Next:** Audit archive download modal · digest schedule live mesh smoke · one-click worker install runner.
|
||||
|
||||
---
|
||||
|
||||
### Phase 99 — Scheduled audit export, digest mesh sync & version diff (v0.8.63)
|
||||
|
||||
| ID | Item | Status |
|
||||
@@ -303,7 +316,7 @@ When completing work, change `[ ]` → `[x]` and add a one-line note under **Cha
|
||||
| P99-3 | `buildVersionDiff` worker update banner | [x] |
|
||||
| P99-4 | `test:audit-export-schedule`, `test:hook-failure-digest-sync`, `test:worker-version-diff` | [x] |
|
||||
|
||||
**Next:** Audit export retention on mesh · digest schedule parity · worker auto-update install flow.
|
||||
**Next:** ~~Audit export retention on mesh · digest schedule parity · worker auto-update install flow~~ (Phase 100).
|
||||
|
||||
---
|
||||
|
||||
@@ -1252,6 +1265,7 @@ When completing work, change `[ ]` → `[x]` and add a one-line note under **Cha
|
||||
|
||||
### Changelog
|
||||
|
||||
- **2026-05-22** — v0.8.64: `AUDIT_EXPORT_ARCHIVE` RPC 71, digest export schedule, `buildWorkerInstallPlan`, `test:audit-export-archive`, `test:digest-export-schedule`, `test:worker-install-plan`.
|
||||
- **2026-05-22** — v0.8.63: scheduled audit export gossip, `HOOK_FAILURE_DIGEST_SYNC` RPC 70, worker `buildVersionDiff` banner, `test:audit-export-schedule`, `test:hook-failure-digest-sync`, `test:worker-version-diff`.
|
||||
- **2026-05-22** — v0.8.62: `AUDIT_EXPORT_SNAPSHOT` RPC 69, hook failure digest export, worker release changelog in hint banner, `test:audit-export-gossip`, `test:hook-failure-digest-export`, `test:worker-release-changelog`.
|
||||
- **2026-05-22** — v0.8.61: audit log JSON/CSV export, `HOOK_FAILURE` app event fanout to automation hooks, publish auto-announce script, `test:audit-export`, `test:hook-failure-fanout`, `test:worker-publish-announce`.
|
||||
|
||||
@@ -79,6 +79,7 @@ The script calls `platform.announceWorkerRelease({ workerVersion, pearUri: pear:
|
||||
| `npm run test:worker-publish-announce` | `WORKER_PUBLISH_ANNOUNCE_SMOKE_OK` |
|
||||
| `npm run test:worker-release-changelog` | `WORKER_RELEASE_CHANGELOG_SMOKE_OK` |
|
||||
| `npm run test:worker-version-diff` | `WORKER_VERSION_DIFF_SMOKE_OK` |
|
||||
| `npm run test:worker-install-plan` | `WORKER_INSTALL_PLAN_SMOKE_OK` |
|
||||
|
||||
Set `PEARCORD_RELEASE_NOTES` when running `announce-worker-after-publish.cjs` after publish.
|
||||
|
||||
@@ -92,6 +93,8 @@ Mods with **Manage Server** can **Announce worker release to guild** in server s
|
||||
|
||||
**v0.8.63:** Banner includes **version diff** (`buildVersionDiff`) — e.g. `major +0, minor +1, patch +2` between local and announced worker semver.
|
||||
|
||||
**v0.8.64:** **Copy Pear install command** uses `buildWorkerInstallPlan` — returns `pear run {pearUri} --trusted -- worker/index.js {template}` for the announced worker bundle.
|
||||
|
||||
`GUILD_SYNC` bundles may include `workerReleaseHint` so joiners learn of published worker versions.
|
||||
|
||||
| Test | Marker |
|
||||
|
||||
Reference in New Issue
Block a user