Repository navigation
Commit fd4af70
* test(managed-agent): pin untested contracts from the #12692 R2 review
Twelve R2 review follow-ups on #12692 in the test surface, re-verified
against current main (2c591ec) before writing each witness:
- SessionEventHub evicts beyond CAPACITY (512) and reports whether
the watermark still held the requested position, pinning the
overflow signal the SSE fold relies on.
- HarnessCoordinator fails the turn when a recovered runtime is not
ready for continuation, fails terminally when the recovery moved
between the witness read and the bind, and schedules a retry when
the admission epoch moved before commit.
- HarnessEventProjector substitutes the safe fallback code for an
out-of-alphabet error code, and the secret-redaction sweep now
holds both the key and the value of a sensitive attribute out of
the leaked map.
- QwenHostedHarnessConnector's unknown-outcome create falls back to
load and propagates the full attachment (boot id, recovery handle,
generate and event epoch); the load path propagates the same four
fields; a non-conflict daemon error is rethrown without any
fallback load.
- ManagedSessionStore contract fixtures assert per-record session
identity, record count by the records list, and a monotone
sequence range with an event count that fits.
- ManagedSessionStore integration holds the per-page restore byte
budget: twelve dense two-line commits with a 1 MiB pad page flush
the first page after nine transactions (revisions 1..9,
hasMore=true) and finish on the second page (revisions 10..12,
hasMore=false).
- The MariaDB MySqlIT is rerunnable against a persistent database:
the legacy fixture namespaces every fixed identity per run
(upgrade/lifecycle/hooks tenants and sessions), skips the
migration-bound assertions (V15/V17/V29 were applied once and
cannot re-apply to a rerun's seeds), and re-seeds the V9 scope
conflict source explicitly so the workspace idempotency probe is
not migration-order dependent. The projection, private-store and
lease-precision sub-exercises are equally namespaced so a second
mvn failsafe run on the same database is green.
- ManagedAgentServerIntegrationTest fixture harness is keyed by
tenant for the runtime-recovery attachment, and the dispatchable
turns it claims are cleaned up between sub-cases so the retries,
the generation transfer and the epoch retraction stay
deterministic against a shared H2.
Verified on the managed-agent-server module with mvn verify after
same-source reinstall of qwencode and runtime-broker (alpha-jar md5
fingerprints matched before and after): witness runs of the
ManagedAgentMySqlIT against a persistent temp MariaDB passed twice
in a row (19 tests, 0 failures, 0 errors each).
* fix(managed-agent): close Java test witness gaps from review (#13348)
- ManagedAgentMySqlIT: derive the first-pass gate from this run's own
Flyway target-15 migrate result instead of V15's item_id output, so a
V15 regression can no longer silence its own witnesses; correct the
rerun comment (consumer_progress is gated, agent_revision reads V13's
DEFAULT) and merge the adjacent gate blocks.
- ManagedAgentMySqlIT: derive the journal case-sensitivity probe from
the namespaced storeTenant so it stays a pure case variant.
- ManagedAgentMySqlIT: drop the inert per-connection
SET FOREIGN_KEY_CHECKS toggle; the child-first delete order is the
real invariant and is now stated as such.
- HarnessEventProjectorTest: assert secret absence on the serialized
data (any nesting depth), pin the raw code's absence from the
fallback-code event, and add the oversize/at-bound error-code arms
for SAFE_ERROR_CODE's {1,128} bound.
- ManagedSessionStoreContractFixtureTest: assert the transaction
summary rule the server actually enforces, branching on operation
(genesis zero rule vs range/record equality).
* test(managed-agent): settle Turn residue in one sweep and pin the watermark operand (#13348)
- ManagedAgentServerIntegrationTest: replace the per-call-site
cleanupTurn helper with one @AfterEach sweep that settles every
non-terminal Turn before the recovery scanner re-arms, covering the
two retraction tests that never invoked the helper; the
concurrent-submit finally whose re-await could mask the real failure
goes away with it.
- ManagedAgentMySqlIT: extend the warm-database delete list with
managed_agent_operation and managed_workspace_create_command so it
covers all seven RESTRICT children of managed_agent_session.
- ManagedSessionStoreContractFixtureTest: drop the unreachable
non-genesis else arm; pin the published genesis shape
unconditionally.
- QwenHostedHarnessConnectorTest: route the three new recovery tests
through the existing connector(client) helper.
- HarnessCoordinatorTest: add
retriesTheTurnWhenTheRecoveredWatermarkRegresses — same epoch, lower
admission watermark — the unique witness for the lastEventId guard
disjunct (mutation probe: deleting the disjunct fails exactly this
test).
Co-authored-by: Qwen-Coder <[email protected]>
* test(managed-agent): pin single-drive guards and namespace case tenants (#13348)
Co-authored-by: Qwen-Coder <[email protected]>
* chore(managed-agent): re-verify round-4 test fixes after lint-gate rejection (#13348)
The deterministic gate rejected 3a3b203 on npm run lint, but the 589
errors were all in untracked, git-ignored Maven javadoc output under
packages/sdk-java/qwencode/target/reports/apidocs/ left in the runner
workspace by a same-round mvn package/install of the qwencode module -
not in anything the commit touched. The committed tree needs no change;
this empty follow-up records the repair: the generated output was
removed from the workspace and npm run build, npm run typecheck, and
npm run lint all pass, with mvn -Dtest=HarnessCoordinatorTest test
(33/33) and mvn checkstyle:check green.
Co-authored-by: Qwen-Coder <[email protected]>
Co-authored-by: Qwen-Coder <[email protected]>
* test(managed-agent): gate upgrade witnesses on their own migration versions (#13348)
- ManagedAgentMySqlIT: replace the single firstPass flag with
BackfillWitnesses derived from the versions Flyway had applied at the
run's start. One shared flag reads a database left mid-window as a
first pass (V2's consumer_progress count then fails on rows V2 never
saw) or as a rerun (the V17 and V29 witnesses then silently skip over
freshly seeded rows their migrations did migrate). The V9 re-seed now
keys on V9's application too: at V14 firstPass is true, so the old
keying skipped the re-seed and the idempotency_conflict probe failed.
- BackfillWitnessesTest: pin the gate tuple against H2 databases staged
at every boundary version (fresh, 1, 8, 9, 14, 15, 16, 17, 28, 29,
head); reverting to the shared flag reds it.
- QwenHostedHarnessConnectorTest: stub getSuppressed()/getStackTrace()
on the mocked unknown-outcome exception so a regressed fallback
reports the failing test's name instead of aborting the class report
on a null array; capture the LoadHarnessSession and pin the
passiveManagedRuntimeRecovery=false operand.
- SessionEventHubTest: await one below the watermark so CAPACITY is
pinned from above as well (a 513 ring now reds the witness).
- HarnessEventProjectorTest: witness the tool_call allowlist, the
sibling of the text-path redaction the PR already pinned (the raw
update leak mutant now dies).
Co-authored-by: Qwen-Coder <[email protected]>
---------
Co-authored-by: qwen-code-ci-bot <[email protected]>
Co-authored-by: Qwen-Coder <[email protected]>
1 parent 28e0f3a commit fd4af70
10 files changed
Lines changed: 759 additions & 52 deletions
File tree
- packages/sdk-java/managed-agent-server/src/test/java/com/alibaba/qwen/code/managedagent
- harness
- service
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
Lines changed: 60 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
Lines changed: 57 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
| |||
51 | 57 | | |
52 | 58 | | |
53 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
54 | 111 | | |
55 | 112 | | |
56 | 113 | | |
| |||
Lines changed: 77 additions & 38 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
78 | 89 | | |
79 | 90 | | |
80 | 91 | | |
81 | | - | |
| 92 | + | |
82 | 93 | | |
83 | 94 | | |
84 | 95 | | |
85 | | - | |
86 | | - | |
87 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
88 | 99 | | |
89 | 100 | | |
90 | 101 | | |
91 | 102 | | |
92 | | - | |
| 103 | + | |
93 | 104 | | |
94 | 105 | | |
95 | 106 | | |
96 | | - | |
| 107 | + | |
97 | 108 | | |
98 | 109 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
109 | 134 | | |
110 | 135 | | |
111 | | - | |
| 136 | + | |
112 | 137 | | |
113 | 138 | | |
114 | 139 | | |
115 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
116 | 152 | | |
117 | | - | |
| 153 | + | |
118 | 154 | | |
119 | 155 | | |
120 | 156 | | |
121 | 157 | | |
122 | | - | |
| 158 | + | |
123 | 159 | | |
124 | 160 | | |
125 | 161 | | |
| |||
181 | 217 | | |
182 | 218 | | |
183 | 219 | | |
184 | | - | |
185 | | - | |
186 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
187 | 223 | | |
188 | 224 | | |
189 | 225 | | |
| |||
232 | 268 | | |
233 | 269 | | |
234 | 270 | | |
235 | | - | |
| 271 | + | |
| 272 | + | |
236 | 273 | | |
237 | 274 | | |
238 | 275 | | |
| |||
326 | 363 | | |
327 | 364 | | |
328 | 365 | | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
336 | 369 | | |
337 | 370 | | |
338 | 371 | | |
| |||
425 | 458 | | |
426 | 459 | | |
427 | 460 | | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
428 | 468 | | |
429 | | - | |
430 | | - | |
| 469 | + | |
431 | 470 | | |
432 | | - | |
| 471 | + | |
433 | 472 | | |
434 | | - | |
| 473 | + | |
435 | 474 | | |
436 | 475 | | |
437 | | - | |
| 476 | + | |
438 | 477 | | |
439 | 478 | | |
440 | 479 | | |
441 | 480 | | |
442 | | - | |
| 481 | + | |
443 | 482 | | |
444 | | - | |
| 483 | + | |
445 | 484 | | |
446 | | - | |
| 485 | + | |
447 | 486 | | |
448 | 487 | | |
449 | 488 | | |
| |||
0 commit comments