MCPcopy Create free account
hub / github.com/EvoMap/evolver / canApplyPartialNodeSecretTupleWrite

Function canApplyPartialNodeSecretTupleWrite

src/proxy/mailbox/state.js:104–112  ·  view source on GitHub ↗
(key, disk, next)

Source from the content-addressed store, hash-verified

102}
103
104function canApplyPartialNodeSecretTupleWrite(key, disk, next) {
105 if (key !== 'node_secret_version') return false;
106 if (!isHubRotatedNodeSecretState(disk)) return true;
107 if (!isHubRotatedNodeSecretState(next)) return false;
108 if (String(next.node_secret).trim() !== String(disk.node_secret).trim()) return false;
109 const nextVersion = parseNodeSecretVersion(next.node_secret_version);
110 const diskVersion = parseNodeSecretVersion(disk.node_secret_version);
111 return Boolean(nextVersion && (!diskVersion || nextVersion >= diskVersion));
112}
113
114/**
115 * @param {string} stateFile

Callers 1

Calls 2

parseNodeSecretVersionFunction · 0.70

Tested by

no test coverage detected