Skip to content

Commit f4d3814

Browse files
committed
Merge branch 'main' into dev
2 parents b256ae3 + f9715de commit f4d3814

4 files changed

Lines changed: 101 additions & 25 deletions

File tree

‎.claude/commands/fix-issue.md‎

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,19 @@ Fix issue #$1 in this repository.
1111
2. Find the relevant files. Use Glob and Grep, read before editing.
1212
3. Create a branch off main: `git checkout -b agent/ui-fix-$1 main`
1313
4. Implement the fix.
14-
- Use existing design tokens and utility classes, never hardcoded
15-
hex colours or pixel values.
16-
- Touch only UI/styling files. Do not change business logic,
17-
API calls, or auth.
14+
- Any part of the app is in scope: UI, business logic, API routes,
15+
data fetching, auth. Every PR is reviewed by a human before merge,
16+
so fix what the issue actually asks for instead of narrowing it.
17+
- Follow the conventions in CLAUDE.md: reuse existing components,
18+
icons, hooks, types and utilities; use existing design tokens and
19+
utility classes, never hardcoded hex colours or pixel values.
1820
- Keep the change as small as the issue requires.
21+
- You cannot reach the backend or any network from this run. If the
22+
issue names an endpoint, payload or contract, implement it as the
23+
issue describes, mirror the shape of the existing code you are
24+
replacing, and list the assumption in the PR body under
25+
`## Assumptions` for the reviewer to confirm. Do not stop just
26+
because you cannot verify a backend contract.
1927
5. Verify: `npm run lint` and `npm run build` must both pass.
2028
Fix anything you broke before continuing.
2129
6. Commit and push:
@@ -29,9 +37,14 @@ Fix issue #$1 in this repository.
2937

3038
This runs in GitHub Actions. Nobody will answer questions.
3139

32-
If the issue is too ambiguous to fix safely, do NOT change code.
33-
Instead: comment on the issue explaining what's unclear, add the
34-
`agent-needs-human` label, and stop.
40+
Missing context is not a reason to stop. Pick the most reasonable
41+
reading of the issue, implement it, and record what you assumed in the
42+
PR body — the reviewer corrects it there.
43+
44+
Only bail out when the issue does not describe an actionable change at
45+
all (e.g. it contradicts itself, or the files it refers to do not
46+
exist). In that case: comment on the issue explaining what's blocking
47+
you, add the `agent-needs-human` label, and stop.
3548

3649
## Done means
3750

‎.github/workflows/cd-dev.yml‎

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,40 @@ jobs:
4646
echo "cmd_id=$CMD_ID" >> "$GITHUB_OUTPUT"
4747
4848
- name: Wait for SSM command to finish
49+
timeout-minutes: 20
4950
env:
5051
INSTANCE_ID: ${{ secrets.EC2_STAGING_INSTANCE_ID }}
5152
CMD_ID: ${{ steps.ssm.outputs.cmd_id }}
5253
run: |
53-
WAIT_EXIT=0
54-
aws ssm wait command-executed \
55-
--command-id "$CMD_ID" \
56-
--instance-id "$INSTANCE_ID" || WAIT_EXIT=$?
54+
while true; do
55+
if aws ssm wait command-executed \
56+
--command-id "$CMD_ID" \
57+
--instance-id "$INSTANCE_ID"; then
58+
break # waiter succeeds only on Status == Success
59+
fi
60+
61+
STATUS=$(aws ssm get-command-invocation \
62+
--command-id "$CMD_ID" \
63+
--instance-id "$INSTANCE_ID" \
64+
--query "Status" --output text 2>/dev/null || echo "Pending")
5765
66+
case "$STATUS" in
67+
Success) break ;;
68+
Failed|Cancelled|Cancelling|TimedOut)
69+
echo "Deployment ended with status: $STATUS"
70+
aws ssm get-command-invocation \
71+
--command-id "$CMD_ID" \
72+
--instance-id "$INSTANCE_ID" \
73+
--query '{Status:Status,Stdout:StandardOutputContent,Stderr:StandardErrorContent}' \
74+
--output json
75+
exit 1 ;;
76+
*) echo "Still running (status: $STATUS) — waiter capped out, re-waiting" ;;
77+
esac
78+
done
79+
80+
echo "Deployment completed successfully."
5881
aws ssm get-command-invocation \
5982
--command-id "$CMD_ID" \
6083
--instance-id "$INSTANCE_ID" \
6184
--query '{Status:Status,Stdout:StandardOutputContent,Stderr:StandardErrorContent}' \
6285
--output json
63-
64-
exit $WAIT_EXIT

