feat(health): Phase 689 automation health and relay handoff journeys
Add runAutomationHealthDashboardJourney and runDigestRelayHandoffJourney for test:agentctl-phase689-health regression. 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.
|
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 689 (v0.8.664):** `runAutomationHealthDashboardJourney`, `runDigestRelayHandoffJourney`; bundle `test:agentctl-phase689-health`.
|
||||||
|
|
||||||
**Phase 688 (v0.8.663):** `runHookDeliveryReceiptJourney`, `runHookFailureDigestJourney`; bundle `test:agentctl-phase688-delivery`.
|
**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`.
|
||||||
|
|||||||
+32
@@ -3410,6 +3410,38 @@ class HeadlessSession {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async runAutomationHealthDashboardJourney () {
|
||||||
|
if (!this.platform) throw new Error('headless not started')
|
||||||
|
await this.registerUser({ username: 'ah689', displayName: 'Automation Health 689' })
|
||||||
|
await this.createGuild({ name: 'Automation Health 689', publicListing: false })
|
||||||
|
await this.wait({ mode: 'guild' }, 45000)
|
||||||
|
const dash = await this.platform.getAutomationHealthDashboard()
|
||||||
|
const v = await this.refreshView()
|
||||||
|
const viewDash = v.automationHealthDashboard || v.automationScheduleDashboard
|
||||||
|
if (!viewDash?.auditExport && !viewDash?.digestSync) {
|
||||||
|
throw new Error('expected automation health dashboard in view')
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
anyOverdue: !!dash.anyOverdue,
|
||||||
|
guildHealthRowCount: (dash.overdueActions || []).length + (dash.auditExport ? 1 : 0),
|
||||||
|
meshPeerCount: dash.health?.meshPeerCount ?? 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async runDigestRelayHandoffJourney () {
|
||||||
|
if (!this.platform) throw new Error('headless not started')
|
||||||
|
await this.registerUser({ username: 'rh689', displayName: 'Relay Handoff 689' })
|
||||||
|
await this.createGuild({ name: 'Relay Handoff 689', publicListing: false })
|
||||||
|
await this.wait({ mode: 'guild' }, 45000)
|
||||||
|
await this.platform.dryRunDigestWebhookRelay().catch(() => null)
|
||||||
|
const handoff = await this.platform.getLastDigestRelayHandoff()
|
||||||
|
const v = await this.refreshView()
|
||||||
|
return {
|
||||||
|
hasHandoffField: v.digestRelayHandoff != null || handoff != null,
|
||||||
|
guildHealthRowCount: (v.automationHealthDashboard?.health?.archivePeers || []).length
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
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' })
|
||||||
|
|||||||
Reference in New Issue
Block a user