Skip to content

fix(costs): attribute Boot token spend separately from Deacon#3454

Open
mk-imagine wants to merge 1 commit intogastownhall:mainfrom
mk-imagine:fix/boot-cost-attribution
Open

fix(costs): attribute Boot token spend separately from Deacon#3454
mk-imagine wants to merge 1 commit intogastownhall:mainfrom
mk-imagine:fix/boot-cost-attribution

Conversation

@mk-imagine
Copy link
Copy Markdown

Problem

Boot is modeled in the session identity package as Role: RoleDeacon, Name: boot
rather than as a first-class role. parseSessionName in costs.go had no special
case for this — Boot's costs were silently merged into the deacon bucket, making
Boot's real token spend invisible in gt costs --by-role output.

The deacon total in gt costs was actually Deacon + Boot combined, with no way
to separate them or audit Boot's per-cycle cost.

Fix

  • Add RoleBoot = "boot" constant to constants.go
  • Add EmojiBoot = "🐾" and its RoleEmoji switch case to constants.go
  • Special-case identity.Name == "boot" in the RoleDeacon branch of
    parseSessionName in costs.go to return constants.RoleBoot instead
    of constants.RoleDeacon

Boot now appears as a distinct 🐾 boot line in gt costs --by-role output.

Testing

Ran gt costs --today --by-role after multiple Boot triage cycles with the new
binary. 🐾 boot appears as a separate line from 🐺 deacon with its own
cost figure, confirming the attribution is working correctly.

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.
Copilot AI review requested due to automatic review settings April 1, 2026 03:44
@github-actions github-actions bot added the status/needs-triage Inbox — we haven't looked at it yet label Apr 1, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes role-based cost attribution by separating Boot’s token spend from Deacon’s, so gt costs --by-role reports Boot as its own line item.

Changes:

  • Added a first-class RoleBoot constant and associated EmojiBoot.
  • Updated RoleEmoji to map RoleBoot to the new emoji.
  • Updated parseSessionName to detect RoleDeacon sessions named boot and attribute them to RoleBoot.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
internal/constants/constants.go Adds RoleBoot + EmojiBoot and maps the role to its emoji.
internal/cmd/costs.go Special-cases Deacon sessions named boot to attribute costs to the new Boot role.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/needs-triage Inbox — we haven't looked at it yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants