feat(agentctl): Phase 688 delivery receipt and failure digest journeys

Add runHookDeliveryReceiptJourney and runHookFailureDigestJourney for
test:agentctl-phase688-delivery regression coverage.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-06-03 00:53:40 -04:00
co-authored by Cursor
parent 2942e902bd
commit 330a6a3692
2 changed files with 37 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. 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 688 (v0.8.663):** `runHookDeliveryReceiptJourney`, `runHookFailureDigestJourney`; bundle `test:agentctl-phase688-delivery`.
**Phase 687 (v0.8.662):** `runWorkerTemplateLaunchJourney`, `runWorkerTrialMatrixJourney`; bundle `test:agentctl-phase687-workers`. **Phase 687 (v0.8.662):** `runWorkerTemplateLaunchJourney`, `runWorkerTrialMatrixJourney`; bundle `test:agentctl-phase687-workers`.
**Phase 686 (v0.8.661):** `runAutomationHookCreateJourney`, `runDigestRelayDryRunJourney`; bundle `test:agentctl-phase686-automation`. **Phase 686 (v0.8.661):** `runAutomationHookCreateJourney`, `runDigestRelayDryRunJourney`; bundle `test:agentctl-phase686-automation`.
+35
View File
@@ -3375,6 +3375,41 @@ class HeadlessSession {
} }
} }
async runHookDeliveryReceiptJourney () {
if (!this.platform) throw new Error('headless not started')
await this.registerUser({ username: 'dr688', displayName: 'Delivery Receipt 688' })
await this.createGuild({ name: 'Delivery Receipt 688', publicListing: false })
await this.wait({ mode: 'guild' }, 45000)
const out = await this.upsertGuildAutomationHook({
name: 'Phase688 Logger',
categories: 1,
action: { type: 'log' },
filter: { eventTypes: ['messageCreate'] }
})
if (!out?.id) throw new Error('expected automation hook')
await this.sendGuildMessage('phase688 receipt journey ping')
const v = await this.refreshView()
const rows = v.deliveryReceiptRows || v.automationDelivery?.recent || []
if (!rows.length) throw new Error('expected delivery receipt rows in view')
const hit = rows.find((r) => r.hookName === 'Phase688 Logger' && r.status === 'delivered')
if (!hit) throw new Error('expected delivered receipt for hook')
return { receiptId: hit.id, guildReceiptCount: rows.length }
}
async runHookFailureDigestJourney () {
if (!this.platform) throw new Error('headless not started')
await this.registerUser({ username: 'hf688', displayName: 'Hook Digest 688' })
await this.createGuild({ name: 'Hook Digest 688', publicListing: false })
await this.wait({ mode: 'guild' }, 45000)
const digest = await this.platform.getHookFailureDigest()
const v = await this.refreshView()
return {
totalFailures: digest?.totalFailures ?? 0,
guildReceiptCount: (v.deliveryReceiptRows || []).length,
hasDigestField: v.hookFailureDigest != null
}
}
async runForumPostSearchJourney () { async runForumPostSearchJourney () {
if (!this.platform) throw new Error('headless not started') if (!this.platform) throw new Error('headless not started')
await this.registerUser({ username: 'fm672', displayName: 'Forum 672' }) await this.registerUser({ username: 'fm672', displayName: 'Forum 672' })