feat(agentctl): runDmSidebarSearchJourney for Phase 655 DM inbox soak

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-06-02 00:14:34 -04:00
co-authored by Cursor
parent 174c48c16e
commit a053929245
2 changed files with 21 additions and 0 deletions
+2
View File
@@ -2,6 +2,8 @@
Agent control plane for Pearcord — send the same IPC messages the UI sends, read `view` snapshots, and run scripted journeys against a **live worker** or an in-process **headless** session.
**Phase 655 (v0.8.627):** Headless `runDmSidebarSearchJourney(peerUserId, peerDisplayName)` — open DM, send marker, assert preview. Smoke: `npm run test:agentctl-dm-sidebar-phase655` (app repo).
**Phase 654 (current, 50 swarm/repl/sync items active):** Primary autonomous testing vehicle per core rules. Manual (non-automated) runs of headless scenarios + mesh smokes used to verify composer autofocus/send button/grow + swarm retry changes (adaptive + discovery aid). Extended journeys for global resilience soaks (12-peer, heal under churn, CRDT coverage). Direct bin requires app cwd for bare resolution (smokes succeed). See PLATFORM_ROADMAP.md P654 items + AGENTCTL.md.
## Mission
+19
View File
@@ -644,6 +644,25 @@ class HeadlessSession {
return out
}
/** Phase 655: open DM, assert sidebar helpers + composer focus path. */
async runDmSidebarSearchJourney (peerUserId, peerDisplayName) {
if (!this.platform) throw new Error('headless not started')
await this.openDmWithPeer(peerUserId, peerDisplayName)
const v = await this.refreshView()
if (v.mode !== 'dm') throw new Error('expected dm mode after open')
if (!v.activeChannelId) throw new Error('expected activeChannelId after dm open')
if (!(v.dmConversations || []).length) {
throw new Error('expected dmConversations after dm open')
}
await this.sendDmMessage('sidebar-search-journey ping')
const v2 = await this.refreshView()
const row = (v2.dmConversations || []).find((d) => d.id === v2.activeChannelId)
if (!row?.lastMessagePreview?.includes('sidebar-search')) {
throw new Error('expected dm preview after send')
}
return { channelId: v2.activeChannelId, preview: row.lastMessagePreview }
}
async exportGuildAuditLog (opts = {}) {
if (!this.platform) throw new Error('headless not started')
const out = await this.platform.exportAuditLog(opts)