Repository navigation
Commit 4e91dc5
wenshao
test(runtime-broker): close self-audit round 4 on the 13183 branch
Round 4 found no Critical: an adversarial pass over the tests and an
undirected pass over the whole diff returned eleven Suggestions between
them, all addressed here.
Two of the newest tests described a mechanism that is not what happens.
The release-grace harness claimed its exit kills the daemon escalation
thread, but System.exit runs the shutdown hooks first, so during the
hook's own grace wait that thread is alive and destroys the worker at
about the same moment; what the hook's snapshot actually provides is
keeping the JVM alive until the reclaim completes and issuing the destroy
itself. The test-side comment claimed its poll loop had to outlast that
grace window, when the loop only starts after the harness has exited and
halted, so what it waits out is pid reaping.
The guard assertion that only makes sense where destroy() is a signal
became its own test guarded by an assumption, so a platform that cannot
reach the guard reports skipped instead of passing without exercising it.
The shared race fixture moved into a helper, and the platform-independent
half - no child process outlives the provisioner - still runs everywhere.
Both forked tests cleaned up by killing a bare pid, which a recycled pid
would turn into killing an unrelated process. They now require that pid to
still name a node worker, and the liveness poll applies the same identity
check so a recycled pid cannot read as a false failure. The clock the
cooldown tests advance is volatile now, since the service reads it from
the HTTP handler and coordination threads while the test thread writes it.
The provisioner's close() also clears the tracking set, whose entry a
discarded escalation task would otherwise never remove.
The synchronized block in stop() cannot be pinned from outside the lock,
so its comment now says the guarantee is structural, the way the
spawn-and-register javadoc already does. The tracking set's field comment
names both of its membership windows instead of only the pre-issuance one.
The backoff sweep no longer ties its range to the default window, which
has a floor but no ceiling.
Documentation: the design docs still described a 200-round stress when the
code runs 600, and understated which outcomes the release primitive's
contract test covers; the deployment README's guidance for opting into a
non-loopback bind was weaker than the server's own refusal message, which
asks for a TLS-terminating layer that authorizes callers rather than a
restricted network, on a face that serves one global bearer token in
plaintext; and the release transaction gains a comment recording that its
statement order is load-bearing under InnoDB repeatable read, where a read
moved ahead of the locking read would silently reopen the race without H2
showing it.
Suites green: runtime-broker 632 tests / 0 failures / 2 skipped with
checkstyle and spotbugs clean, managed-agent-server fix-adjacent 19/19
against the reinstalled jar.1 parent 56c2096 commit 4e91dc5
8 files changed
Lines changed: 111 additions & 59 deletions
File tree
- docs/design
- packages/sdk-java
- managed-agent-server
- runtime-broker/src
- main/java/com/alibaba/qwen/code/runtimebroker
- test/java/com/alibaba/qwen/code/runtimebroker
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
397 | | - | |
398 | | - | |
399 | | - | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
400 | 402 | | |
401 | 403 | | |
402 | 404 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
84 | 90 | | |
85 | 91 | | |
86 | 92 | | |
| |||
Lines changed: 14 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
64 | 66 | | |
65 | | - | |
66 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
| |||
353 | 356 | | |
354 | 357 | | |
355 | 358 | | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
356 | 362 | | |
357 | 363 | | |
358 | 364 | | |
| |||
427 | 433 | | |
428 | 434 | | |
429 | 435 | | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
430 | 439 | | |
431 | 440 | | |
432 | 441 | | |
| |||
Lines changed: 33 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
176 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
177 | 179 | | |
178 | | - | |
| 180 | + | |
179 | 181 | | |
180 | 182 | | |
181 | 183 | | |
| |||
507 | 509 | | |
508 | 510 | | |
509 | 511 | | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
515 | 520 | | |
516 | 521 | | |
517 | 522 | | |
| |||
550 | 555 | | |
551 | 556 | | |
552 | 557 | | |
553 | | - | |
554 | | - | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
555 | 562 | | |
556 | 563 | | |
557 | 564 | | |
558 | 565 | | |
559 | | - | |
560 | | - | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
561 | 570 | | |
562 | 571 | | |
563 | 572 | | |
| |||
568 | 577 | | |
569 | 578 | | |
570 | 579 | | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
576 | 587 | | |
577 | 588 | | |
578 | 589 | | |
| |||
611 | 622 | | |
612 | 623 | | |
613 | 624 | | |
614 | | - | |
615 | | - | |
616 | | - | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
617 | 630 | | |
618 | 631 | | |
619 | 632 | | |
| |||
0 commit comments