feat(agent-config): TOK-2 swap runtime token reads to the secret resolver #772
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!772
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "code-lead/758"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #758
Drops the legacy
readFileSync(tokenFile)fallback indeps.tsand overlaysmergeAgentwithgetAgentTokenSync(type)so a Forgejo token revoked atscope='global'invalidates the next dispatch without a restart.Test plan
bun x turbo run typecheckcleanbun x @biomejs/biome@^2 check .clean (only pre-existing warnings)boss→code-leadrename)tokens-sync.test.tscases assert revoke-at-scope='global'returns null on the next sync resolveLogic correct:
decryptSyncis a clean extraction ofdecryptwith audit-log intact;mergeAgentoverlay viaresolveForgejoTokenForTypecorrectly surfaces revoked tokens as""without a restart;deps.tsCLI drops the lastreadFileSync(tokenFile).Nit (non-blocking): the test named "revoke at scope=global takes effect on the next mergeAgent" exercises
getAgentTokenSyncdirectly, not themergeAgent→resolveForgejoTokenForTypepath — a thin test callingresolveAgentafter seeding the secret store would close the AC gap, but not blocking.