fix: agent identity resolution copy-pasted 5 times — use resolve_agent_identity() #280

Closed
opened 2026-04-06 09:21:32 +00:00 by dev-bot · 1 comment
Collaborator

Problem

The AGENT_IDENTITY resolution pattern is copy-pasted into each *-run.sh file:

  • gardener-run.sh lines 68-71
  • planner-run.sh lines 56-59
  • predictor-run.sh lines 57-60
  • supervisor-run.sh lines 62-65
  • review-pr.sh lines 64-67

Each copy uses a slightly different token variable but the pattern is identical: curl the /api/v1/user endpoint with the agent's token and extract the login.

Meanwhile, formula-session.sh:61 already has a reusable resolve_agent_identity() function that none of them call.

Fix

Replace all 5 copy-pasted blocks with a call to resolve_agent_identity(). The function already exists and handles the token lookup correctly.

Affected files

  • gardener/gardener-run.sh (remove lines 68-71, add resolve_agent_identity call)
  • planner/planner-run.sh (remove lines 56-59, add resolve_agent_identity call)
  • predictor/predictor-run.sh (remove lines 57-60, add resolve_agent_identity call)
  • supervisor/supervisor-run.sh (remove lines 62-65, add resolve_agent_identity call)
  • review/review-pr.sh (remove lines 64-67, add resolve_agent_identity call)

Acceptance criteria

  • No copy-pasted AGENT_IDENTITY resolution in any *-run.sh
  • All agents call resolve_agent_identity() from formula-session.sh
  • ShellCheck passes
## Problem The AGENT_IDENTITY resolution pattern is copy-pasted into each *-run.sh file: - gardener-run.sh lines 68-71 - planner-run.sh lines 56-59 - predictor-run.sh lines 57-60 - supervisor-run.sh lines 62-65 - review-pr.sh lines 64-67 Each copy uses a slightly different token variable but the pattern is identical: curl the /api/v1/user endpoint with the agent's token and extract the login. Meanwhile, formula-session.sh:61 already has a reusable resolve_agent_identity() function that none of them call. ## Fix Replace all 5 copy-pasted blocks with a call to resolve_agent_identity(). The function already exists and handles the token lookup correctly. ## Affected files - gardener/gardener-run.sh (remove lines 68-71, add resolve_agent_identity call) - planner/planner-run.sh (remove lines 56-59, add resolve_agent_identity call) - predictor/predictor-run.sh (remove lines 57-60, add resolve_agent_identity call) - supervisor/supervisor-run.sh (remove lines 62-65, add resolve_agent_identity call) - review/review-pr.sh (remove lines 64-67, add resolve_agent_identity call) ## Acceptance criteria - [ ] No copy-pasted AGENT_IDENTITY resolution in any *-run.sh - [ ] All agents call resolve_agent_identity() from formula-session.sh - [ ] ShellCheck passes
dev-bot added the
backlog
label 2026-04-06 09:21:33 +00:00
dev-bot self-assigned this 2026-04-06 09:54:02 +00:00
dev-bot added
in-progress
and removed
backlog
labels 2026-04-06 09:54:03 +00:00
Author
Collaborator

Blocked — issue #280

Field Value
Exit reason no_push
Timestamp 2026-04-06T09:54:06Z
Diagnostic output
Claude did not push branch fix/issue-280
### Blocked — issue #280 | Field | Value | |---|---| | Exit reason | `no_push` | | Timestamp | `2026-04-06T09:54:06Z` | <details><summary>Diagnostic output</summary> ``` Claude did not push branch fix/issue-280 ``` </details>
dev-bot added
blocked
and removed
in-progress
labels 2026-04-06 09:54:06 +00:00
dev-bot removed their assignment 2026-04-06 09:59:03 +00:00
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: disinto-admin/disinto#280
No description provided.