Skip to content

fix(qa-lab): evidence summary hangs when checkout-ref git probe stalls - #111448

Merged
Patrick-Erichsen merged 1 commit into
openclaw:mainfrom
xydigit-zt:fix/qa-lab-evidence-git-probe-timeout
Jul 19, 2026
Merged

Patrick-Erichsen merged 1 commit into
openclaw:mainfrom
xydigit-zt:fix/qa-lab-evidence-git-probe-timeout

Conversation

@xydigit-zt

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where QA evidence summary generation would hang forever when the checkout-ref probe (git rev-parse --verify HEAD) blocked indefinitely — for example a wedged filesystem (NFS), a git credential helper waiting on input, or an otherwise stalled git process. resolveQaEvidenceEnvironment in the QA Lab plugin shells out synchronously with no timeout, so one stuck git process froze evidence metadata resolution, and the evidence summary built on top of it, with no recovery short of killing the process.

Why This Change Was Made

Bounds the probe with a 5s timeout and SIGKILL, matching the bounded-probe pattern already used for similar synchronous lookups (process-tree CPU snapshot, daemon Node binary lookup). On timeout the existing error handling already degrades gracefully: the checkout ref falls back to GITHUB_SHA, then null, so evidence output is still produced. Non-goal: changing ref precedence or the fallback chain.

User Impact

QA evidence and summary generation now completes within ~5s even when git is wedged, emitting the same metadata shape with an env-fallback or null ref instead of hanging forever. Happy-path behavior is unchanged.

Evidence

Real before/after run calling the exported resolveQaEvidenceEnvironment with git replaced by a wedged shim (sleep 60):

== BEFORE (original HEAD) (PATH shimmed, git wedges 60s) ==
RESULT: HUNG — still blocked after 12s, killed
== AFTER (fixed) (PATH shimmed, git wedges 60s) ==
RETURNED after 5002ms ref=null
RESULT: exited code=0

Happy path with real git unchanged: RETURNED after 8ms ref=ec01949d86281746f6c2e1c1ba3c8b63b0b18298.

New regression test evidence-environment.test.ts covers: probe invoked with timeout: 5_000 + killSignal: "SIGKILL", GITHUB_SHA fallback on probe timeout, OPENCLAW_QA_REF precedence without invoking git, and null ref when the probe fails.

✓ |extension-qa| extensions/qa-lab/src/evidence-environment.test.ts (4 tests) 68ms
Test Files  1 passed (1)   Tests  4 passed (4)

Sibling evidence suites also pass: evidence-summary, evidence-gallery, scorecard-evidence → 20 tests passed. oxfmt/oxlint clean.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Jul 19, 2026
@clawsweeper

clawsweeper Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 19, 2026, 10:44 AM ET / 14:44 UTC.

Summary
The branch bounds QA Lab’s synchronous checkout-ref git rev-parse probe to five seconds with SIGKILL and adds regression coverage for its existing environment fallbacks.

PR surface: Source +6, Tests +66. Total +72 across 2 files.

Reproducibility: yes. The supplied before/after terminal run uses a PATH-shimmed git that stalls, demonstrates the current unbounded behavior, and shows the patched function returning after the five-second timeout.

Review metrics: none identified.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Next step before merge

  • No mechanical repair is indicated; this PR needs ordinary maintainer review and completion of its required checks.

Security
Cleared: The diff does not add dependencies, permissions, network access, or new command execution; it only bounds an existing local git invocation and retains discarded stderr/stdin behavior.

Review details

Best possible solution:

Land the bounded probe with its fallback-preservation tests after the normal required checks complete, retaining the existing reference precedence and metadata shape.

Do we have a high-confidence way to reproduce the issue?

Yes. The supplied before/after terminal run uses a PATH-shimmed git that stalls, demonstrates the current unbounded behavior, and shows the patched function returning after the five-second timeout.

Is this the best way to solve the issue?

Yes. Adding a timeout at the existing synchronous probe is the narrowest maintainable fix because the established fallback chain already handles a failed probe without changing ref precedence.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 783a5d21cfc1.

Label changes

Label changes:

  • add P2: A wedged QA evidence process can block evidence generation, but the affected QA workflow has limited blast radius and the patch is narrowly bounded.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides after-fix terminal evidence using a real wedged git shim and a real-git happy path, directly demonstrating the changed process-timeout behavior.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body provides after-fix terminal evidence using a real wedged git shim and a real-git happy path, directly demonstrating the changed process-timeout behavior.

Label justifications:

  • P2: A wedged QA evidence process can block evidence generation, but the affected QA workflow has limited blast radius and the patch is narrowly bounded.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body provides after-fix terminal evidence using a real wedged git shim and a real-git happy path, directly demonstrating the changed process-timeout behavior.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides after-fix terminal evidence using a real wedged git shim and a real-git happy path, directly demonstrating the changed process-timeout behavior.
Evidence reviewed

PR surface:

Source +6, Tests +66. Total +72 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 6 0 +6
Tests 1 66 0 +66
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 72 0 +72

What I checked:

  • Current-main behavior and patch boundary: The branch adds timeout: 5_000 and killSignal: "SIGKILL" to the pre-existing synchronous git rev-parse --verify HEAD call; because these options are additions in the PR diff against the stated main base, current main retains the unbounded call. (extensions/qa-lab/src/evidence-environment.ts:12, 7cbeb59417a8)
  • Fallback behavior is preserved: The change is scoped to the process invocation; the PR’s regression tests cover explicit override precedence, GITHUB_SHA fallback after probe failure, and null when neither source resolves. (extensions/qa-lab/src/evidence-environment.test.ts:20, 7cbeb59417a8)
  • After-fix real behavior proof: The PR body records a PATH-shimmed real run where the original call remained blocked beyond 12 seconds, while the patched call returned after about 5 seconds with ref=null; it also records an unchanged successful real-git path. (7cbeb59417a8)
  • Patch provenance: The proposed behavior is introduced by the single head commit titled “fix(qa-lab): bound evidence checkout ref git probe with timeout.”. (extensions/qa-lab/src/evidence-environment.ts:7, 7cbeb59417a8)

Likely related people:

  • xydigit-zt: The supplied PR metadata identifies this contributor as the author of the focused QA Lab timeout repair; no independent current-main feature-history owner was available in the review evidence. (role: current QA Lab repair contributor; confidence: low; commits: 7cbeb59417a8; files: extensions/qa-lab/src/evidence-environment.ts, extensions/qa-lab/src/evidence-environment.test.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@Patrick-Erichsen
Patrick-Erichsen merged commit a0c3067 into openclaw:main Jul 19, 2026
161 of 169 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 20, 2026
zooqueen pushed a commit to zooqueen/openclaw that referenced this pull request Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: qa-lab P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants