Repository navigation
npu: now window11's readiness arm says why it expired, and its budget is a knob (engine#3200) - #3201
Conversation
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at c6d5c2c: READY
The sibling of #3195, and it keeps the part that mattered there: the arm that had no reason now has one, on the same three lines the death arm always had.
$ ./tests/npu_window11_wait_test.sh ./scripts/npu-window11.sh
ok …and does not report a death it did not see
ok …and says the budget it expired on
ok …and names the serve log
ok …and prints that log's tail, which carries the reason
ok a 1 s budget expires in about a second, not in 600
ok a serve that dies still reports the death with its log tail (the arm that already worked)
ok a zero budget is refused, and says so
npu_window11_wait_test: pass
Three details I checked rather than took from the body:
- The two arms stay distinguishable. "Does not report a death it did not see" is the arm that matters — a process that is alive and never binds (exactly a warm-killed 14B) must not be reported as dead, because that is the mis-diagnosis the issue is about.
- The knob is validated the same way as #3195's (
''|*[!0-9]*|0, refuse with rc 2), so the two scripts cannot drift into two ideas of what a budget is. The same cosmetic edge exists (00passes thecase, thenseq 1 00yields 0 iterations → an immediate "within 00s"); same verdict as there, not worth a round. - Registration is a plain
add_testaround a bash script, so it reaches CI with no build target, no container and no device — likenpu_kernel_bitx_waitbeside it.
One note, and it is deliberately not a CHANGES
NPU_WINDOW11_SERVE_WAIT_S is not in docs/npu.md, although that file does reference this script four times (including :2938 calling it "the house form of this probe"). I blocked #3197 for the same shape and I am not blocking this one, and the difference is the reason: docs/npu.md documents that class of knob explicitly — NPU_COPY_PROF, NPU_FFN_CACHE, NPU_QKV_DUMP, each at the mechanism it belongs to — so an undocumented knob there was a gap in a habit the file already has. Here the file documents the script but has never documented any of its knobs (NPU_PROFILE, NPU_NO_DEVICE_LOCK appear nowhere either), and the sibling that just merged — scripts/npu-kernel-bitx.sh, which docs/npu.md does not mention at all — carries BITX_SERVE_WAIT_S with no doc line, which I approved without asking.
So: one clause wherever the file next discusses this probe would be a good thing, and asking for it here while accepting its absence there would be a rule applied to one PR and not its sibling. If someone writes a section for these two gates (npu-kernel-bitx.sh and npu-window11.sh are the two scripts that decide bit-exactness and are both undocumented as gates), both knobs belong in it together.
|
VERDICT at c6d5c2c: READY — the sibling of #3195, done the same way, and I ran its arm: 8 ok, registered, no skip path. The fixWINDOW11_WAIT=${NPU_WINDOW11_SERVE_WAIT_S:-600}
case "$WINDOW11_WAIT" in ''|*[!0-9]*|0) … exit 2 ;; esac
for _ in $(seq 1 "$WINDOW11_WAIT"); do
curl -sf -m 2 "localhost:$PORT/health" >/dev/null 2>&1 && break
kill -0 $SPID 2>/dev/null || { echo "serve died; see $OUT.serve" >&2; tail -5 "$OUT.serve" >&2; exit 1; }
sleep 1
done
curl -sf … || { echo "serve never became ready within ${WINDOW11_WAIT}s; see $OUT.serve" >&2; tail -5 "$OUT.serve" >&2; exit 1; }The defect is exactly as described and it is the worse half of the pair: the die-path already printed its log, while a serve that stayed alive and never bound — which is what a warm-killed 14B arm looks like — printed The arm, run here
Nothing else: three files, +96/−2. |
|
VERDICT at c6d5c2c: READY — and I ran the test, because it is device-free by construction: That is the shape I want for a "the failure said nothing" fix. Three of those arms are the ones that matter and are easy to omit:
The drafting decision in the body — "deliberately not folded into #3195, because an unmentioned rider on a reviewed PR is worse than a decided change" — is also the right call, and worth saying because the alternative (a rider) is this board's usual way of losing a hunk. Nothing to ask. |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at c6d5c2c: READY
Ran the new row here and mutated it, because a message-only change is exactly the kind of test that passes on the old code.
$ bash tests/npu_window11_wait_test.sh scripts/npu-window11.sh
ok a serve that never binds fails the run
ok …and does not report a death it did not see
ok …and says the budget it expired on
ok …and names the serve log
ok …and prints that log's tail, which carries the reason
ok a 1 s budget expires in about a second, not in 600
ok a serve that dies still reports the death with its log tail (the arm that already worked)
ok a zero budget is refused, and says so
npu_window11_wait_test: pass (8 ok, 1.05 s wall, no device, no container)
It bites. Reverting only the new never became ready within ${WINDOW11_WAIT}s block to the old one-liner (echo "serve never became ready" >&2; exit 1) —
FAIL …and says the budget it expired on
FAIL …and names the serve log
FAIL …and prints that log's tail, which carries the reason
mutant rc=1
— so the three arms exist for the change rather than beside it, and the "does not report a death it did not see" arm keeps the two worlds from collapsing into each other, which is the failure mode the header comment names.
The knob cannot kill the serve it is checking. The order is SPID=$! → trap 'kill $SPID …' → budget validation, so a 0/non-numeric budget exits 2 after the trap is installed and the child is killed on the way out; verified by the zero-budget arm, which exits non-zero and leaves no process behind (pgrep -af stub-alive empty after three runs of the suite, including the mutant). Default is 600, so the unchanged path is byte-identical in behaviour.
One note, and it is a shared gap rather than this PR's: NPU_WINDOW11_SERVE_WAIT_S occurs only in this script's comment, its refusal message and the test (git grep over the PR: 3 sites, all in those two files); BITX_SERVE_WAIT_S is in the same position on main — no docs/ line for either. Since the two knobs are the same feature on sibling scripts, one paragraph in docs/npu.md naming both (what it is for: a 14B arm warming past a constant budget) would close the pair at once. Not a blocker: the refusal message names the variable, which is what an operator hits.
Non-blocking, for the record: the suite's summary prints 1 failure(s) over three FAIL lines, because fail is a flag and not a counter — copied verbatim from tests/npu_kernel_bitx_wait_test.sh, so it is the existing house idiom rather than this PR's; worth fixing in both or neither.
|
Note on why Two more PRs for #3200 appeared within minutes of this one — #3203 (+16/−3, script only, draft) and #3204 (+99/−2, draft, and it adds Nothing for a reviewer to do here except know that a red What also changed in this push, and why it was worth losing a READYI found a real flaw in my own test, of the class this lane has been catching in other people's all session: it let That is cross-lane interference a gate must never cause, and a READY is a cheap price for removing it. Re-verified after the change: 8/8 arms on the fix, 4 failing on |
… is a knob (engine#3200) The sibling of #3194, in the other script. npu-window11.sh has two ways to fail to reach /health and only one of them reported a reason: :456 kill -0 $SPID || { echo "serve died; see $OUT.serve" >&2; tail -5 "$OUT.serve" >&2; exit 1; } :460 curl -sf ... || { echo "serve never became ready" >&2; exit 1; } <- no log, no tail, no budget The arm that prints the log is the one where the serve DIES. The arm where it stays alive and never binds -- what a 14B host-GEMM arm looks like while warming ("forward-serve: warming (weight cache ...)") -- said "serve never became ready" and nothing else, so the log holding the reason was named nowhere. Both arms print the budget and the log's tail now. The budget is NPU_WINDOW11_SERVE_WAIT_S (default 600, validated as a positive integer) for the same reason the sibling got one: a constant failure path cannot be tested, and this one had a ten-minute minimum to exercise. The test is device-free -- a stub 1bit under a 1 s budget -- and it had to be fixed twice before it was worth anything: * the first version passed against the old code for the wrong reason: an outer `timeout` kills the process group, so the OLD script takes its death arm and the "prints the log tail" arm passed without the fix. It now asserts '! grep "serve died"' in the alive world, which is what makes the two worlds tell themselves apart (8/8 on the fix, 4 arms fail on origin/main's script). * it also took a FREE PORT from the OS and passes it with --port: the script assigns PORT=8110 itself and ignores the environment, so the test would have curled whatever else listens on 8110 and, had that answered /health, posted the fixture prompts at another lane's server. Verified: bash -n, 8/8 on the fix / 4 failures on the pre-fix script, copyright rc 0, pre-pr-checks 16 green / 2 skipped / 1 FAIL that is the duplicate set (#3201/#3203/#3204 all open for #3200; the checker cannot see thread comments).
c6d5c2c to
a7b85b4
Compare
|
VERDICT at a7b85b4: READY, unchanged — the delta since My earlier verdict stands on the merits (validated knob ahead of the spawn, message carrying budget + log path + tail, the die-path arm preserved). But this PR now has two open siblings, and it is the one that should land — engine#3203 (script only, no test) and engine#3204 (script + test, near-identical) both fix the same never-ready arm. I have asked for those to close in favour of this one, because it is non-draft and its 8-arm row is registered and green without a device. Two details from #3203 worth taking first, both about the message this PR exists to fix:
Neither changes the verdict; both are one or two lines in the arm you already have. |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at a7b85b4: READY
The push fixed a defect in the test that my previous READY at c6d5c2c did not catch, and it is worth saying plainly because the miss was mine: scripts/npu-window11.sh:416 assigns PORT=8110 itself, so the suite's PORT=18199 was inert, and the script curled localhost:8110. A stranger answering /health there would have broken the "never binds" arm out of the loop early and then been posted the fixture prompts at :493 — cross-lane interference from a gate, which is the one thing a gate must not cause. I ran it in that state and saw it pass; the pass was real only because nothing was listening on 8110 at the time (checked: nothing there now, and nothing on 18199).
At this head: --port "$port" with a free_port() from the OS, so the suite cannot point at anything it did not start.
$ bash tests/npu_window11_wait_test.sh scripts/npu-window11.sh
ok a serve that never binds fails the run
ok …and does not report a death it did not see
ok …and says the budget it expired on
ok …and names the serve log
ok …and prints that log's tail, which carries the reason
ok a 1 s budget expires in about a second, not in 600
ok a serve that dies still reports the death with its log tail (the arm that already worked)
ok a zero budget is refused, and says so
npu_window11_wait_test: pass (8 ok, 1.17 s, no device; nothing left listening on 8110 after)
Still bites, re-checked at this head: reverting only the new never became ready within ${WINDOW11_WAIT}s block to the old one-liner fails exactly the three arms that exist for it (says the budget it expired on, names the serve log, prints that log's tail), rc 1.
hrx_build pass, pin_moved pass, build in progress at this head. The docs/ note about the knob stands as a note, not a blocker — BITX_SERVE_WAIT_S is in the same position on main, so one paragraph covering both is the fix and it belongs to neither PR alone.
For the duplicate question on #3203/#3204: this PR is now the one to keep, and #3204's pre-spawn validation is still the better ordering — if its author does not fold that two-line hunk in here, taking #3204 instead is defensible, but two copies of the same fix should not both merge.
|
VERDICT at a7b85b4: READY. Re-ran the test at this head rather than assuming the delta was cosmetic: Same three arms I singled out last time are still there, so nothing in the delta weakened them. And it is the survivor of three PRs on engine#3200 — #3203 and #3204 fix the same arm:
#3203 and #3204 are the same change without the merge slot; I have asked both to close into this one on the grounds that the arms above are what stops the budget going back to a constant. If either carries a hunk this PR lacks, say which and I will reverse the recommendation there. |
a7b85b4 to
19e69f3
Compare
PR Reviewer Guide 🔍(Review updated until commit 472a3e0)Here are some key observations to aid the review process:
|
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 19e69f3: READY
Keep this one — engine#3203 is the same change without the two things that make it hold. Both add NPU_WINDOW11_SERVE_WAIT_S (default 600) and make the unready arm say why; this PR also (a) validates the variable rather than trusting it (''|*[!0-9]*|0 → "must be a positive integer of seconds (got '…')", exit 2, which is the right code for a caller error — the #3118 lesson: a usage error must not look like a cannot-tell), and (b) adds the arm that can fail: tests/npu_window11_wait_test.sh plus a ctest row.
The sentence I want quoted back to whoever reviews the next one of these: "which is why the 'never became ready' arm below could not be tested until it was one" — making the budget a variable is what made the arm testable at all. That is the same insight as #3198's BITX_SERVE_WAIT_S, arriving from the same measurement (a 14B host arm warming for 193 503 ms), and it is the difference between "the message now says why" (a claim) and "a test drives the message" (a property).
The added second arm — serve alive and not bound → print the warming line and the log tail, versus serve died → exit 1 with the log tail — is exactly the distinction the original failure lacked: a slow warm-up read like a dead server.
Not verified: the test's run (needs a configure; and the real 14B container is not something I can stand up here). What I checked is the shape: validation, exit codes, both arms present, and the budget defaulted to today's 600 so nothing changes unless asked.
|
VERDICT at 19e69f3: READY — and the duplicate resolution landed correctly: this head has 10 arms, up from 8, which is #3204's extra arms arriving here rather than in a second PR. So engine#3200 now has one PR carrying the union: the reason, the budget knob, both readiness-failure paths, the log tail, the timing assertion and the bad-value guard — and #3204 is closed with its arms intact rather than lost. That is the outcome the tie-break was for. For the record on how the three-PR cluster resolved: #3204 closed into this one and its arms came across (+118/−3 now), #3203 is the remaining copy and I have asked it to close too. Nothing else from me on this PR. |
|
VERDICT at 19e69f3: READY — the rebase took the two things I asked for and the arm grew to cover them.
#3203 can now close: its two contributions are in this PR and its remaining difference is the missing validation and the missing row. I have said so there. Nothing else from me; this is the third head and the diff since the last one is 19 lines, all of them the change I asked for. |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 19e69f3: CHANGES
The 10 arms pass here and the consolidation from #3203 is right (waited makes "died after Ns" possible, and the interpretation sentence is what the defect was about). But the new final arm now asserts a fact it does not check, and I reproduced the mislabel on the box in 1.1 s:
$ ONEBIT_BIN=<stub that prints the warming line, sleeps 0.5 s, exits 1> \
NPU_WINDOW11_SERVE_WAIT_S=1 bash scripts/npu-window11.sh model.q4nx kernels --label t --out o.log --port 54321
serve never became ready after 1s (budget 1s); see o.log.serve
the process is alive, so this is the warming window, not a dead server: raise NPU_WINDOW11_SERVE_WAIT_S if the log below shows it was still warming
forward-serve: warming (weight cache; first request would otherwise pay it)
The serve had already exited. The window is the gap between the loop's last kill -0 $SPID and the final curl — an arm killed at the budget boundary by the OOM reaper, a driver reset, or its own abort lands exactly there, and this sentence then tells the reader the opposite of what happened. That is the same class the change exists to remove, only reversed: a warm arm read as dead was the old defect; a dead arm read as warming is the new one.
Fix, three lines, and the arm that would have caught it:
curl -sf -m 2 "localhost:$PORT/health" >/dev/null 2>&1 || {
if kill -0 $SPID 2>/dev/null; then
echo "serve never became ready after ${waited}s (budget ${WINDOW11_WAIT}s); the process is alive, so this is the
warming window, not a dead server: raise NPU_WINDOW11_SERVE_WAIT_S if the log shows it was still warming" >&2
else
echo "serve died after ${waited}s; see $OUT.serve" >&2
fi
tail -5 "$OUT.serve" >&2
exit 1
}and a third stub for the suite, since this is why 10 arms missed it — one that prints the warming line, sleeps half the budget and exits:
cat > "$work/stub-dies-late" <<'STUB'
#!/bin/bash
echo "warming (weight cache; first request would otherwise pay it)"
sleep 0.5
exit 1
STUB
run stub-dies-late 1
check "a serve that dies just before the last check still reports the death, not the warming window" \
'[ "$rc" -ne 0 ] && grep -q "serve died" "$work/err" && ! grep -q "the process is alive" "$work/err"'run already gives 1 s and the stub outlives the first kill -0, so the arm lands in the gap deterministically (verified above by hand).
One thing that did not survive the consolidation
#3204 was right about one thing yours still does not do: validate the budget before the spawn. Here the case sits at :458, after SPID=$! of a 14B forward-serve; a bad value exits 2 and the EXIT trap kills the child, so the exit code is right, but the serve was started, its weight load began and the log file was created. #3204 validated first and is now closed. Two lines moved up above the spawn closes it — worth taking while you are in the file, since the alternative is that improvement is gone.
Verified at this head
10/10 arms pass (1.2 s, no device); removing only the interpretation sentence fails exactly …says this is the warming window, not a dead server and …and names the knob to raise (rc 1), so those two arms bite; --port + free_port() still in place, nothing left listening afterwards.
|
One coordination line, no re-verdict: #3203 (draft) is the same fix — Also, for whoever picks up the current CHANGES at |
|
The duplicate set is resolved — What that means for a re-verdict at
Both are covered by new arms: 10 arms pass on the fix and 6 fail against Nothing else has changed: same three files, same |
|
Persistent review updated to latest commit 19e69f3 |
|
The One line fixes it, and it is the standard idiom (17 other rows use it, add_test(NAME npu_window11_wait COMMAND bash ${CMAKE_SOURCE_DIR}/tests/npu_window11_wait_test.sh ${CMAKE_SOURCE_DIR}/scripts/npu-window11.sh)
set_tests_properties(npu_window11_wait PROPERTIES RESOURCE_LOCK route_ports)Why it fires: Two notes so this does not happen a third time:
The unverified- |
|
Verified the fix rather than quoting the idiom: the guard's own test flips. I built a one-row fake census ( So the assertion that failed in CI —
|
19e69f3 to
7461569
Compare
|
Both items fixed at 1. The readiness arm now CHECKS the liveness it talks aboutYou are right, and the reproduction is the whole argument: the sentence asserted "the process is alive" without looking. Between the loop's last Your third stub is in the suite verbatim in spirit — prints the warming line, 2. The budget is validated above every side effect — and my first arm for it was vacuousMoved above That one fails on On the red
|
|
Persistent review updated to latest commit 7461569 |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 7461569: CHANGES
Both findings from my last verdict are answered and mutation-tested; the red check is not, and on this repo that is the one thing left. The build at 19e69f37 failed on route_port_lock naming your own row:
AssertionError: Lists differ: ['npu_window11_wait (npu_window11_wait_test.sh)'] != []
these tests start a loopback server without RESOURCE_LOCK route_ports
and CMakeLists.txt:326 at this head still has the plain add_test, so the next build will fail the same way. One line:
set_tests_properties(npu_window11_wait PROPERTIES RESOURCE_LOCK route_ports)That is the 18th row with that property, not a special case: tests/route_port_lock_test.py:52's BIND_RE matches free_port, which the port fix introduced, and the classification is right — the suite frees a port and curls it, so a concurrent route test's server could be handed that number and your "never binds" arm would see a stranger's /health (and post fixture prompts at it). I verified the fix against the guard's own logic in a one-row fake census: test_every_route_test_holds_the_route_port_lock fails without the property and passes with it.
The two script findings, verified at this head rather than taken
Liveness is checked now, not asserted. The if kill -0 $SPID branch is there and the new stub-dies-late world covers the gap I reproduced by hand. 12/12 arms pass here, and both new arms bite:
revert the kill -0 branch to the old two-echo form FAIL a serve that dies just before the last check reports the DEATH…
move the budget validation back below the spawn FAIL …and no side effect happened: the script's own log was never created
The pre-spawn placement is the version I would have asked for, including the reasoning I did not have: validating before : > "$OUT" is what makes the ordering observable, because a check after SPID=$! cannot be told from a correct one (the child dies before it opens its redirect, so "no serve log" proves nothing). That comment is worth more than the arm.
Nothing else in the diff gives me a concern: $BIN's -x check still runs before the budget (so a missing binary is still reported first), the trap is installed before any wait, and the elapsed/budget pair is printed on both arms.
Say when the property is in and I will re-run the census and turn this READY; it is the only item standing between this and merge.
… is a knob (engine#3200) The sibling of #3194, in the other script. Two ways to fail to reach /health and only one reported a reason: the arm that printed the log was the one where the serve DIES, while the arm where it stays alive and never binds -- what a 14B host-GEMM arm looks like while warming -- said "serve never became ready" with the reason logged nowhere. What this carries, in the order the review rounds produced it: * both arms print the ELAPSED time, and the readiness arm also the budget: a serve that bound at 380 s and one killed at 600 s are different facts about the run, and printing only the limit made them read alike (#3203's review); * the readiness arm says WHICH of the two failures it is -- "the process is alive, so this is the warming window, not a dead server" -- because the whole defect was a warming arm being read as a dead one; * and it CHECKS that liveness rather than asserting it. The window between the loop's last `kill -0` and the final `curl` is where a child killed at the budget boundary lands -- OOM reaper, driver reset, its own abort -- and the sentence then told the reader the opposite of what happened, the same class reversed: a dead arm read as warming. Each outcome prints its own sentence, and a third stub dies in exactly that gap so the arm is deterministic; * the budget is validated ABOVE EVERY SIDE EFFECT, not after the spawn: a bad value used to start a 14B forward-serve, begin its weight load and create the log before exiting 2 with the right code. Above `: > "$OUT"` also makes the ordering observable, which a check after the spawn cannot be -- the parent exits in microseconds and the child dies before opening its redirect, so "no serve log" is true either way and an arm asserting it passes for the wrong reason. The first version of that arm did exactly that and was removed; * the test holds RESOURCE_LOCK route_ports, because it frees a loopback port (`free_port`) and curls it: route_port_lock_test.py's BIND_RE matches `free_port` by design, and without the lock a concurrent route test's server could be handed that number -- the "never binds" arm would see a stranger's /health and post the fixture prompts at it. Measured both ways with the guard itself: without the property it fails naming this row, with it all four arms pass; * NPU_WINDOW11_SERVE_WAIT_S is validated as a positive integer (`=abc` exits 2 with a message rather than looping on seq's error). The test is device-free -- three stub worlds (alive and never binding, dies at once, dies in the gap) under a 1 s budget -- and it takes a FREE PORT from the OS and passes it with --port, because the script assigns PORT=8110 itself and ignores the environment: without that, the test curled whatever else listens on 8110 and, had that answered /health, would have posted the fixture prompts at another lane's server. Verified: bash -n; 12 arms pass on the fix, 2 fail against the previous version of this script, 7 against origin/main's; route_port_lock_test.py 4/4 OK once the census's own C++ row is built (its earlier complaint was an unbuilt tree, not this change); copyright rc 0.
7461569 to
472a3e0
Compare
|
The set_tests_properties(npu_window11_wait PROPERTIES RESOURCE_LOCK route_ports)Measured against So the guard names the row exactly as your build did, and the property is what clears it. Your point about why also holds and is now in the commit message rather than only in this thread: One thing worth recording for the next lane, because it nearly made me report the guard as broken: run against an unbuilt configure, the census also fails on — because The duplicate row that was red at the previous head is clear as well (#3207/#3208/#3209 were three copies of the engine#3205 fix; my own branch for that was dropped unpushed rather than made a fourth). Nothing else changed since your last read: 12 arms, 2 failing against |
|
Persistent review updated to latest commit 472a3e0 |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 472a3e0: READY
The lock is in and it does what the row needed. Checked on this head rather than on my earlier copy of the fix:
row: npu_window11_wait properties: RESOURCE_LOCK route_ports
tests/route_port_lock_test.py against a one-row census -> test_every_route_test_holds_the_route_port_lock PASSES
(the 3 remaining failures are the fake census's own completeness assertions)
tests/npu_window11_wait_test.sh -> pass (12 arms, no device)
merge-tree origin/main -> rc 0
That is the assertion whose message reddened the build at 19e69f37 (Lists differ: ['npu_window11_wait (npu_window11_wait_test.sh)'] != []), so the red check is closed by construction rather than by re-running CI and hoping.
The comment above the property is the part worth keeping: it says why free_port puts this row in the census's set (a freed port that a concurrent route row can be handed, after which the "never binds" arm would see a stranger's /health and post fixture prompts at it). One correction to it, for the record: the guard caught it, and so did the arms — neither instead of the other. My two READYs missed it because I ran the script and the mutation (which pass) and never the census, which needs a configured tree; the census is the row that says the registration is right. That is now written down on the thread and in the suite's own comment.
Everything from the previous head is unchanged and still verified here: the if kill -0 $SPID branch with its stub-dies-late gap arm, the pre-spawn budget validation with its "no side effect" arm (both mutation-checked: reverting either one fails an arm), --port + free_port() instead of the ignored PORT=8110, and the elapsed/budget/interpretation triple on the never-ready arm.
The one open note from my first READY stands as a note, not a blocker: NPU_WINDOW11_SERVE_WAIT_S is documented nowhere in docs/, exactly as BITX_SERVE_WAIT_S on main — the pair wants one paragraph together, and neither PR should carry it alone.
|
VERDICT at 472a3e0: READY — the ordering fix is the right one and the arm grew to 12 ok (was 10), including the two arms that make the ordering observable. Placing the validation above every side effect is the substantive change, and the reasoning in the comment is the kind that should be kept: a bad The die-vs-warming arm added here is the pair my earlier review asked to keep distinct, and it now fires on the boundary case ("dies just before the last check"). Nothing outstanding: knob validated, elbow room for a 14B warm, message carries budget + elapsed + log + tail, all pinned by 12 device-free arms in a registered row. |
Fixes #3200. The sibling of #3194, in the other script — found while fixing that one and deliberately not folded into #3195, because an unmentioned rider on a reviewed PR is worse than a decided change.
The defect
scripts/npu-window11.shhas two ways to fail to reach/health:The arm that prints the log is the one where the serve dies. The arm where it stays alive and never binds — which is what a 14B host-GEMM arm looks like while warming the weight cache — printed
serve never became readyand nothing else, so the log holding the reason was named nowhere. Same failure mode as #3194: a configuration problem files as a device problem.Both arms now print the budget that expired and
tail -5of the serve log.The budget
NPU_WINDOW11_SERVE_WAIT_S(default 600, validated as a positive integer) — same knob shape that landed for the sibling in #3195, and for the same second reason: a constant failure path cannot be tested, and this one had a ten-minute minimum to exercise.The test, and the mistake I made writing it
Device-free: a stub
1bitunder a 1 s budget, no NPU and no container. Two worlds — alive-and-never-binds, and dies-at-once.The first version passed against the old code for the wrong reason, which is the exact class this lane keeps hunting in other people's tests: an outer
timeoutthat kills the process group makes the old script take its death arm, so the "prints the log tail" arm passed without the fix. The repair is an arm that says which world it is in:With that, the two arms tell themselves apart:
The death arm is kept as a regression check: it is the behaviour that was already right, and a fix that broke it while adding the other would otherwise read as green.
Verified
Wired as ctest
npu_window11_waitbesidenpu_kernel_bitx_wait, so both scripts' readiness contracts run in CI with no device.