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:
@@ -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 688 (v0.8.663):** `runHookDeliveryReceiptJourney`, `runHookFailureDigestJourney`; bundle `test:agentctl-phase688-delivery`.
|
||||
|
||||
**Phase 687 (v0.8.662):** `runWorkerTemplateLaunchJourney`, `runWorkerTrialMatrixJourney`; bundle `test:agentctl-phase687-workers`.
|
||||
|
||||
**Phase 686 (v0.8.661):** `runAutomationHookCreateJourney`, `runDigestRelayDryRunJourney`; bundle `test:agentctl-phase686-automation`.
|
||||
|
||||
+35
@@ -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 () {
|
||||
if (!this.platform) throw new Error('headless not started')
|
||||
await this.registerUser({ username: 'fm672', displayName: 'Forum 672' })
|
||||
|
||||
Reference in New Issue
Block a user