ci: add /strands-ts command handler#266
Conversation
|
|
||
| # No workflow-level write perms: the read/write split is enforced per job so | ||
| # the agent job never holds a write-capable token. | ||
| permissions: {} |
There was a problem hiding this comment.
Issue: There's no concurrency group. Because this workflow introduces a strands-running label lifecycle (mark-running → clear-running), two /strands-ts comments on the same PR will race: clear-running from the first run can remove the label while the second run is still executing, and you'll also get duplicate concurrent reviews.
Suggestion: Add a per-PR concurrency group so a new invocation supersedes an in-flight one, e.g.:
concurrency:
group: strands-ts-${{ github.event.issue.number }}
cancel-in-progress: true| aws_role_arn: ${{ secrets.AWS_ROLE_ARN }} | ||
| agents_config: ${{ vars.STRANDS_TS_AGENTS || '' }} | ||
|
|
||
| finalize: |
There was a problem hiding this comment.
Suggestion: finalize (and clear-running) have no timeout-minutes. The mirrored strands-command.yml sets timeout-minutes: 30 on its finalize job. Adding a timeout here guards against a hung write-replay step holding the runner indefinitely.
| pr_number: ${{ github.event.issue.number }} | ||
| pr_head_sha: ${{ steps.pr.outputs.sha }} | ||
| aws_role_arn: ${{ secrets.AWS_ROLE_ARN }} | ||
| agents_config: ${{ vars.STRANDS_TS_AGENTS || '' }} |
There was a problem hiding this comment.
Issue: The PR description states this workflow uses the AGENT_SESSIONS_BUCKET secret (matching strands-command.yml, which passes sessions_bucket: ${{ secrets.AGENT_SESSIONS_BUCKET }}), but it's never referenced here.
Suggestion: Confirm whether the strands-ts-runner action needs a sessions bucket. If it does, the input is missing and session persistence will silently break; if it intentionally doesn't, please update the PR description so the secret list is accurate. Either way, worth reconciling before merge.
| username: ${{ github.event.comment.user.login || 'invalid' }} | ||
| allowed-roles: 'triage,write,admin' | ||
|
|
||
| mark-running: |
There was a problem hiding this comment.
Issue: mark-running depends only on authorization-check and has no environment gate, while execute-readonly-agent does (environment: ${{ needs.authorization-check.outputs.approval-env }}). For users routed through a manual-approval environment, the strands-running label is applied before the approval is granted, so a PR can show "running" while actually pending/never-approved.
Suggestion: Consider gating mark-running on the same approval-env so the label only appears once the run is actually approved to proceed.
|
Assessment: Comment Clean, well-scoped additive change. The security posture is the strongest part: workflow-level Review themes
None are blocking on their own; the merge-order block on devtools#68 (already documented) remains the real gate. Nice job keeping the read/write split tight. |
Adds a
/strands-ts <command>handler that runs the new multi-agent TypeScript PR reviewer, alongside the existing/strandscommand. Purely additive and opt-in.This workflow references composite actions (
strands-ts-runner,strands-ts-finalize) that only exist onstrands-agents/devtools@mainafter strands-agents/devtools#68 merges.Do not merge this PR until devtools#68 is merged, or the runner/finalize steps will 404.
Related: strands-agents/devtools#68 (reviewer + actions), strands-agents/devtools#63 (supporting diff-truncation fix).
What's in this PR
strands-ts-command.yml— triggers on/strands-ts, mirrorsstrands-command.yml(same auth gate / rolestriage,write,admin, OIDC,AWS_ROLE_ARN+AGENT_SESSIONS_BUCKETsecrets), and adds thestrands-runninglabel lifecycle. Read-only agent run + deferred-write finalize.strands-command.yml— the existing/strandshandler triggers on thestartsWith('/strands')prefix, which also matches/strands-ts; without this guard both workflows fire on one/strands-tscomment. Auth + finalize conditions now exclude/strands-ts.After merge
Members can manually trigger
/strands-ts reviewon any PR. We tune it on real PRs (lenses/SOPs/model selection are configurable), and once we're happy we can replace the Python reviewer for automatic execution.