feat(agentctl): group remove rekey journey smoke v0.8.635

Add runGroupDmRemoveMemberRekeyJourney for E2E rekey banner validation.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-06-02 01:23:41 -04:00
co-authored by Cursor
parent 5f8edc352f
commit a711b7cb1b
+19
View File
@@ -854,6 +854,25 @@ class HeadlessSession {
return { previousChannelId: channel.id, channelId: next.id, rekey: v.dmSessionRekey }
}
/** Phase 657: group remove member triggers encryption rekey banner. */
async runGroupDmRemoveMemberRekeyJourney (peerUserIds, initialName, removePeerUserId) {
if (!this.platform) throw new Error('headless not started')
const channel = await this.createGroupDm(peerUserIds, initialName)
if (!channel?.id) throw new Error('expected group channel')
const next = await this.platform.removeGroupDmMember({
channelId: channel.id,
peerUserId: removePeerUserId
})
if (!next?.id || next.id === channel.id) {
throw new Error('expected new channel id after remove member')
}
const v = await this.refreshView()
if (!v.dmSessionRekey?.channelId || v.dmSessionRekey.channelId !== next.id) {
throw new Error('expected dmSessionRekey after remove member')
}
return { channelId: next.id, rekey: v.dmSessionRekey }
}
async exportGuildAuditLog (opts = {}) {
if (!this.platform) throw new Error('headless not started')
const out = await this.platform.exportAuditLog(opts)