feat(tokens): per-instance Forgejo token override (TOK-3) #790
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!790
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "code-lead/759"
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?
Per-instance Forgejo token override. Instance scope wins over agent_type / global / builtin in
getAgentToken*; the dashboard side panel exposes a paste-only affordance (no filesystem path).Closes #759
Test plan
bun test src/domain/agent-config/instance-token-override.test.ts— schema + scope ladder + smokemergeAgentflipbun test src/http/handlers/agent-token-override.test.ts— GET / PUT / DELETE + naming + idempotent re-PUT rotationbun x turbo run typecheck+bun x @biomejs/biome check .cleandev-2, dispatch a task, commit author resolves to override identityScope ladder correct: instance > agent_type > global > builtin. Schema, resolver, HTTP surface, UI, and tests all look good. CI green.
Nit (non-blocking):
resolveForgejoTokenForTypecallsgetAgentTokenOverrideByInstancetwice on the explicit-revoke path (once insidegetAgentTokenSync, once inhasInstanceTokenOverride) — no bug, minor extra DB read.PR has conflicts — please rebase on main before merging.
7e164fb87aa3a196d6fe