mirror of https://github.com/openclaw/openclaw.git
test: exercise concurrent context-engine registration
This commit is contained in:
parent
5dc232e2fa
commit
44622abfbc
|
|
@ -13,6 +13,7 @@ Docs: https://docs.openclaw.ai
|
|||
- macOS/LaunchAgent install: tighten LaunchAgent directory and plist permissions during install so launchd bootstrap does not fail when the target home path or generated plist inherited group/world-writable modes.
|
||||
- Gateway/Control UI: keep dashboard auth tokens in session-scoped browser storage so same-tab refreshes preserve remote token auth without restoring long-lived localStorage token persistence, while scoping tokens to the selected gateway URL and fragment-only bootstrap flow. (#40892) thanks @velvet-shark.
|
||||
- Models/Kimi Coding: send `anthropic-messages` tools in native Anthropic format again so `kimi-coding` stops degrading tool calls into XML/plain-text pseudo invocations instead of real `tool_use` blocks. (#38669, #39907, #40552) Thanks @opriz.
|
||||
- Context engine/tests: add bundled-registry regression coverage for cross-chunk resolution, plugin-sdk re-exports, and concurrent chunk registration. (#40460) thanks @dsantoreis.
|
||||
|
||||
## 2026.3.8
|
||||
|
||||
|
|
|
|||
|
|
@ -433,6 +433,10 @@ describe("Bundle chunk isolation (#40096)", () => {
|
|||
it("concurrent registration from multiple chunks does not lose entries", async () => {
|
||||
const ts = Date.now().toString(36);
|
||||
const registryUrl = new URL("./registry.ts", import.meta.url).href;
|
||||
let releaseRegistrations: (() => void) | undefined;
|
||||
const registrationStart = new Promise<void>((resolve) => {
|
||||
releaseRegistrations = resolve;
|
||||
});
|
||||
|
||||
// Load 5 "chunks" in parallel
|
||||
const chunks = await Promise.all(
|
||||
|
|
@ -442,12 +446,14 @@ describe("Bundle chunk isolation (#40096)", () => {
|
|||
),
|
||||
);
|
||||
|
||||
// Each chunk registers a unique engine
|
||||
const ids = chunks.map((chunk, i) => {
|
||||
const ids = chunks.map((_, i) => `concurrent-${ts}-${i}`);
|
||||
const registrationTasks = chunks.map(async (chunk, i) => {
|
||||
const id = `concurrent-${ts}-${i}`;
|
||||
await registrationStart;
|
||||
chunk.registerContextEngine(id, () => new MockContextEngine());
|
||||
return id;
|
||||
});
|
||||
releaseRegistrations?.();
|
||||
await Promise.all(registrationTasks);
|
||||
|
||||
// All 5 engines must be visible from any chunk
|
||||
const allIds = chunks[0].listContextEngineIds();
|
||||
|
|
|
|||
Loading…
Reference in New Issue