From 440b271dbdcd9fb7c8483eb97bc4d8609f525ff7 Mon Sep 17 00:00:00 2001 From: namuroh Date: Wed, 1 Apr 2026 02:05:45 +0000 Subject: [PATCH] fix(costs): attribute Boot token spend separately from Deacon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Boot is modeled as a deacon dog (Role: deacon, Name: boot) in the session identity package. parseSessionName in costs.go did not account for this, so Boot's costs were silently merged into the deacon bucket — making Boot's real token spend invisible in gt costs --by-role output. Add RoleBoot and EmojiBoot constants. Special-case identity.Name==boot in the deacon branch of parseSessionName to return role "boot" instead of "deacon". Boot costs now appear as a distinct line in gt costs output. --- internal/cmd/costs.go | 5 +++++ internal/constants/constants.go | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/internal/cmd/costs.go b/internal/cmd/costs.go index 958cfa339b..d1b7c8a37e 100644 --- a/internal/cmd/costs.go +++ b/internal/cmd/costs.go @@ -640,6 +640,11 @@ func parseSessionName(sess string) (role, rig, worker string) { case session.RoleMayor: return constants.RoleMayor, "", "mayor" case session.RoleDeacon: + // Boot is modeled as a deacon dog (Role: deacon, Name: boot). + // Attribute its costs separately so token spend is visible per role. + if identity.Name == "boot" { + return constants.RoleBoot, "", "boot" + } return constants.RoleDeacon, "", "deacon" case session.RoleWitness: return constants.RoleWitness, identity.Rig, "" diff --git a/internal/constants/constants.go b/internal/constants/constants.go index eb6696bdeb..6d743b92df 100644 --- a/internal/constants/constants.go +++ b/internal/constants/constants.go @@ -253,6 +253,9 @@ const ( // RoleDeacon is the deacon agent role. RoleDeacon = "deacon" + + // RoleBoot is the boot watchdog role (modeled as a deacon dog). + RoleBoot = "boot" ) // Role emojis - centralized for easy customization. @@ -275,6 +278,9 @@ const ( // EmojiPolecat is the polecat emoji (transient worker). EmojiPolecat = "😺" + + // EmojiBoot is the boot watchdog emoji (dog). + EmojiBoot = "🐾" ) // Molecule formula names for patrol and dog workflows. @@ -335,6 +341,8 @@ func RoleEmoji(role string) string { return EmojiCrew case RolePolecat: return EmojiPolecat + case RoleBoot: + return EmojiBoot default: return "❓" }