mention: book the seats' spend to the ledger (TIME_TOKEN for the flush) #70
Open
teahubxyz
wants to merge 1 commits from
mention-ledger-token into main
pull from: mention-ledger-token
merge into: teahubxyz:main
teahubxyz:main
teahubxyz:gh-pages
teahubxyz:havre/catalog-18-plus-20261024
teahubxyz:havre/byok-unfiltered-20261024
teahubxyz:time/card-260
teahubxyz:typy/context-words-254
teahubxyz:typy/center-target-254
teahubxyz:typy/inline-preview-254
teahubxyz:typy/smooth-typing-254
teahubxyz:typy/v0-254
teahubxyz:modern-havre
teahubxyz:uncensor-havre
teahubxyz:havre-split-hide
teahubxyz:havre-split
teahubxyz:havre-model-sort
teahubxyz:time/card-244
teahubxyz:time/card-223
teahubxyz:havre-art-and-snap
teahubxyz:havre-remix-edit
teahubxyz:havre-voice-in-tools
teahubxyz:havre-asmr-mode
teahubxyz:havre-update-pill
teahubxyz:havre-whisper
teahubxyz:claude/card-202-truncated-review-2wh43h
teahubxyz:time/card-211
teahubxyz:claude/card-198-superseded-cards-p3jqzg
teahubxyz:havre-live
teahubxyz:havre-open
teahubxyz:claude/taskmaster-haggle-checkout-f57aux
teahubxyz:havre-memory
teahubxyz:havre-photoshoot
teahubxyz:havre-workflows
teahubxyz:claude/card-173-rank-spine-cards
teahubxyz:ceo/sync-back-union
teahubxyz:claude/card-171-router-optimization-7t2dp6
teahubxyz:claude/router-pick-outcomes-99zcnh
teahubxyz:time/card-48
teahubxyz:time/card-98
teahubxyz:time/card-170
teahubxyz:time/card-89
teahubxyz:time/card-160
teahubxyz:time/card-114-gh-pages
teahubxyz:time/card-113-gh-pages
teahubxyz:time/card-96-gh-pages
teahubxyz:time/card-85
teahubxyz:havre-next2
teahubxyz:havre-cast
teahubxyz:time/card-82
teahubxyz:time/card-80
teahubxyz:time/card-79
teahubxyz:ceo/worker-base-and-slack
teahubxyz:time/card-87
teahubxyz:time/card-94
teahubxyz:chatgpt/parallel-api
teahubxyz:time/card-95
teahubxyz:time/card-71
teahubxyz:astra-board
teahubxyz:havre-next
teahubxyz:venture/slyng
teahubxyz:havre-brutalist
teahubxyz:ship-from-repo
teahubxyz:time/card-63
teahubxyz:time/card-60
teahubxyz:time/card-61
No Reviewers
Labels
Clear labels
accessibility
andon
astra
bug
cloud
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-human
planned
question
queued
ready
signal
signup
spec
venture
venture-batch
wontfix
Barrier affecting people with disabilities
Something isn't working
Improvements or additions to documentation
This issue or pull request already exists
New feature or request
Good for newcomers
Extra attention is needed
This doesn't seem right
Further information is requested
Time picks this up on the next heartbeat
👍 = I want the next version
early-access signup for a venture
This will not be worked on
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: teahubxyz/time#70
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Found while the haiku seat reviewed #69: every
mention.ymlrun ends withledger flush failed: git push failed: User permission denied for writing(runs 560, 562, 564).mainis PR-only for the Actions identity, andmention.ymlwas the one workflow not handedTIME_TOKEN, so@seatreplies have been spending without being booked, and the$5/day governor undercounts them by exactly those calls.One line: the same
TIME_TOKENenv the heartbeat, venture and astra workflows already carry, so the flush pushestime/ledger/<month>.jsonlas thetimebot.Risk note for the council. The mention job starts on any
@-comment from a non-Time user, including a stranger on this public repo;time.pychecks collaborator permission before any seat spends, so an untrusted comment runs no model call and nothing in this job executes model-written code (reply =think+ comment). The token is used only by the ledger flush, as in the other three workflows..github/is a protected path: steward merge, not auto-merge.Check after merge: the next
@seatreply's run should end with aledger: N calls, $Xcommit onmaininstead of the push error.🤖 Generated with Claude Code
https://claude.ai/code/session_01LaVWDr6h62YJk9LJqvQH7k
The mention runner's ledger flush was failing on every reply ("User permission denied for writing"): main is PR-only for the Actions identity, and this workflow was the only one not handed TIME_TOKEN, so @seat replies went unbooked and the daily governor undercounted them. Same env line the heartbeat, venture and astra workflows already carry. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LaVWDr6h62YJk9LJqvQH7kBlocking review finding (2026-10-17): #70's one-line env injection does not appear sufficient. Current
.github/time/time.py_git_url(True)unconditionally interpolatesos.environ['GITHUB_TOKEN'], andgit_commit()pushes to that URL.flush_ledger()callsgit_commit(default_branch(), ...); it does not selectTIME_TOKENfor the ledger. Therefore addingTIME_TOKENtomention.ymlalone still pushes as the event's Actions token, and will not fix the reportedUser permission denied for writingin mention runs. Please route default-branch ledger pushes through the Time bot token explicitly (with a scoped credential choice and no exposure to model-run commands), add a test that checks the actual authenticated push, then run a real @seat smoke and verify a ledger commit. Do not merge this PR as a completed governor fix until tested. Compare_git_urlandgit_commitin current main;TIME_TOKENis currently used only for certain Gitea API writes viagh().View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.