You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ripr review-guidance pass dies by SIGTERM (oomd-class) on ~1700-file closures: peak memory scales with closure size #3768
Observed from the perl-lsp-swarm CI consumer (6 dispatches, 2026-09-17/18)
Every ripr-review-comments invocation on a large-closure PR (1600–1700 indexed Rust files) dies mid-pass with exit code 143 (SIGTERM), while all smaller closures complete normally.
bound NOT reached; no runner-shutdown line in the log
65-80m job deaths
various
sibling lanes cancelled mid-run in the same windows
Durations match no configured bound. In the drained-window failure there was norunner has received a shutdown signal line — the process group was TERMed silently ~20-30 minutes into the pass. The analysis stage (ripr-pr diff analysis, capped in a docker container) succeeds on the same closures every time; it is specifically the review-guidance stage that dies.
Diagnosis
The signature — variable time-to-death on large closures only, silent SIGTERM, no shutdown marker — fits memory-pressure termination (systemd-oomd TERMs the cgroup on the 16GB hosted runner before the runner-level shutdown marker ever appears). Peak memory of the review-guidance pass appears to scale with the full closure index rather than staying bounded like the analysis stage. That is consistent with ripr's own design intent elsewhere: RIPR_MAX_DIFF_INDEX_FILES exists precisely so the analysis never exhausts host memory — but the guidance stage appears to rebuild or hold an unbounded index of its own.
Request
Make the review-guidance stage's peak memory bounded (chunked guidance windows over the diff closure, or persist/reuse the analysis stage's diff-scoped index instead of rebuilding).
If a memory ceiling is intentional, expose it as a named error (like diff_scope_oversized) so CI can classify the failure instead of failing closed on an unretrievable-log/incomplete-receipt path.
Consumer-side context: perl-lsp-swarm required gate ripr+ New Gap Gate fails closed when the guidance receipt is incomplete (review_guidance.status = incomplete), so these PRs cannot merge until either the pass completes or the classification distinguishes instrument-failure from real gaps. Full evidence trail: EffortlessMetrics/perl-lsp-swarm#15498 (comments 5731363284, 5733075958), #15837, #15857, #15863.
Fifth measured termination (probe re-dispatch after a repository directive to stay on github-hosted runners — no capacity change observed server-side): guidance started 17:44:24Z, killed 18:12:17Z — 27m53s, no runner-shutdown line, same silent SIGTERM. The termination durations across six runs now span 20m10s–29m08s, all well inside the configured bounds (1800s/3600s), confirming the bound is not the limiter and the pass is being terminated externally ~20-30 minutes in on ~1700-file closures — consistent with the memory-pressure diagnosis above.
Consumer note: if a larger github-hosted runner is enabled at the org level (Settings → Actions → Runners), a one-line runs-on label change in the consumer's ripr workflow would immediately give this pass more headroom; otherwise the bounded-guidance fix from the request above is the path.
Design pointer found in the 0.10.0 CLI itself: ripr review-comments --gap-ledger PATH — per its own help text, 'when --gap-ledger is supplied, it does not rerun analysis; it renders only eligible PR-local repair cards from explicit GapRecord records.' That is exactly the bounded shape this issue asks for: guidance becomes a cheap render over explicit GapRecords instead of a full re-index of the closure.
The consumer currently cannot use it because (a) cargo xtask ripr-review-comments does not expose --gap-ledger, and (b) the CI analysis stage (ripr-pr) does not emit a GapRecord ledger — gap-decision-ledger.json today is produced by the swarm tooling (ripr swarm queue), not by the plain diff pipeline.
Suggested upstream shape: have the diff analysis stage optionally emit GapRecords (it has already computed everything the guidance needs), expose --gap-ledger through the xtask wrapper, and the hosted guidance stage drops from a ~1700-file re-index (OOM) to a bounded render. Until then the consumer's four large-closure PRs stay blocked on the hosted-lane terminations documented above.
Sixth measured termination refines the diagnosis — the killer is almost certainly systemd-oomd managed kill, not a configured bound anywhere in the stack:
Solo-window probe (only ripr chain running on the runner pool): guidance ran 20:04:05Z → 20:33:17Z = 29m12s, then exit code 143 (SIGTERM), silent, no runner-shutdown line. Consumer-side verification of the invoking wrapper (run_output_with_timeout) shows its own 3600s watchdog kills the CHILD with SIGKILL and exits with a named 'timed out after 3600s' error — the observed signature (parent cargo xtask TERMed at 143, no error text) cannot come from that path. On github-hosted ubuntu runners, systemd-oomd in managed-kill mode TERMs the cgroup's processes under sustained memory pressure — matching every observation: silent, variable 20-29m (time-to-sustained-pressure on ~1700-file closures), only the largest closures affected, smaller closures unaffected.
Conclusion for the fix design: no timeout configuration on the consumer side can help — the pass needs its peak memory bounded (chunked guidance windows / GapRecord-ledger render via --gap-ledger, per the design pointer above) or a larger-memory runner. Measured durations across all probes: 20m10s, 26m21s, 27m53s, 29m08s, 29m12s.
Staggered-dispatch measurements sharpen the termination profile: with ripr chains dispatched 25-40 minutes apart (near-solo windows), guidance died at 29m12s (20:04:05→20:33:17) and 29m20s (20:43:23→21:12:43) — and a source audit of ripr 0.10.0 finds no internal timeout, budget, or signal use in the review-comments path, while the consumer's own 3600s watchdog demonstrably never fired (it would exit with a named 'timed out after 3600s' error, not 143).
So the termination is external to both ripr and its consumer at a consistent ~29-30 minutes on ~1700-file closures: platform-level reaping of the long-running process (the runner-shutdown marker appears in some rounds, not others). Combined across seven dispatches: 20m10s, 26m21s, 27m53s, 29m08s, 29m12s, 29m20s — the deaths cluster at the top of a ~20-30m band and never exceed it.
Practical consumer consequence: the pass must complete inside ~20 minutes to survive reliably — which the bounded-guidance redesign (chunked windows / --gap-ledger render, design pointer above) would deliver, or the stage must move to infrastructure without the ~30m reaper.
Production data point from perl-lsp-swarm's required ripr+ gate (rip r v0.10.0 pinned, 1,700+-file workspace, GitHub-hosted ubuntu-24.04 4-core, docker 14g):
The guidance pass's memory/cost scaling matches your oomd SIGTERMs: we observe the same class of silent death (runner shutdown / lost-comms evictions at 49–132m) once a PR adds ≳2,000–3,000 lines (empirical flip zone: +1,991 lines passes at 60m total; +2,636 lines fails). Below the flip zone, guidance is ~1s after a ~58m fixed floor; above it, guidance runs 20–70m+ and the job dies before completing.
The fixed floor is size-independent: Build xtask ~6m + PR analysis ~12m + repo-wide baseline receipt ~40m, before guidance starts — so guidance gets whatever headroom remains under the 135m job envelope, and the 3600s --timeout-seconds bound is empirically unreachable (evictions arrive first; zero 3600s SIGTERMs observed in 424 runs since 09-15, all exit-143s are runner-side).
Chunked guidance over the diff closure, or the gap-ledger consumption path (analysis emits a GapRecord ledger; guidance renders from it with zero analysis) would fix this class for us without raising consumer timeouts further.
Happy to provide run/job IDs and step timings if useful — 424 failed runs measured in the last 10 days.
Activity
EffortlessSteven commentedon Sep 18, 2026
Fifth measured termination (probe re-dispatch after a repository directive to stay on github-hosted runners — no capacity change observed server-side): guidance started 17:44:24Z, killed 18:12:17Z — 27m53s, no runner-shutdown line, same silent SIGTERM. The termination durations across six runs now span 20m10s–29m08s, all well inside the configured bounds (1800s/3600s), confirming the bound is not the limiter and the pass is being terminated externally ~20-30 minutes in on ~1700-file closures — consistent with the memory-pressure diagnosis above.
Consumer note: if a larger github-hosted runner is enabled at the org level (Settings → Actions → Runners), a one-line
runs-onlabel change in the consumer's ripr workflow would immediately give this pass more headroom; otherwise the bounded-guidance fix from the request above is the path.EffortlessSteven commentedon Sep 18, 2026
Design pointer found in the 0.10.0 CLI itself:
ripr review-comments --gap-ledger PATH— per its own help text, 'when --gap-ledger is supplied, it does not rerun analysis; it renders only eligible PR-local repair cards from explicit GapRecord records.' That is exactly the bounded shape this issue asks for: guidance becomes a cheap render over explicit GapRecords instead of a full re-index of the closure.The consumer currently cannot use it because (a)
cargo xtask ripr-review-commentsdoes not expose--gap-ledger, and (b) the CI analysis stage (ripr-pr) does not emit a GapRecord ledger —gap-decision-ledger.jsontoday is produced by the swarm tooling (ripr swarm queue), not by the plain diff pipeline.Suggested upstream shape: have the diff analysis stage optionally emit GapRecords (it has already computed everything the guidance needs), expose
--gap-ledgerthrough the xtask wrapper, and the hosted guidance stage drops from a ~1700-file re-index (OOM) to a bounded render. Until then the consumer's four large-closure PRs stay blocked on the hosted-lane terminations documented above.EffortlessSteven commentedon Sep 18, 2026
Sixth measured termination refines the diagnosis — the killer is almost certainly systemd-oomd managed kill, not a configured bound anywhere in the stack:
Solo-window probe (only ripr chain running on the runner pool): guidance ran 20:04:05Z → 20:33:17Z = 29m12s, then
exit code 143(SIGTERM), silent, no runner-shutdown line. Consumer-side verification of the invoking wrapper (run_output_with_timeout) shows its own 3600s watchdog kills the CHILD with SIGKILL and exits with a named 'timed out after 3600s' error — the observed signature (parentcargo xtaskTERMed at 143, no error text) cannot come from that path. On github-hosted ubuntu runners, systemd-oomd in managed-kill mode TERMs the cgroup's processes under sustained memory pressure — matching every observation: silent, variable 20-29m (time-to-sustained-pressure on ~1700-file closures), only the largest closures affected, smaller closures unaffected.Conclusion for the fix design: no timeout configuration on the consumer side can help — the pass needs its peak memory bounded (chunked guidance windows / GapRecord-ledger render via
--gap-ledger, per the design pointer above) or a larger-memory runner. Measured durations across all probes: 20m10s, 26m21s, 27m53s, 29m08s, 29m12s.EffortlessSteven commentedon Sep 18, 2026
Staggered-dispatch measurements sharpen the termination profile: with ripr chains dispatched 25-40 minutes apart (near-solo windows), guidance died at 29m12s (20:04:05→20:33:17) and 29m20s (20:43:23→21:12:43) — and a source audit of ripr 0.10.0 finds no internal timeout, budget, or signal use in the
review-commentspath, while the consumer's own 3600s watchdog demonstrably never fired (it would exit with a named 'timed out after 3600s' error, not 143).So the termination is external to both ripr and its consumer at a consistent ~29-30 minutes on ~1700-file closures: platform-level reaping of the long-running process (the runner-shutdown marker appears in some rounds, not others). Combined across seven dispatches: 20m10s, 26m21s, 27m53s, 29m08s, 29m12s, 29m20s — the deaths cluster at the top of a ~20-30m band and never exceed it.
Practical consumer consequence: the pass must complete inside ~20 minutes to survive reliably — which the bounded-guidance redesign (chunked windows /
--gap-ledgerrender, design pointer above) would deliver, or the stage must move to infrastructure without the ~30m reaper.EffortlessSteven commentedon Sep 25, 2026
Production data point from perl-lsp-swarm's required ripr+ gate (rip r v0.10.0 pinned, 1,700+-file workspace, GitHub-hosted ubuntu-24.04 4-core, docker 14g):
Happy to provide run/job IDs and step timings if useful — 424 failed runs measured in the last 10 days.
EffortlessSteven commentedon Nov 2, 2026
Cursor claim: verifying #3768 against main, then fixing if still open.
EffortlessSteven commentedon Nov 2, 2026
Cursor verify —
origin/main7a8d76e958b96ab1e89b5a5a2f947e3b7ab4593aVerdict: already-done for this issue’s two request items. Tests already pin the behavior, so no PR. Not closing the issue from this pass.
Request 1 — bound review-guidance peak memory (chunked windows or reuse the analysis index)
Landed as chunked evidence windows plus an intentional file/byte admission ceiling below the measured 1,600–1,700-file death band.
7a8d76e958crates/ripr/src/cli/commands/review_comments.rs:37-45(REVIEW_GUIDANCE_MAX_INDEX_FILES_DEFAULT = 1200);docs/CONFIGURATION.mdRIPR_REVIEW_GUIDANCE_MAX_INDEX_FILES225f241d2e:700-745(corpus_admissionthenceiling.enforce):3303-3330guidance_payload_default_admits_current_family_but_refuses_failure_scalecrates/ripr/src/analysis/seam_inventory.rs:2232-2314(RIPR_REVIEW_EVIDENCE_WINDOW_SIZE,classify_evidence_windows)61c377fcfe/e4a3eaa3f7crates/ripr/tests/cli_smoke.rs:34285review_guidance_windows_preserve_output_and_bound_retained_payloadsreview_comments.rs:1096-1142→load_diff_range_with_deadline_and_git_stdout_limit_cored2faffceecRequest 2 — named classifiable ceiling error (not silent SIGTERM / incomplete-receipt)
7a8d76e958review_guidance_oversizedreview_comments.rs:65-69,:108-140GuidancePayloadCeiling::enforcecrates/ripr/src/output/review_comments_receipt.rs:13-16status=failed+ category, publishes no guidance JSON/Markdownreview_comments.rs:3437-3491review_comments_refuses_over_ceiling_closure_with_named_receiptxtask/src/reports/review_comments.rs:1031-1055,:1879write_wrapper_classifies_named_guidance_ceiling_failuredocs/specs/RIPR-SPEC-0012-pr-test-guidance.md:85-97What this does not claim (owned elsewhere; not a remaining #3768 request item)
Vec<u8>andString: remaining perf(review-comments): enforce Git diff byte limits before full-input materialization #5000, open PR perf(review-comments): move Git diff stdout into lossy decode without duplicate buffer (Advances #5000) #12488.cargo xtask ripr-review-commentsstill does not forward--gap-ledger(xtask/src/reports/review_comments.rs:58-64,:92-118). That Sept-18 suggested consumer path was superseded by the perf(review-guidance): bound guidance-stage memory on large closures — budget + named ceiling, chunked windows, index handoff #4388 slice graph; implementing it here would fork perf(review-guidance): reuse the analysis index through the check-output handoff #4692.