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:
@@ -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.
|
||||
|
||||
**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`.
|
||||
|
||||
|
||||
+12
-1
@@ -926,7 +926,18 @@ class HeadlessSession {
|
||||
if (!rxMulti['1️⃣']?.me || !rxMulti['2️⃣']?.me) {
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user