Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/durable-operations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
DurableOperationError,
DurableOperationManager,
DurableOperationStore,
NEXUS_GATEWAY_ACCEPTED_CONTRACT_SHA256,
NEXUS_GATEWAY_ACCEPTED_MANAGER_SHA256,
NEXUS_GATEWAY_RECOVERY_BRIDGE_CODE,
NEXUS_GATEWAY_RECOVERY_PREFLIGHT_BRIDGE_CODE,
Expand Down Expand Up @@ -618,6 +619,17 @@ test("nexus_gateway_recover malformed manager output fails closed as uncertain",
}
});

test("Nexus Gateway recovery trust roots track the accepted #526 r10 lineage", () => {
assert.equal(
NEXUS_GATEWAY_ACCEPTED_MANAGER_SHA256,
"6873dde17e08d4020620c2408e414327b176be723f5f23f01bee754b2627502c",
);
assert.equal(
NEXUS_GATEWAY_ACCEPTED_CONTRACT_SHA256,
"3cd032639f69349bd44e61dec41551957e9034157febfff83e7fb3c89b5ef798",
);
});

test("fixed Nexus bridge rejects manager hash mismatch before importing manager code", { skip: process.platform !== "darwin" }, async () => {
const home = await mkdtemp(join(tmpdir(), "devspace-nexus-bridge-hash-"));
try {
Expand Down
6 changes: 4 additions & 2 deletions src/durable-operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ const HEX64 = /^[0-9a-f]{64}$/;
const NEXUS_DEPLOYMENT_ID = /^r1-[0-9a-f]{40}$/;
export const NEXUS_GATEWAY_RECOVERY_SCHEMA = "nexus.gateway.durable_recovery_request.v2" as const;
export const NEXUS_GATEWAY_INTERPRETER = "/Users/jameschen/Workspace/Nexus-new/.venv/bin/python";
export const NEXUS_GATEWAY_ACCEPTED_MANAGER_SHA256 = "7af3760bd2b6729654a89d7b07fa4c43bb9b323e8e0006a08aa5e485d78562ac";
export const NEXUS_GATEWAY_ACCEPTED_CONTRACT_SHA256 = "be6918bc5b328dfbf8c50387e88f983ce33f0096542cc22109f75fbe6250ab5e";
// Nexus-new #526 successor-manager / r10 recovery lineage. The exact accepted
// bytes are unchanged from accepted source 6d1e3221 through current 40ad671e.
export const NEXUS_GATEWAY_ACCEPTED_MANAGER_SHA256 = "6873dde17e08d4020620c2408e414327b176be723f5f23f01bee754b2627502c";
export const NEXUS_GATEWAY_ACCEPTED_CONTRACT_SHA256 = "3cd032639f69349bd44e61dec41551957e9034157febfff83e7fb3c89b5ef798";
export const NEXUS_GATEWAY_STATE_ROOT = join(homedir(), "Library", "Application Support", "Nexus", "gateway-direct");

export interface NexusGatewayRecoveryRequest {
Expand Down
Loading