Repository navigation
test: stabilize full-queue UT and preserve timeout failures - #33158
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
This pull request is merged. |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 221599dce98a490227bf23483a92d9521c167a73
Assessment: request_changes
The producer test exercises the existing full-queue behavior and passed 100 race-detector repetitions. The timeout summary still omits complete failures from batch reports whose writers fail to drain.
Model: gpt-6.2-sol / xhigh
Session: 01a1f0a0-5126-78f3-9ab8-ef4e87f2f119 · slot 0 · generation 3
- P2
optools/run_ut.sh:673: A batched test emits a terminal failure before the UT hard timeout, and the batch owner fails to drain during cancellation.
Impact:top.txtcan report[failed_ut_cases] noneeven though a staged shard contains the failed test and its assertion. If CI truncates that shard, investigators can lose both.
Evidence: The handler skips the helper merge at line 1506 and stages the separate shards at line 1537. The new--failuresscan reads only${UT_REPORT}. The joined control showedTestShardFailureintop.txt. The undrained probe verified the assertion in the staged shard and reproduced the empty failure summary (checks/1795514506632045031-2.json,sidecar-probe.jsonl). Reuse the existing report-source selection to include complete newline-terminated records from eligible unmerged shards in the bounded summary while preserving the authoritative report and exit status.
Validation:
-
Verified the frozen head, patch identity, whitespace, Bash syntax, and isolation preflight. Receipts and logs are indexed in
review-validation.md. -
Passed 18 Python report tests and six focused Go runner tests (
checks/1795514417794744528-2.json,checks/1795514458484446996-2.json). -
A real Go timeout fixture confirmed that the summary preserves an earlier failed assertion and labels the still-running test as unresolved (
checks/1795514548121570030-2.json,checks/1795514588695354751-2.json,checks/1795514659592307443-2.json). -
TestProducer_EnqueueFull2passed all 100 race-detector repetitions (checks/1795515166515540501-2.json,producer-race-repeat.jsonl).
Limitations:
- The undrained-owner case was fault-injected through the runner harness. The full Linux x86 UT job was still in progress in the frozen CI snapshot.
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 30f53677f17b78c0357082a5930db97314c8a89c
Assessment: approve
The update resolves the prior finding that undrained helper reports could be archived without appearing in top.txt. The termination path reuses the runner’s existing report selection rules, preserves the authoritative report and exit status, and distinguishes confirmed failures from unresolved output. The producer test observes the full-queue predicate and verifies all 20 records arrive in order.
Model: gpt-6.2-sol / xhigh
Session: 01a1ee80-0d82-7030-a965-b51f496c3054 · slot 2 · generation 1
Validation:
-
The full optools package passed under race with the supplied test executor. All 513 named tests and subtests passed, including the joined and undrained report cases. Receipt 1795519629930366780-3.json and optools-race-retry.jsonl.
-
All 27 Python report tests passed, along with Bash syntax and whitespace checks. A replay of real Go timeout JSON preserved the earlier assertion and labeled the still-running test unresolved. Receipts 1795519381201658905-3.json, 1795519376570138646-2.json, 1795519566336016547-4.json, and 1795519488479502830-3.json.
-
A synthetic 264 MiB replay across four live helper reports retained each seeded failure once and ignored the incomplete records. The parser emitted 4,506 bytes in 2.01 seconds. Receipt 1795519625608922383-3.json and retained-report-scale.stdout.
-
The prior producer run recorded 100 named race passes. The current head differs from that tested head only in optools, so the producer test and its dependencies remain covered. Prior receipt 1795515166515540501-2.json and producer-race-repeat.jsonl.
Limitations:
- Local validation covered the runner harness and report parser. The full repository race UT workflow and external CI artifact upload were outside these runs. The synthetic replay timing measures parser execution only.
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 3a9dcb25c88cf857b87f7795eddaa0d2234e2dbb
Assessment: request_changes
The prefix scan recovers the earlier failure in the 272 MiB control. The shared read cap still leaves a gap in larger undrained reports, so cancellation can lose the only failure that #33156 asks the summary to preserve. The producer test passed all 100 race repetitions.
Model: gpt-6.2-sol / xhigh
Session: 01a20d47-b35e-7bd2-9d5c-61978a866730 · slot 0 · generation 6
- P2
optools/summarize_ut_slow_cases.py:557: A complete failure in an undrained helper report falls beyond that report’s share of the 512 MiB prefix budget and before its retained tail.
Impact: The runner can stage the raw shard while omitting both the failure identity and its assertion from top.txt. If CI clips that part of the shard, investigators lose both details.
Evidence: The cancellation harness staged a 1,040 MiB shard and preserved exit status 125, but top.txt reportednone found in scanned recordsdespite a complete midpoint failure. The 272 MiB control retained the failure and nearby assertion. At that smaller size, seven intervening output records also displaced the assertion from the 4 KiB context window. Seeretention-probe.stdoutand receipts1795524504409233056-2.jsonand1795524505311047246-2.json. Retain bounded failure records and context as helper reports are produced so shutdown can keep its I/O limits.
Validation:
-
Verified the frozen patch, Bash syntax, and whitespace. All 35 Python tests and all 516 optools tests and subtests passed under the race detector for Go.
-
TestProducer_EnqueueFull2passed 100 race-enabled repetitions. -
Matched commands, source fingerprints, receipts, and logs in
validation-reconciliation.json. Recorded all nine discussion dispositions indiscussion-assessment.json.
Limitations:
- The large cancellation probe used a fixture-only overlay and a prebuilt shard after fixture creation hit the harness deadline. The runner code was tested unchanged. The external artifact upload was outside local validation, and the frozen x86 UT job was still pending.
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: d9d6c7d411b78d07a4281fcda5f9b739b0444c01
Assessment: approve
The revised cancellation summary reuses the existing report selector and scans each eligible snapshot once, with bounded failure output. It recovered the failure and separated assertion from the 1,040 MiB midpoint case that the previous scan missed, while preserving the staged raw report and cancellation status.
Model: gpt-6.2-sol / xhigh
Session: 01a20d47-b35e-7bd2-9d5c-61978a866730 · slot 0 · generation 6
Validation:
-
All 35 Python report tests passed. The full optools suite passed in normal and race modes, with 516 named tests and subtests in each run.
-
A fixture-only overlay exercised the frozen cancellation handler with a 1,040 MiB shard. It verified exit status 125, the staged raw report, the recovered assertion, and exclusion of the incomplete final record.
-
Verified and reused the prior 100 race-enabled producer test passes. The changes since that run affect only optools files.
-
Verified the frozen patch, Bash syntax, and whitespace. Recorded all 11 discussion dispositions and reconciled receipts and logs in the diagnostic directory.
Limitations:
-
Scanning time grows with report size. The existing 120-second post-TERM deadline is shared with cleanup and can interrupt summary publication on larger or slower inputs.
-
Local validation covered artifact staging. The external CI upload was outside the local test scope.
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #33156
What this PR does / why we need it:
TestProducer_EnqueueFull2previously spent most of its one-second deadline preparing equivalent payloads and signaled before the second enqueue actually reached a full queue. The test now prepares one payload before its hang guard, observes the existing full-queue predicate, and checks that all 20 records are delivered in order. Production queue behavior is unchanged.When UT terminates before its normal analyzer, a failure can be hidden in the middle of a clipped JSON artifact or remain in a helper report whose writer did not drain. The termination summary now reads the finite snapshot of each eligible report using the existing source selection and reader. It keeps bounded failure identities and output in
top.txt, distinguishes unresolved output, ignores incomplete live records, and leaves the authoritative report and cancellation status unchanged. Invalid records, timing values, and unpaired Unicode do not discard other failures. Superseded prefix/tail scans and their quotas have been removed.Validation:
optoolspackage passed in normal and race modes on Linux/amd64 with Go 1.27.1 (516 named test/subtest passes each). The real TERM harness covered joined and undrained sources, malformed input, and middle-of-report assertion retention.TestProducer_EnqueueFull2passes from the prior head; the producer test and its dependencies are unchanged.optoolspackage on Linux/arm64 and a real Go test timeout, before the latest report-reader changes.go vet, golangci-lint 2.14.0 and the pinned molint passed foroptools; prior vet, incremental lint and successful SCA CI remain applicable to the unchangedpkg/datasyncslice. Bash syntax andgit diff --checkpassed.Each source is scanned once up to its captured size, so scan time grows with report size. The existing 120-second post-TERM hard kill is shared with cleanup and can still interrupt diagnostics for sufficiently large or slow inputs. No new work is added to normal test output production. The separate multi-CN post-KILL replay timeout is tracked in #33157.