feat(agentctl): cover anonymous and edit-guard poll journey

Extend `runDmPollVoteJourney` to validate anonymous poll creation and
assert poll edit is blocked after first vote, tightening Phase 659
headless verification depth.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-06-02 03:27:17 -04:00
co-authored by Cursor
parent 580545891c
commit a5693586f2
2 changed files with 13 additions and 2 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
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 659 (v0.8.638):** Added `runDmPollVoteJourney` to verify DM single-choice and multi-select poll vote behavior; smoke `test:agentctl-dm-poll-phase659`. **Phase 659 (v0.8.638):** Added `runDmPollVoteJourney` to verify DM single-choice, multi-select, anonymous poll creation, and pre-vote edit guard behavior; smoke `test:agentctl-dm-poll-phase659`.
**Phase 658 (v0.8.638):** Added DM thread closure journeys: `runDmThreadArchiveJourney` (archive/unarchive state) and `runDmThreadP2PAuditJourney` (topic audit). Smokes: `test:agentctl-dm-thread-archive-phase658`, `test:agentctl-dm-thread-p2p-audit-phase658`. **Phase 658 (v0.8.638):** Added DM thread closure journeys: `runDmThreadArchiveJourney` (archive/unarchive state) and `runDmThreadP2PAuditJourney` (topic audit). Smokes: `test:agentctl-dm-thread-archive-phase658`, `test:agentctl-dm-thread-p2p-audit-phase658`.
+12 -1
View File
@@ -926,7 +926,18 @@ class HeadlessSession {
if (!rxMulti['1️⃣']?.me || !rxMulti['2️⃣']?.me) { if (!rxMulti['1️⃣']?.me || !rxMulti['2️⃣']?.me) {
throw new Error('multi poll should allow selecting multiple options') throw new Error('multi poll should allow selecting multiple options')
} }
return { singleMessageId: single.id, multiMessageId: multi.id } const anon = await this.sendDmMessage('/polla Anonymous check? | Keep | Drop')
if (!anon?.id) throw new Error('expected dm anonymous poll message')
await this.platform.editDmPoll(anon.id, { question: 'Anonymous check updated?', options: ['Keep', 'Drop'] })
await this.platform.voteDmPoll(anon.id, 0)
let editBlocked = false
try {
await this.platform.editDmPoll(anon.id, { question: 'Should fail', options: ['A', 'B'] })
} catch (err) {
editBlocked = String(err?.message || err).includes('before the first vote')
}
if (!editBlocked) throw new Error('expected poll edit to be blocked after votes')
return { singleMessageId: single.id, multiMessageId: multi.id, anonymousMessageId: anon.id }
} }
async runDmVideoLiveJourney (peerUserId, peerDisplayName) { async runDmVideoLiveJourney (peerUserId, peerDisplayName) {