Repository navigation
Conversation
The two arrayFold arms of 04752_persisted_expression_cancellation sat about twice their bound rather than four times below it, and arrayfold_orderby reported OVERSHOT 4258ms past a 1000ms limit on Stateless tests (amd_debug, sequential). arrayFold's cancellation checkpoints are in its per-slice fold loop, and in a selector loop that checks only every 0xFFFFF elements; the scatter between them carries none. Both pre-fold phases are O(total array elements), so with the argument spread evenly over 60000 rows the arm ran about 2.9s of uninterruptible prologue before the deadline could be observed. Measured on one debug binary: 2947ms and 2767ms fixed against 5672ms and 5792ms with the per-call status resolution of 37a532b reverted, a margin of 1.78x against a 4000ms bound, where every other arm of the test has 8x to 52x and stops near 1100ms. The fold loop iterates all rows on every slice whatever the individual array lengths are, so concentrating the same number of elements in one row keeps the interruptible work while the prologue drops by the same factor. With range(if(k = 0, 400000, 1)) the arms stop at 1040ms to 1161ms worst case over 50 runs, a 3.45x margin, and still overshoot to about 14.8s with that commit reverted, so the oracle discriminates more sharply than before. Peak memory falls from 2.01 GiB to 1.56 GiB. Both arms are changed rather than only the one that fired: arrayfold_partition had the same 1.78x margin and had not crossed the bound only by luck. No bound is widened, no tag is added, the token oracle and the reference file are untouched, and BOUND is left alone so the kill arms that share it are unaffected. arrayFold's prologue remains effectively uninterruptible, so a fold over a very large evenly shaped argument still observes the deadline late. The query is cancelled, only later than the deadline, and that is left as it is here.
Internal second-model reviewAn independent reviewer read the change cold, then a second model re-reviewed the full diff. No blockers or majors were raised by either. Verdicts below.
Checks that mattered here, and what they found:
|
Pre-PR validation gate (click to expand)
Validation: 50/50 runs pass with randomization on ( |
|
cc @Algunenano, could you review this? It is test-only: the two arrayFold arms of 04752 sat at only 1.78x their cancellation bound because arrayFold's selector loop and scatter run before its first usable checkpoint and are O(total array elements), so concentrating the same fold in one row moves the cost into the checkpointed fold loop without widening any bound. |
|
Workflow [PR], commit [0e92957] AI ReviewSummaryThis PR reshapes the two Final VerdictStatus: ✅ Approve |
|
I am removing the test myself |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
The two
arrayFoldarms of04752_persisted_expression_cancellationsat about twice their boundrather than four times below it, and one reported
OVERSHOT 4258ms past a 1000ms limitonStateless tests (amd_debug, sequential). Surfaced by @ alexey-milovidov on #109454; no related openissue exists. This is not the
greporacle of #113943, which cannot affect it: the failing assertionis the duration oracle, and the two PRs touch disjoint lines of the file.
arrayFold's cancellation checkpoints sit in its per-slice fold loop, but the selector loop andscatterahead of them are O(total elements) and effectively uninterruptible. The old fixture spread1.8e8 elements evenly over 60000 rows, so the arm paid about 2.9s of prologue before the deadline
could be observed, against a 4000ms bound, and crossed it on a slower runner.
Concentrating the same fold in one row (
range(if(k = 0, 400000, 1))) leaves the interruptible workintact, since the fold loop runs
max_array_sizetimes over all rows regardless of individual arraylengths, while the prologue drops by the same factor. No bound is widened, no tag is added, the
oracle and
.referenceare untouched, and peak memory drops from 2.01 GiB to 1.56 GiB. Both arms arechanged: the one that has not fired yet had the identical margin.
Validated on a debug build matching
amd_debug: 50/50 runs pass,.referencematches byte for byte,and the arms stop at 1040-1161ms worst case, a 3.45x margin. With the engine fix of #113456 reverted
on a separately built binary they still redden, at about 14.8s against the old 5.7s, so the oracle
discriminates more sharply than before rather than less.
arrayFold's prologue remains effectively uninterruptible, so a fold over a very large evenly shapedargument still observes the deadline late. The query is cancelled, only later, and that is left as is.