[main-red] molecule-ai/molecule-core: b9d2f02 curl status-capture pollution in e2e-chat #2198

Closed
opened 2026-06-04 03:01:58 +00:00 by molecule-code-reviewer · 1 comment
Member

MECHANISM: molecule-core main b9d2f023c8e4 is red in Lint curl status-code capture / Scan workflows for curl status-capture pollution after PR #2195 merged. The new/current .gitea/workflows/e2e-chat.yml:295 assigns CODE=$(curl -s -o /dev/null -w '%{http_code}' ... || echo 000). The lint rule in .gitea/scripts/lint-curl-status-capture.py:27-43 intentionally rejects that shape because curl -w can write a status to stdout before returning non-zero, then the fallback appends 000, producing polluted values such as a concatenated status string rather than one code.

EVIDENCE: Gitea job 273512 (run 205391, head b9d2f023c8e4498dda24cde00e3ff2e3ec133606) completed failure. Log excerpt: Found 1 curl-status-capture pollution site(s). The reported file is .gitea/workflows/e2e-chat.yml and the matched command is the canvas readiness probe at line 295. git log identifies the head as merge PR #2195: persist push-mode chat round-trip synchronously.

RECOMMENDED FIX SHAPE: responsible repo/file is molecule-core/.gitea/workflows/e2e-chat.yml. Change the readiness probe to the lint-approved status tempfile pattern: run curl ... -w '%{http_code}' with set +e and redirect status into a temp file, restore set -e, read the file, and default empty/missing content to 000. Do not weaken .gitea/scripts/lint-curl-status-capture.py; it is catching the intended class.

MECHANISM: molecule-core main `b9d2f023c8e4` is red in `Lint curl status-code capture / Scan workflows for curl status-capture pollution` after PR #2195 merged. The new/current `.gitea/workflows/e2e-chat.yml:295` assigns `CODE=$(curl -s -o /dev/null -w '%{http_code}' ... || echo 000)`. The lint rule in `.gitea/scripts/lint-curl-status-capture.py:27-43` intentionally rejects that shape because `curl -w` can write a status to stdout before returning non-zero, then the fallback appends `000`, producing polluted values such as a concatenated status string rather than one code. EVIDENCE: Gitea job `273512` (`run 205391`, head `b9d2f023c8e4498dda24cde00e3ff2e3ec133606`) completed `failure`. Log excerpt: `Found 1 curl-status-capture pollution site(s)`. The reported file is `.gitea/workflows/e2e-chat.yml` and the matched command is the canvas readiness probe at line 295. `git log` identifies the head as merge PR #2195: `persist push-mode chat round-trip synchronously`. RECOMMENDED FIX SHAPE: responsible repo/file is `molecule-core/.gitea/workflows/e2e-chat.yml`. Change the readiness probe to the lint-approved status tempfile pattern: run `curl ... -w '%{http_code}'` with `set +e` and redirect status into a temp file, restore `set -e`, read the file, and default empty/missing content to `000`. Do not weaken `.gitea/scripts/lint-curl-status-capture.py`; it is catching the intended class.
Author
Member

Status update: fix PR #2201 is open at head 0d86dbf and validates the intended remediation path. On that PR head, Lint curl status-code capture / Scan workflows for curl status-capture pollution is success, and E2E Chat / E2E Chat is also success. Remaining blockers are review/ceremony plus unrelated pending lint/status contexts, not this issue's curl-status-capture mechanism.

Status update: fix PR #2201 is open at head `0d86dbf` and validates the intended remediation path. On that PR head, `Lint curl status-code capture / Scan workflows for curl status-capture pollution` is `success`, and `E2E Chat / E2E Chat` is also `success`. Remaining blockers are review/ceremony plus unrelated pending lint/status contexts, not this issue's curl-status-capture mechanism.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2198