fix(bug-verify): fresh UUID Idempotency-Key so re-verification with a different verdict does not 409
Claude-Session: https://claude.ai/code/session_01U3biMxRhFGkwtf4jVTNjcj
This commit is contained in:
@@ -4,9 +4,12 @@ version: 1
|
|||||||
description: "Python dev tools: pytest, ruff, mypy, uv"
|
description: "Python dev tools: pytest, ruff, mypy, uv"
|
||||||
requires: []
|
requires: []
|
||||||
|
|
||||||
packages:
|
# `packages:` removed 2026-09-06 — apt + pip runtime install caused
|
||||||
apt: [python3-venv]
|
# 76h zombie pods (init hung mid apt-get install). python3-venv + uv
|
||||||
pip: [pytest, ruff, mypy, hypothesis, uv]
|
# are now pre-baked into the base image (agent-runtimes/images/base/Dockerfile).
|
||||||
|
# pytest/ruff/mypy/hypothesis are also pre-baked into the base image's
|
||||||
|
# test deps. If you need additional Python tooling, add it to the base
|
||||||
|
# image at build time rather than declaring it here.
|
||||||
|
|
||||||
env:
|
env:
|
||||||
PIP_BREAK_SYSTEM_PACKAGES: "1"
|
PIP_BREAK_SYSTEM_PACKAGES: "1"
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ nodes:
|
|||||||
|
|
||||||
```
|
```
|
||||||
python3 - <<'PY'
|
python3 - <<'PY'
|
||||||
import json, os, urllib.request
|
import json, os, urllib.request, uuid
|
||||||
|
|
||||||
VERDICT = "verified" # or "rejected" — must match your ## Verdict
|
VERDICT = "verified" # or "rejected" — must match your ## Verdict
|
||||||
ITEM_UUID = "${item.uuid}"
|
ITEM_UUID = "${item.uuid}"
|
||||||
@@ -88,7 +88,7 @@ nodes:
|
|||||||
req = urllib.request.Request(url, data=body, method="PATCH", headers={
|
req = urllib.request.Request(url, data=body, method="PATCH", headers={
|
||||||
"Authorization": f"Bearer {token}",
|
"Authorization": f"Bearer {token}",
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"Idempotency-Key": f"bug-verify-verdict-{ITEM_UUID}",
|
"Idempotency-Key": str(uuid.uuid4()),
|
||||||
})
|
})
|
||||||
with urllib.request.urlopen(req, timeout=30) as resp:
|
with urllib.request.urlopen(req, timeout=30) as resp:
|
||||||
print(resp.status, resp.read().decode())
|
print(resp.status, resp.read().decode())
|
||||||
|
|||||||
Reference in New Issue
Block a user