Skip to content

Commit fff6f71

Browse files
graphaelliclaude
andcommitted
ci: address Codex review on smoke test
- fix probe: failed curl emitted '000' then '|| echo 000' appended a second, making code='000000' so the mode=any (MCP) probe passed even when the port was unreachable; use a single fallback (|| true + ${code:-000}) - ensure the smoke-test-failure label exists before searching/applying, so de-dupe is reliable on the first failure in a fresh repo Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 568cde3 commit fff6f71

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

‎.github/workflows/smoke-test.yml‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ jobs:
4747
local name="$1" url="$2" mode="$3"
4848
local code
4949
for i in $(seq 1 30); do
50-
code="$(curl -s -o /dev/null -w '%{http_code}' --max-time 5 "$url" || echo 000)"
50+
code="$(curl -s -o /dev/null -w '%{http_code}' --max-time 5 "$url" || true)"
51+
code="${code:-000}"
5152
if [ "$mode" = "any" ] && [ "$code" != "000" ]; then
5253
echo "✅ $name -> HTTP $code ($url)"; return 0
5354
fi
@@ -93,6 +94,24 @@ jobs:
9394
const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
9495
const body = `The daily stack smoke test failed.\n\nRun: ${runUrl}`;
9596
97+
// Ensure the tracking label exists so the search below (and the
98+
// de-dupe it powers) is reliable in a repo that has never had it.
99+
try {
100+
await github.rest.issues.getLabel({
101+
owner: context.repo.owner,
102+
repo: context.repo.repo,
103+
name: label,
104+
});
105+
} catch (e) {
106+
if (e.status !== 404) throw e;
107+
await github.rest.issues.createLabel({
108+
owner: context.repo.owner,
109+
repo: context.repo.repo,
110+
name: label,
111+
color: 'd73a4a',
112+
});
113+
}
114+
96115
const existing = await github.rest.issues.listForRepo({
97116
owner: context.repo.owner,
98117
repo: context.repo.repo,

0 commit comments

Comments
 (0)