Skip to content

Commit 8be8789

Browse files
rgilksclaude
andcommitted
Harden CI: fix Rust pre-commit hook and add post-deploy smoke test
lint-staged ran bare rustfmt, which defaults to edition 2015 and rejects async fn, so any commit touching a .rs file failed the pre-commit hook. Pin it to the workspace edition with rustfmt --edition 2021. Add a Deploy-job smoke test that polls https://pongo.tre.systems/create and fails the run unless it returns 200 with a match code, catching prod-only Durable Object regressions that local wrangler dev (and the e2e suite) cannot surface. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 8311396 commit 8be8789

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,23 @@ jobs:
137137
SENTRY_DSN: ${{ vars.SENTRY_DSN }}
138138
SENTRY_ENVIRONMENT: production
139139
SENTRY_RELEASE: ${{ github.sha }}
140+
141+
# Hit the live site after deploy so a prod-only break (e.g. a Durable Object
142+
# binding that only fails on the edge, never in `wrangler dev`) fails the run.
143+
# /create exercises the MATCH DO namespace, which the e2e suite can't catch.
144+
- name: Smoke test production (Durable Object route)
145+
run: |
146+
url=https://pongo.tre.systems
147+
for i in 1 2 3 4 5; do
148+
out=$(curl -sS -m 20 -w '\n%{http_code}' "$url/create" || true)
149+
status=$(printf '%s' "$out" | tail -n1)
150+
body=$(printf '%s' "$out" | sed '$d')
151+
echo "attempt $i: HTTP $status -> $body"
152+
if [ "$status" = "200" ] && printf '%s' "$body" | grep -q '"code"'; then
153+
echo "Smoke test passed: /create reaches the MATCH Durable Object."
154+
exit 0
155+
fi
156+
sleep 6
157+
done
158+
echo "Smoke test FAILED: /create did not return 200 with a match code."
159+
exit 1

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"prettier": "^3.7.4"
3131
},
3232
"lint-staged": {
33-
"*.rs": "rustfmt",
33+
"*.rs": "rustfmt --edition 2021",
3434
"**/*": "prettier --write --ignore-unknown"
3535
},
3636
"dependencies": {

0 commit comments

Comments
 (0)