‎.github/workflows/create-release.yml‎

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,40 @@ jobs:
4646
echo "cmd_id=$CMD_ID" >> "$GITHUB_OUTPUT"
4747
4848
- name: Wait for SSM command to finish
49+
timeout-minutes: 20
4950
env:
5051
INSTANCE_ID: ${{ secrets.EC2_INSTANCE_ID }}
5152
CMD_ID: ${{ steps.ssm.outputs.cmd_id }}
5253
run: |
53-
WAIT_EXIT=0
54-
aws ssm wait command-executed \
55-
--command-id "$CMD_ID" \
56-
--instance-id "$INSTANCE_ID" || WAIT_EXIT=$?
54+
while true; do
55+
if aws ssm wait command-executed \
56+
--command-id "$CMD_ID" \
57+
--instance-id "$INSTANCE_ID"; then
58+
break # waiter succeeds only on Status == Success
59+
fi
60+
61+
STATUS=$(aws ssm get-command-invocation \
62+
--command-id "$CMD_ID" \
63+
--instance-id "$INSTANCE_ID" \
64+
--query "Status" --output text 2>/dev/null || echo "Pending")
5765
66+
case "$STATUS" in
67+
Success) break ;;
68+
Failed|Cancelled|Cancelling|TimedOut)
69+
echo "Deployment ended with status: $STATUS"
70+
aws ssm get-command-invocation \
71+
--command-id "$CMD_ID" \
72+
--instance-id "$INSTANCE_ID" \
73+
--query '{Status:Status,Stdout:StandardOutputContent,Stderr:StandardErrorContent}' \
74+
--output json
75+
exit 1 ;;
76+
*) echo "Still running (status: $STATUS) — waiter capped out, re-waiting" ;;
77+
esac
78+
done
79+
80+
echo "Deployment completed successfully."
5881
aws ssm get-command-invocation \
5982
--command-id "$CMD_ID" \
6083
--instance-id "$INSTANCE_ID" \
6184
--query '{Status:Status,Stdout:StandardOutputContent,Stderr:StandardErrorContent}' \
6285
--output json
63-
64-
exit $WAIT_EXIT

‎.github/workflows/deploy-staging.yml‎

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,40 @@ jobs:
4646
echo "cmd_id=$CMD_ID" >> "$GITHUB_OUTPUT"
4747
4848
- name: Wait for SSM command to finish
49+
timeout-minutes: 20
4950
env:
5051
INSTANCE_ID: ${{ secrets.EC2_STAGING_INSTANCE_ID }}
5152
CMD_ID: ${{ steps.ssm.outputs.cmd_id }}
5253
run: |
53-
WAIT_EXIT=0
54-
aws ssm wait command-executed \
55-
--command-id "$CMD_ID" \
56-
--instance-id "$INSTANCE_ID" || WAIT_EXIT=$?
54+
while true; do
55+
if aws ssm wait command-executed \
56+
--command-id "$CMD_ID" \
57+
--instance-id "$INSTANCE_ID"; then
58+
break # waiter succeeds only on Status == Success
59+
fi
60+
61+
STATUS=$(aws ssm get-command-invocation \
62+
--command-id "$CMD_ID" \
63+
--instance-id "$INSTANCE_ID" \
64+
--query "Status" --output text 2>/dev/null || echo "Pending")
5765
66+
case "$STATUS" in
67+
Success) break ;;
68+
Failed|Cancelled|Cancelling|TimedOut)
69+
echo "Deployment ended with status: $STATUS"
70+
aws ssm get-command-invocation \
71+
--command-id "$CMD_ID" \
72+
--instance-id "$INSTANCE_ID" \
73+
--query '{Status:Status,Stdout:StandardOutputContent,Stderr:StandardErrorContent}' \
74+
--output json
75+
exit 1 ;;
76+
*) echo "Still running (status: $STATUS) — waiter capped out, re-waiting" ;;
77+
esac
78+
done
79+
80+
echo "Deployment completed successfully."
5881
aws ssm get-command-invocation \
5982
--command-id "$CMD_ID" \
6083
--instance-id "$INSTANCE_ID" \
6184
--query '{Status:Status,Stdout:StandardOutputContent,Stderr:StandardErrorContent}' \
6285
--output json
63-
64-
exit $WAIT_EXIT

0 commit comments

Comments
 (0)