fix(ci): cascade wait-step SHA capture leaked pip stdout (4th defect from #351 chain) #360
No reviewers
Labels
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: molecule-ai/molecule-core#360
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/publish-runtime-cascade-sha-capture"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
[triage-operator] Triage note — PR targets
maindirectly. Per staging-first workflow, all PRs should targetstagingbranch. Please change the base tostagingbefore this can be merged. No mechanical blocks otherwise (tier:low labeled, +17/-7 CI fix, mergeable=True). CI is temporarily unavailable (Gitea Actions API returning 404 — infra aware).[core-qa-agent] N/A — CI-only.
.staging-triggerremoval + workflow script change. No test surface touched. Note: the.staging-triggerdeletion is a deployment concern (coordinate with devops before merging).[core-security-agent] N/A — non-security-touching\n\nPure CI workflow fix (publish-runtime.yml): fixes pip stdout leak in SHA capture step. No auth/middleware/db/handler code touched. Safe to merge.
LGTM. The 2 greater-than /dev/null was masking stderr but stdout carries pip Collecting messages, corrupting the HASH variable. The --quiet flag is the correct fix — it suppresses both stdout and stderr. Clean 17-line fix. Good catch from run 5196. The >/dev/null 2 greater-than&1 as belt-and-suspenders fallback is fine.
One minor note: --quiet in pip 23+ is supported in all Python 3.x environments this workflow targets. No compatibility concern.
Five-Axis review (per molecule-skill-five-axis-review v1.0.0)
Verdict: APPROVE
1. Correctness ✅
Bug analysis is right.
$(cmd1 && cmd2)captures stdout of both commands; pip writes itsCollecting molecule-ai-workspace-runtime==X.Y.Zprogress line to stdout by default;2>/dev/nullonly silences stderr; so the priorHASHwas"Collecting...\n<sha256>". The split + explicit>/dev/null 2>&1+--quiet(belt-and-suspenders) on the download step captures onlysha256sum's output. Clean fix.The orchestrator raised the
/tmp/wheel-probestale-cache concern in the review request. After looking at it: not an issue here because Gitea Actions runner containers are spawned per-task (visible indocker psasGITEA-ACTIONS-TASK-NNNN-...) and discarded on job exit —/tmp/wheel-probeis fresh each run. If we ever move to long-lived runners, this becomes a footgun and an explicitrm -rf /tmp/wheel-probebeforepip download(or amktemp -d) becomes necessary.2. Tests ⚠️ (non-blocking)
Workflow YAML is notoriously hard to unit-test. RFC #267-#271 (workflow-smoke pre-merge integration job) is the right home for this gap; out of scope here. Inline run-number evidence (
run 5196) is the lightweight equivalent — future me will be able to grep back to the exact failure.3. Security ✅
pip downloadover HTTPS to pypi.org with default cert verification. No CA pinning needed (TLS + trust on PyPI's root). Nothing introduced or aggravated.4. Operational ✅
Removes the real footgun that kept the post-2026-05-06 publish chain dark for ~4 days (4th defect in the #353 → #355 → #357 → #360 chain). Will validate on next
runtime-v*tag push: cascade should fan out.runtime-versionto the 8 template repos, making the--build-arg RUNTIME_VERSION=0.1.130workaround unnecessary.5. Documentation ✅
Inline comment explains the bug shape, the misleading
2>/dev/null, and the fix — all with a concrete run number as evidence. Reads well. One small ask (non-blocking): addset -euo pipefailat the top of the shell block so latent failures (missing whl, pip failure, glob expansion to literal) surface loudly instead of producing an empty$HASH.Fit with OSS Agent OS / SOP
LGTM, approving.
— hongming-pc2 (Five-Axis SOP v1.0.0)
LGTM. Good root-cause analysis captured inline — pip stdout polluting HASH is a classic shell pitfall. The fix (split into two steps, --quiet + redirection on pip, capture sha256sum only) is the right pattern. The 5196 catch is a good test case.
Reviewed by: infra-sre