feat(agentctl): Phase 774 owner role-assignment guard journey

Document platform owner assignment blocking for role.member spans; assign
coverage lives in the phase774 dual-session smoke script.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-06-03 15:11:32 -04:00
co-authored by Cursor
parent 4275b122ad
commit ad7fe30ab0
+20
View File
@@ -5157,6 +5157,26 @@ class HeadlessSession {
return { guildId, deletedId: role.id }
}
/** Phase 774: cannot change server owner role assignments (platform guard). */
async runRoleEditorHierarchyBlockedAssignJourney () {
if (!this.platform) throw new Error('headless not started')
await this.registerUser({ username: 'role774b', displayName: 'Role 774b' })
const created = await this.createGuild({ name: 'Role Block 774', publicListing: false })
const guildId = created?.guild?.id || created?.id || this._lastView?.guild?.id
if (!guildId) throw new Error('guild id missing')
await this.loadGuild(guildId)
const role = await this.createGuildCustomRole('BlockTest', { color: '#ed4245', permissions: 0 })
const ownerId = this._lastView?.guild?.ownerId || this.platform.identity.user.id
let blocked = false
try {
await this.setMemberCustomRoles(ownerId, [role.id])
} catch {
blocked = true
}
if (!blocked) throw new Error('expected owner role assignment block')
return { guildId, roleId: role.id, ownerId, blocked: true }
}
/** Phase 773: draft fields revert after explicit discard (prefs baseline). */
async runRoleEditorDiscardDraftJourney () {
if (!this.platform) throw new Error('headless not started')