TOK-3: Per-instance token override #759

Closed
opened 2026-05-02 17:28:14 +00:00 by claude-desktop · 0 comments
Collaborator

As an operator, I want an instance-scoped token override that lets dev-2 use a different Forgejo identity than dev-default without forking the type, so that I can run multiple agent instances of the same type with separate Forgejo accounts (e.g. for sharded throughput or to isolate audit trails).

Acceptance criteria

Schema

  • agent_type_token_override (instance_id, secret_id) table (or equivalent extension on agent_type_routing / a new agent_token table) lets per-instance rows shadow the agent-type default.
  • Resolver picks instance over agent_type over global.

UI

  • Dashboard exposes a "Use a different token for this instance" affordance on the per-instance side panel (per AT-6).
  • The affordance walks the operator through pasting a token value — no filesystem path input.

Tests

  • Smoke: set a different token for dev-2, dispatch, assert the commit author resolves to the override identity.

Out of scope

  • Per-repo token override — out of scope; handled by per-instance scoping today.

References

  • Spec: specs/config-to-db.md § Story TOK-3.
  • Blocked by: TOK-1, TOK-2.
As an operator, I want an instance-scoped token override that lets `dev-2` use a different Forgejo identity than `dev-default` without forking the type, so that I can run multiple agent instances of the same type with separate Forgejo accounts (e.g. for sharded throughput or to isolate audit trails). ## Acceptance criteria ### Schema - [ ] `agent_type_token_override (instance_id, secret_id)` table (or equivalent extension on `agent_type_routing` / a new `agent_token` table) lets per-instance rows shadow the agent-type default. - [ ] Resolver picks `instance` over `agent_type` over `global`. ### UI - [ ] Dashboard exposes a "Use a different token for this instance" affordance on the per-instance side panel (per AT-6). - [ ] The affordance walks the operator through pasting a token value — no filesystem path input. ### Tests - [ ] Smoke: set a different token for `dev-2`, dispatch, assert the commit author resolves to the override identity. ## Out of scope - Per-repo token override — out of scope; handled by per-instance scoping today. ## References - Spec: `specs/config-to-db.md` § Story TOK-3. - Blocked by: TOK-1, TOK-2.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks#759
No description provided.