Lu Wang
43b1088962
fix(cli-runner): scope claude-cli queue to live-session owner identity ( #91946 ) ( #91974 )
...
* fix(cli-runner): scope claude-cli queue to live-session owner identity
Fresh claude-cli runs without a stored cliSessionId previously collapsed
onto a single workspace-scoped queue key, serializing all fan-out within
one workspace regardless of subagent lane configuration.
Replace the workspace fallback with the same owner identity that
claude-live-session.ts already uses for its live-session map
(agentAccountId + agentId + authProfileId + sessionId + sessionKey),
keeping per-session resume safety while letting independent OpenClaw
sessions in the same workspace run concurrently.
Refactor buildClaudeLiveKey() to share the new buildClaudeOwnerKey()
helper so the queue key and the live-session key cannot drift.
Refs: #91946
* test(cli-runner): pin owner-key hash + document buildClaudeOwnerKey contract
Add a golden-hash regression test for buildClaudeOwnerKey using the
exact legacy fixture, so a future refactor that reorders fields or
flips the JSON encoding can't silently orphan every deployed Claude
live session at upgrade. Hash verified empirically against the prior
inline sha256(JSON.stringify(...)) in buildClaudeLiveKey.
Add a JSDoc on buildClaudeOwnerKey explaining the cross-module contract
between the CLI run queue and the live-session map.
Refs: #91946
* docs(cli-runner): tighten buildClaudeOwnerKey contract comment
The previous comment claimed an encoding mismatch would orphan deployed
live sessions across upgrades. The Claude live-session registry is
process-local, so any restart already discards every entry — the real
invariant is that the queue path and live-session path produce
byte-identical owner keys *within a single process*, so a fresh queued
turn picks up the same live session the registry already holds. Update
the helper docstring and the golden-hash test description accordingly;
the pinned hash and behavior are unchanged.
* test(cli-runner): add owner-key concurrency demo script
A pure-Node, no-test-runner demo that reproduces the PR-head queue
behavior end-to-end: BEFORE-PR collapse (workspace lane), distinct-owner
overlap, and identical-owner serialization, all in one run with
millisecond-stamped event ordering. Useful as a low-overhead regression
check for the owner-key contract and as a maintainer-runnable proof
artifact for #91946 .
* test(cli-runner): satisfy oxlint curly + no-promise-executor-return
Wrap single-statement if/for-of bodies in braces and rewrite the
sleep helper so its Promise executor is a void block instead of an
arrow with an implicit return. No behavior change; demo output and
the byte-equivalent slice fingerprints are unchanged.
---------
Co-authored-by: wanglu241 <wanglu241@jd.com >
2026-06-11 19:24:39 +09:00
..
2026-05-29 09:45:35 +01:00
2026-06-07 12:07:05 +02:00
2026-06-07 11:50:33 +02:00
2026-06-09 08:10:54 +00:00
2026-06-10 23:49:41 +01:00
2026-06-04 20:52:50 -04:00
2026-06-04 23:57:22 -04:00
2026-06-11 18:13:36 +09:00
2026-06-06 21:14:51 +02:00
2026-06-06 21:21:17 +02:00
2026-05-26 17:58:42 +02:00
2026-06-02 01:29:15 +01:00
2026-06-06 22:19:18 +02:00
2026-06-04 23:57:22 -04:00
2026-06-04 23:57:22 -04:00
2026-06-04 23:57:22 -04:00
2026-05-29 20:38:52 -07:00
2026-06-04 20:52:50 -04:00
2026-06-07 10:22:50 +02:00
2026-06-04 22:49:21 -04:00
2026-06-06 20:39:07 +02:00
2026-06-06 21:18:58 +02:00
2026-06-06 21:03:45 +02:00
2026-06-04 20:52:50 -04:00
2026-06-07 01:11:24 +02:00
2026-06-10 18:03:15 +09:00
2026-06-07 06:35:44 +02:00
2026-06-04 23:28:04 -04:00
2026-06-04 22:49:21 -04:00
2026-06-04 23:28:04 -04:00
2026-06-04 23:28:04 -04:00
2026-06-04 23:28:04 -04:00
2026-06-04 23:28:04 -04:00
2026-06-04 23:28:04 -04:00
2026-06-04 22:49:21 -04:00
2026-06-04 23:28:04 -04:00
2026-06-04 23:28:04 -04:00
2026-06-04 23:28:04 -04:00
2026-06-07 02:33:15 +02:00
2026-06-08 18:59:51 -07:00
2026-06-04 23:30:59 -04:00
2026-06-04 23:30:59 -04:00
2026-06-04 23:30:59 -04:00
2026-06-04 23:30:59 -04:00
2026-06-04 16:13:27 -07:00
2026-06-06 22:23:09 +02:00
2026-06-06 22:02:20 +02:00
2026-06-04 23:30:59 -04:00
2026-06-04 23:30:59 -04:00
2026-06-04 23:30:59 -04:00
2026-06-04 23:30:59 -04:00
2026-06-04 23:34:16 -04:00
2026-06-04 20:52:50 -04:00
2026-06-06 22:57:19 +02:00
2026-06-06 22:56:48 -07:00
2026-06-04 20:52:50 -04:00
2026-06-04 23:34:16 -04:00
2026-06-10 16:34:06 +09:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 23:34:16 -04:00
2026-06-04 23:34:16 -04:00
2026-06-04 23:34:16 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 23:34:16 -04:00
2026-06-04 23:34:16 -04:00
2026-06-04 23:34:16 -04:00
2026-06-04 23:34:16 -04:00
2026-06-04 23:34:16 -04:00
2026-06-04 23:34:16 -04:00
2026-06-04 23:37:42 -04:00
2026-06-03 11:18:54 +02:00
2026-06-04 23:37:42 -04:00
2026-06-04 23:37:42 -04:00
2026-06-04 23:37:42 -04:00
2026-06-04 23:37:42 -04:00
2026-06-07 07:31:56 +02:00
2026-06-06 22:29:12 +02:00
2026-06-01 23:51:38 -07:00
2026-06-04 23:37:42 -04:00
2026-06-04 23:37:42 -04:00
2026-06-06 22:15:34 +02:00
2026-06-04 23:37:42 -04:00
2026-06-04 23:37:42 -04:00
2026-06-04 23:37:42 -04:00
2026-06-04 23:37:42 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 23:37:42 -04:00
2026-06-04 23:37:42 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 23:37:42 -04:00
2026-06-04 23:42:32 -04:00
2026-06-04 23:42:32 -04:00
2026-06-04 23:42:32 -04:00
2026-05-31 20:28:40 +01:00
2026-06-04 23:42:32 -04:00
2026-06-04 17:24:03 +00:00
2026-06-06 22:21:14 +02:00
2026-05-26 23:30:07 +02:00
2026-06-02 02:38:22 +01:00
2026-06-06 22:50:49 +02:00
2026-05-26 09:32:24 +02:00
2026-06-04 23:42:32 -04:00
2026-05-26 12:19:42 +02:00
2026-05-25 20:56:52 +01:00
2026-06-04 20:52:50 -04:00
2026-06-04 22:11:11 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 23:42:32 -04:00
2026-06-06 09:14:12 -07:00
2026-06-04 23:42:32 -04:00
2026-06-06 18:46:28 +02:00
2026-06-02 04:32:38 +02:00
2026-06-04 20:52:50 -04:00
2026-06-06 19:25:22 +02:00
2026-06-04 20:52:50 -04:00
2026-06-11 19:24:39 +09:00
2026-06-06 22:07:31 +02:00
2026-06-06 22:18:03 +02:00
2026-06-04 23:42:32 -04:00
2026-06-04 20:52:50 -04:00
2026-06-06 17:37:12 +02:00
2026-06-06 22:48:19 +02:00
2026-05-27 06:11:57 +02:00
2026-06-04 23:42:32 -04:00
2026-06-04 23:42:32 -04:00
2026-05-25 20:56:52 +01:00
2026-06-08 14:18:42 -07:00
2026-06-01 01:12:21 +01:00
2026-06-04 23:42:32 -04:00
2026-06-04 23:42:32 -04:00
2026-06-10 18:03:15 +09:00
2026-06-04 20:52:50 -04:00
2026-06-04 23:42:32 -04:00
2026-06-06 22:39:58 +02:00
2026-06-04 23:46:55 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-06 22:12:08 +02:00
2026-06-04 23:46:55 -04:00
2026-06-04 23:46:55 -04:00
2026-06-04 23:48:20 -04:00
2026-06-06 16:37:39 +00:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 23:46:55 -04:00
2026-05-27 05:31:03 +02:00
2026-06-05 23:16:39 -07:00
2026-05-30 18:35:32 +01:00
2026-05-29 22:05:25 +03:00
2026-06-06 12:26:32 -07:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-07 00:10:37 +02:00
2026-06-04 20:52:50 -04:00
2026-06-08 23:38:46 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-07 03:17:46 +02:00
2026-06-07 07:09:01 +02:00
2026-05-26 12:13:04 +02:00
2026-06-04 23:46:55 -04:00
2026-06-10 14:56:21 +09:00
2026-06-11 03:07:13 +09:00
2026-06-04 20:52:50 -04:00
2026-06-06 12:26:32 -07:00
2026-06-07 02:43:27 +02:00
2026-06-04 20:52:50 -04:00
2026-06-04 23:46:55 -04:00
2026-06-06 21:06:32 +02:00
2026-06-06 19:55:22 +02:00
2026-06-06 22:36:47 +02:00
2026-06-04 23:46:55 -04:00
2026-06-04 23:46:55 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-08 20:19:21 -07:00
2026-06-06 12:26:32 -07:00
2026-06-04 20:52:50 -04:00
2026-06-06 12:26:32 -07:00
2026-06-04 20:52:50 -04:00
2026-06-04 23:46:55 -04:00
2026-06-04 23:46:55 -04:00
2026-06-04 20:52:50 -04:00
2026-06-10 18:06:31 +09:00
2026-06-04 23:46:55 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 23:48:20 -04:00
2026-06-04 23:48:20 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 23:48:20 -04:00
2026-06-06 20:35:27 +02:00
2026-06-04 23:48:20 -04:00
2026-06-04 20:52:50 -04:00
2026-06-01 01:12:21 +01:00
2026-06-10 20:52:40 +01:00
2026-06-07 03:38:58 -07:00
2026-06-04 20:52:50 -04:00
2026-06-04 23:49:34 -04:00
2026-06-04 23:49:34 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-07 09:42:15 +02:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-06 12:26:32 -07:00
2026-06-06 12:26:32 -07:00
2026-05-28 01:48:07 +01:00
2026-06-04 23:49:34 -04:00
2026-06-04 20:52:50 -04:00
2026-06-03 06:14:40 -05:00
2026-06-04 23:49:34 -04:00
2026-06-07 06:58:46 +02:00
2026-06-04 23:49:34 -04:00
2026-06-06 22:03:50 +02:00
2026-06-04 23:49:34 -04:00
2026-06-05 08:14:42 -07:00
2026-06-04 23:49:34 -04:00
2026-06-04 23:52:06 -04:00
2026-06-04 23:52:06 -04:00
2026-06-04 23:52:06 -04:00
2026-05-26 17:47:25 +02:00
2026-06-04 17:24:03 +00:00
2026-06-04 23:52:06 -04:00
2026-06-06 22:56:48 -07:00
2026-06-04 23:52:06 -04:00
2026-06-06 22:16:53 +02:00
2026-06-11 18:13:36 +09:00
2026-06-07 02:35:08 +02:00
2026-06-04 23:52:06 -04:00
2026-06-04 23:52:06 -04:00
2026-06-04 23:52:06 -04:00
2026-06-06 12:26:32 -07:00
2026-06-04 23:53:10 -04:00
2026-06-04 23:53:10 -04:00
2026-06-08 18:59:51 -07:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 23:53:10 -04:00
2026-06-04 23:53:10 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 23:53:10 -04:00
2026-06-04 23:53:10 -04:00
2026-06-04 23:53:10 -04:00
2026-06-03 07:30:12 -07:00
2026-06-06 20:53:08 +02:00
2026-06-06 17:37:12 +02:00
2026-06-06 22:05:23 +02:00
2026-06-05 22:59:54 -07:00
2026-06-05 22:59:54 -07:00
2026-06-04 20:52:50 -04:00
2026-06-07 11:40:47 +02:00
2026-06-07 01:11:24 +02:00
2026-06-03 07:30:12 -07:00
2026-06-04 16:13:27 -07:00
2026-06-04 20:22:35 -07:00
2026-05-31 16:46:20 +01:00
2026-06-05 22:34:22 -07:00
2026-06-04 20:22:35 -07:00
2026-06-07 10:44:06 +02:00
2026-06-04 20:22:35 -07:00
2026-06-06 22:56:48 -07:00
2026-06-04 20:22:35 -07:00
2026-06-07 06:47:02 +02:00
2026-06-04 20:22:35 -07:00
2026-06-04 23:54:19 -04:00
2026-06-07 01:24:10 +02:00
2026-06-04 23:54:19 -04:00
2026-06-04 23:54:19 -04:00
2026-06-04 23:54:19 -04:00
2026-06-04 23:55:54 -04:00
2026-06-04 19:38:06 +01:00
2026-06-11 18:13:36 +09:00
2026-06-06 20:43:28 +02:00
2026-06-01 01:12:21 +01:00
2026-06-04 23:55:54 -04:00
2026-06-04 23:55:54 -04:00
2026-06-04 23:55:54 -04:00
2026-06-04 20:52:50 -04:00
2026-06-07 09:31:21 +02:00
2026-06-04 23:55:54 -04:00
2026-06-04 20:52:50 -04:00
2026-06-10 18:03:15 +09:00
2026-06-10 18:06:31 +09:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 23:55:54 -04:00
2026-06-06 22:33:56 +02:00
2026-06-04 23:55:54 -04:00
2026-06-04 23:55:54 -04:00
2026-06-04 23:55:54 -04:00
2026-06-04 23:55:54 -04:00
2026-06-04 23:55:54 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 23:55:54 -04:00
2026-06-04 20:52:50 -04:00
2026-06-04 20:52:50 -04:00
2026-06-10 18:03:15 +09:00