Files
qwen-code/docs
Shaojin Wen 39fd1b45ba refactor(managed-agent): extract the runtime hold inventory (#15997)
* refactor(managed-agent): extract the runtime hold inventory

Second P1 seam in RuntimeBrokerService: the durable hold inventory moves
to a package-private RuntimeHoldInventory. The pagination over hold rows
and the RELEASED filter (restore the close's drain obligation, never
discharge — #13930 R1-2) move verbatim; the service keeps the admission,
tenant resolution and error-mapping boundary, so the stage assembly and
the runtime_hold_inventory_scope_failed mapping are unchanged. Six new
unit tests cover the collaborator (empty ledger, released discharge,
missing-record-is-not-release, non-released still holds, cursor
pagination, dedup); the 199-test broker suite and the binding inventory
suite stay green.

Recovery scanning was investigated as the next seam and proved entangled
with reconcileInContext, the SessionContext in-memory index and the CAS
settle loop; the design records why it waits for the reconciliation
collaborator rather than forcing a callback-heavy extraction.

* docs(managed-agent): record the hold inventory in the D1 ledger; pin RELEASING

Close the review's D1-table consistency finding: the structural-debt
table's RuntimeBrokerService row now names both extracted seams
(ExecutionObservationCooldown, RuntimeHoldInventory) and refreshes the
line count to the current 6,329, in both languages, so the ledger matches
the slice narrative instead of drifting per extraction.

Also add the round-2 deferred probe as a test: a RELEASING session still
holds (only RELEASED discharges the drain obligation). A widened
discharge filter (!= READY) turns the new test red — verified by
injection with byte-level restore. 224 focused tests and Checkstyle stay
green.
2026-10-31 10:56:14 +00:00
..
2025-12-05 10:51:57 +08:00
2025-12-19 15:52:11 +08:00