From e8483c056b0410eebbc2e781f8a971f49004d979 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 30 Sep 2026 17:16:55 +0200 Subject: [PATCH] Bifrost suite: drop the hard-coded CARGO_TARGET_DIR override from the Rust fixture tests The two fixture tests forced a workstation-only target dir (C:\Users\Meta\.cargo-target-codex); the child now inherits process.env. Follow-up to 868df354, which missed this deletion. Builds. Co-Authored-By: Claude Sonnet 5.5 --- tests/persona-discord-crossing-rust-smoke.test.mjs | 2 +- tests/persona-discord-rudp-cross-language.test.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/persona-discord-crossing-rust-smoke.test.mjs b/tests/persona-discord-crossing-rust-smoke.test.mjs index 482fcf9..cc9ed61 100644 --- a/tests/persona-discord-crossing-rust-smoke.test.mjs +++ b/tests/persona-discord-crossing-rust-smoke.test.mjs @@ -16,7 +16,7 @@ function runtime(){const cr=createRequire(resolve(cult,"packages","cultcache-ts" const rustFixture=existsSync(resolve(epiphany,"epiphany-core","src","bin","epiphany-persona-discord-crossing-fixture.rs"))&&spawnSync("cargo",["--version"]).status===0; test("Bifrost consumes a Rust-authored request store through its read-only crossing directory",{skip:rustFixture?false:"needs cargo and Epiphany's epiphany-persona-discord-crossing-fixture fixture (removed in Epiphany 387afe49)"},async()=>{ const root=await mkdtemp(resolve(tmpdir(),"rust-bifrost-crossing-")),requestDir=resolve(root,"request"),receiptDir=resolve(root,"receipt"),requestStore=resolve(requestDir,"requests.cc"),anchor=resolve(root,"mouth-anchor.msgpack"),identity=resolve(root,"mouth.cc"),deliveryKey=resolve(root,"delivery.seed"),bridge=resolve(root,"bridge.mjs"); - const cargo=spawnSync("cargo",["run","--quiet","--manifest-path",resolve(epiphany,"epiphany-core","Cargo.toml"),"--bin","epiphany-persona-discord-crossing-fixture","--","--request-store",requestStore,"--identity-store",identity,"--request-anchor",anchor],{cwd:epiphany,encoding:"utf8",timeout:180000,windowsHide:true,env:{...process.env,CARGO_TARGET_DIR:"C:\\Users\\Meta\\.cargo-target-codex"}}); + const cargo=spawnSync("cargo",["run","--quiet","--manifest-path",resolve(epiphany,"epiphany-core","Cargo.toml"),"--bin","epiphany-persona-discord-crossing-fixture","--","--request-store",requestStore,"--identity-store",identity,"--request-anchor",anchor],{cwd:epiphany,encoding:"utf8",timeout:180000,windowsHide:true}); assert.equal(cargo.status,0,cargo.stderr||cargo.stdout); await chmod(requestStore,0o444); await enrollDomainIdentity(deliveryKey,"delivery",receiptIdentityDomain); diff --git a/tests/persona-discord-rudp-cross-language.test.mjs b/tests/persona-discord-rudp-cross-language.test.mjs index 8212f97..f22f93f 100644 --- a/tests/persona-discord-rudp-cross-language.test.mjs +++ b/tests/persona-discord-rudp-cross-language.test.mjs @@ -20,7 +20,7 @@ test("Rust Persona mouth and Node Bifrost exchange one signed request and termin let admitted; const server=await startPersonaDiscordDeliveryRudpServer({runtime,endpoint:"rudp://127.0.0.1:0",onRequest:async request=>{admitted=request;const digest=`sha256-${createHash("sha256").update(runtime.msgpack.encode(requestSigningTuple(request))).digest("hex")}`,receipt={schemaVersion:"bifrost.persona_discord_delivery_receipt.v0",receiptId:request.requestId,requestId:request.requestId,requestPayloadSha256:digest,status:"completed",channelId:request.channelId,replyToMessageId:request.replyToMessageId,messageId:"node-rudp-message",transport:"bifrost.discord-post",crossingReceiptId:"node-rudp-crossing",receiptUrl:`https://discord.com/channels/g/${request.channelId}/node-rudp-message`,completedAt:new Date().toISOString(),providerIdentityId:deliveryIdentity.identityId,privateStateExposed:false,providerSignature:new Uint8Array()};receipt.providerSignature=new Uint8Array(signDomainPurpose(deliveryIdentity,receiptSignatureDomain,receiptSigningPurpose,runtime.msgpack.encode(receiptSigningTuple(receipt))));return receipt;}}); try{ - const output=await run("cargo",["run","--quiet","--manifest-path",resolve(epiphany,"epiphany-core","Cargo.toml"),"--bin","epiphany-persona-discord-rudp-client-fixture","--","--request-store",requestStore,"--receipt-store",receiptStore,"--identity-store",identityStore,"--request-anchor",requestAnchor,"--receipt-anchor",receiptAnchor,"--endpoint",`127.0.0.1:${server.address.port}`],{cwd:epiphany,env:{...process.env,CARGO_TARGET_DIR:"C:\\Users\\Meta\\.cargo-target-codex"}}); + const output=await run("cargo",["run","--quiet","--manifest-path",resolve(epiphany,"epiphany-core","Cargo.toml"),"--bin","epiphany-persona-discord-rudp-client-fixture","--","--request-store",requestStore,"--receipt-store",receiptStore,"--identity-store",identityStore,"--request-anchor",requestAnchor,"--receipt-anchor",receiptAnchor,"--endpoint",`127.0.0.1:${server.address.port}`],{cwd:epiphany}); assert.equal(output.code,0,`${output.stderr}\nserver diagnostics: ${JSON.stringify(server.diagnostics)}`);const result=JSON.parse(output.stdout.trim());assert.equal(result.status,"completed");assert.equal(result.messageId,"node-rudp-message");assert.equal(admitted.targetRuntimeId,"epiphany-starfire");assert.ok((await readFile(requestStore)).length>0);assert.ok((await readFile(receiptStore)).length>0); }finally{server.close();} });