mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-08-29 04:26:38 +00:00
fix(client): consume bootstrap handoff queue
This commit is contained in:
@@ -88,7 +88,7 @@ export class ClientModuleSystem implements ClientModuleLoader {
|
||||
// Replace first: a bundle that executes while queued handoffs are draining
|
||||
// must register against the live sink rather than append behind the drain.
|
||||
win.__ModuleLoader__ = sink
|
||||
for (const handoff of queued?.handoffs ?? []) sink.load(handoff)
|
||||
for (const handoff of queued?.handoffs.splice(0) ?? []) sink.load(handoff)
|
||||
}
|
||||
|
||||
/** Register one bundle factory, rejecting a script that executes twice without invalidation. */
|
||||
|
||||
@@ -72,6 +72,7 @@ describe('lazy CJS arrival', () => {
|
||||
const b = bench([row('runtime')])
|
||||
const exports = await b.loader.import('runtime', '', {})
|
||||
expect((exports as { marker: string }).marker).toBe('preloaded')
|
||||
expect(handoffs).toEqual([])
|
||||
expect(b.fetched).toEqual([])
|
||||
expect(win.__ModuleLoader__?.mode).toBe('live')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user