Repository navigation
fix(ci): preserve oxlint shard success after graceful drain - #134449
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 5:33 PM ET / 21:33 UTC. ClawSweeper reviewWhat this changesThe PR preserves a successful oxlint shard result when its detached process group exits naturally during the configured grace period, while retaining failure after forced cleanup. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review This member-authored, maintainer-labelled PR remains open for normal maintainer handling. The introduced change correctly preserves a zero leader exit only when descendant cleanup completed during grace, while retaining failure when the runner had to force-kill the group; no blocking introduced defect was found. Priority: P2 Review scores
Verification
How this fits togetherOxlint shard tooling starts detached lint processes for CI and converts their lifecycle outcomes into the release-lint job’s exit status. The changed cleanup path waits for descendants, decides whether forced termination was needed, then reports the final shard result. flowchart LR
A[Release-lint job] --> B[Oxlint shard runner]
B --> C[Detached shard process group]
C --> D[Graceful descendant drain]
D --> E{Force kill required?}
E -->|No| F[Preserve leader status]
E -->|Yes| G[Fail successful leader]
F --> H[CI job result]
G --> H[CI job result]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +87, Other +1. Total +88 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the cleanup decision at the shard lifecycle owner and merge once the exact-head CI gates complete successfully. Do we have a high-confidence way to reproduce the issue? Yes: current-main source projects a successful leader exit through a forced-teardown path as failure when descendants are still draining; the branch adds deterministic process-group scenarios for both sides of that condition. The tests were not executed because this review checkout is read-only. Is this the best way to solve the issue? Yes: recording force-kill necessity before signaling is the narrow owner-boundary fix. Inferring the result from liveness after cleanup would lose the distinction the reported failure requires. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 41ee2cc04f0c. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
bf6086b to
fd80de8
Compare
|
Merged via squash.
|
What Problem This Solves
Resolves an intermittent CI failure where a successful oxlint shard could make the release-lint job fail with exit code 1 after every shard had finished and no lint diagnostic was emitted. This occurred when the shard leader exited successfully while a same-process-group descendant was still draining inside the configured cleanup grace period.
Observed failure: https://github.com/openclaw/openclaw/actions/runs/33427356955/job/99604560724
Why This Change Was Made
The shard runner now carries the leader exit status unchanged through the grace period. A naturally drained group preserves success; a descendant that survives the grace period and requires SIGKILL still converts a successful leader status into failure. Timeout, parent-termination, and process-group cleanup-failure behavior remain unchanged.
Owner boundary:
scripts/run-oxlint-shards.mtsowns shard lifecycle and exit projection. No lint rules, extension code, workflow fanout, or runner-capacity settings change.Production/tooling LOC: +4/-3. Tests: +88/-1. No obsolete path or compatibility fallback was added.
User Impact
Maintainers no longer get a false-red oxlint job while short-lived descendants finish normally. Real leaked descendants still fail the shard after forced cleanup.
Evidence
expected 0, received 1.tbx_01m1cptqws05w8r47djk6svpmc.git diff --check, and changed-check dry run: passed.The regression table covers both sides of the invariant: natural drain preserves status 0, while a persistent descendant requiring SIGKILL returns status 1 and is confirmed dead.