Repository navigation
fix(test-utils): bound git ls-files probe with timeout - #111171
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 11:23 AM ET / 15:23 UTC. ClawSweeper reviewWhat this changesThe branch limits the shared Merge readinessNo blocking findings. This PR repairs the shared test-file inventory boundary, addresses the prior review comments, and has sufficient exact-head behavior proof; it remains open for normal maintainer landing after current-head CI completes. Priority: P3 Review scores
Verification
How this fits togetherRepository contract tests and guardrails ask a shared helper for Git-tracked paths, then inspect those paths for forbidden imports or deprecated APIs. The helper feeds either a sorted existing-file list into those scans or an unavailable result that guards must surface visibly. flowchart LR
A[Test or contract guard] --> B[Tracked-file helper]
B --> C[Git tracked-file lookup]
C --> D{Lookup succeeds?}
D -->|Yes| E[Existing sorted paths]
D -->|Timeout or failure| F[Unavailable result]
E --> G[Guard scans files]
F --> H[Guard throws diagnostic]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +4, Tests +65. Total +69 across 6 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Merge the focused helper-owner repair once required checks finish on the exact head, retaining null as the canonical unavailable result and explicit failures for guardrails that require complete inventory. Do we have a high-confidence way to reproduce the issue? Yes, by source and exact-head behavior evidence: current main has no wall-clock bound on the synchronous Git child, and the submitted proof exercises a stalled child returning through the helper's unavailable path in about five seconds. Is this the best way to solve the issue? Yes. The timeout belongs in the shared helper that owns the child process; changing only individual guardrails would leave other consumers exposed, while the branch separately fixes the four guards that could silently pass on unavailable inventory. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7fabb5564831. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (7 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
b7c263b to
888c9d7
Compare
Co-authored-by: 唐梓夷0668001293 <[email protected]>
888c9d7 to
f88ce40
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
* origin/main: (78 commits) fix(parallels): recover Windows poll transport failures (#118479) fix(channels): deny unauthorized Discord and Telegram binding access (#118704) fix(test): bound shared git inventory lookup (#111171) fix(onboard): keep referenced provider secrets out of plaintext (#118702) docs: show canonical agent roster configuration (#118722) fix(channels): generate catalog from package manifests (#118097) fix(zalouser): distinguish probe timeout from auth failure (#111336) improve(ui): cut E2E shard runtime by reusing the bundle (#118697) fix(cli): publish completion caches atomically (#118715) fix(whatsapp): honor disabled self-chat without widening group access (#118711) fix(voice-call): terminate carrier calls after realtime startup failures (#118699) fix(slack): isolate GovSlack media trust and delivery (#118695) fix(browser): wrap page-controlled action results (#118691) fix(security): sanitize JSON-escaped forged content boundaries (#118698) test(qa): prove real yielded-child completion and channel delivery (#118707) fix(doctor): honor explicit plugin-only migration authority (#118700) fix(security): detect child_process calls through aliases and computed members (#116304) test(gateway): avoid async facade mock race (#118708) fix(gateway): preserve final speech during transcription shutdown (#118693) fix(gateway): resume durable outbound delivery retries (#118694) ...
Co-authored-by: Vincent Koc <[email protected]>
* origin/main: fix(parallels): recover Windows poll transport failures (openclaw#118479) fix(channels): deny unauthorized Discord and Telegram binding access (openclaw#118704) fix(test): bound shared git inventory lookup (openclaw#111171)
What problem this solves
listGitTrackedFiles()synchronously runsgit ls-fileswithout a wall-clock bound. A stalled Git process can block every guard or test that consumes the shared inventory helper.The original branch added a timeout, but still allowed four guardrails to turn inventory failure into an empty list and pass silently. It also exported a test-only timeout constant and used a platform-specific executable-shim test.
Canonical fix
git ls-filescall to 5 seconds withSIGKILL.[].spawnSynctests for the timeout options, sorted existing-file projection, and failure caching.No config, Plugin SDK, product behavior, or runtime feature surface changes.
Evidence
Exact rewritten head:
f88ce40b1af1f7792914ce7bd2fa83ae9bd38636ETIMEDOUT/SIGKILL; no process remained.git ls-files.git diff --check, scopedoxfmt, and scopedoxlint: clean.check-changed --dry-run:core,coreTests,extensions, andextensionTests.Scope
Production delta:
+4/-0insrc/test-utils/repo-files.ts. Remaining changes are tests and guardrail assertions.Changelog not required: this changes test/guard infrastructure only.