row224: await citation hydration in new launch test
This commit is contained in:
1 parent
b98b9e64a0
commit
8f1b045f40
2 files changed
+15
-1
No files matched your search
@@ -509,3 +509,13 @@ test at packages/cli/tests/thread-launch.test.mjs:540:1
|
||||
at async Test.run (node:internal/test_runner/test:1409:7)
|
||||
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7)
|
||||
```
|
||||
|
||||
## sage-4210 — new-test async citation fixture fix
|
||||
|
||||
Only C2-05b now inlines send/wait, awaits thread.messages before .find, and
|
||||
keeps the from_role assistant / to_role human assertions previously provided
|
||||
by ask. Comment names broker.mjs:4854 async citation hydration. Existing ask,
|
||||
old tests and production unchanged. This is Sage's own-new-test ruling under
|
||||
mos-1590; Dewey re-reviews the delta. Whole-file rerun once authorized, then
|
||||
the nine other files, whole bus/harness, M-B1 and clean-tree check on green.
|
||||
Each gets a fresh shell gXXX TMPDIR and absolute nice 19; any red stops.
|
||||
@@ -547,7 +547,11 @@ test("C2-05b a real launched bundle gets lookups for a library project without a
|
||||
const host = await start(t, prepared);
|
||||
const project = host.call("project.create", { name: "library work", repo: "stack" }).id;
|
||||
const thread = host.call("thread.create", { project, name: "lookup" }).id;
|
||||
await ask(host.call, thread, "inspect bundle");
|
||||
const sent = host.call("thread.send", { thread, body: "inspect bundle" });
|
||||
// broker.mjs:4854 uses async citation hydration for a business with a library.
|
||||
const reply = await until(async () => (await host.call("thread.messages", { thread })).find(m => m.in_reply_to === sent.id && m.class === "RESULT"));
|
||||
assert.equal(reply.from_role, "assistant");
|
||||
assert.equal(reply.to_role, "human");
|
||||
const run = launchLog(f).find(e => e.event === "launch" && e.thread === thread).run;
|
||||
const tools = JSON.parse(readFileSync(join(f.dataRoot, "launches", "acme", run, "bundle", "tools.json"), "utf8"));
|
||||
assert.deepEqual(tools.filter(tool => tool.name.startsWith("library_")).map(tool => tool.name),
|
||||
|
||||
Reference in new issue
Block a user