@adhdev/daemon-core 0.9.82-rc.45 → 0.9.82-rc.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/commands/router.ts +16 -7
package/package.json
CHANGED
package/src/commands/router.ts
CHANGED
|
@@ -3902,8 +3902,17 @@ export class DaemonCommandRouter {
|
|
|
3902
3902
|
peerConfirmedCount: 0,
|
|
3903
3903
|
unavailableNodeIds: [] as string[],
|
|
3904
3904
|
};
|
|
3905
|
+
// Default/cached loads may not attempt a remote peer probe yet; do not surface that as
|
|
3906
|
+
// a direct mesh truth failure until an explicit probe attempt actually fails.
|
|
3907
|
+
const passivePeerTruthNotAttempted = requireDirectPeerTruth
|
|
3908
|
+
&& !refreshRequested
|
|
3909
|
+
&& directTruth.directEvidenceCount > 0
|
|
3910
|
+
&& directTruth.peerAttemptedCount === 0;
|
|
3911
|
+
const effectiveDirectTruth = passivePeerTruthNotAttempted
|
|
3912
|
+
? { ...directTruth, unavailableNodeIds: [] as string[] }
|
|
3913
|
+
: directTruth;
|
|
3905
3914
|
const directTruthSatisfied = !requireDirectPeerTruth
|
|
3906
|
-
|| (
|
|
3915
|
+
|| (effectiveDirectTruth.directEvidenceCount > 0 && effectiveDirectTruth.unavailableNodeIds.length === 0);
|
|
3907
3916
|
if (requireDirectPeerTruth && !directTruthSatisfied) {
|
|
3908
3917
|
const failureResult = {
|
|
3909
3918
|
success: false,
|
|
@@ -3937,7 +3946,7 @@ export class DaemonCommandRouter {
|
|
|
3937
3946
|
});
|
|
3938
3947
|
return failureResult;
|
|
3939
3948
|
}
|
|
3940
|
-
const directTruthUnavailableNodeIds = new Set(
|
|
3949
|
+
const directTruthUnavailableNodeIds = new Set(effectiveDirectTruth.unavailableNodeIds);
|
|
3941
3950
|
const selectedCoordinatorNodeId = readStringValue(
|
|
3942
3951
|
mesh.coordinator?.preferredNodeId,
|
|
3943
3952
|
(mesh.nodes?.[0] as any)?.id,
|
|
@@ -4158,11 +4167,11 @@ export class DaemonCommandRouter {
|
|
|
4158
4167
|
directPeerTruth: {
|
|
4159
4168
|
required: true,
|
|
4160
4169
|
satisfied: directTruthSatisfied,
|
|
4161
|
-
directEvidenceCount:
|
|
4162
|
-
localConfirmedCount:
|
|
4163
|
-
peerAttemptedCount:
|
|
4164
|
-
peerConfirmedCount:
|
|
4165
|
-
unavailableNodeIds:
|
|
4170
|
+
directEvidenceCount: effectiveDirectTruth.directEvidenceCount,
|
|
4171
|
+
localConfirmedCount: effectiveDirectTruth.localConfirmedCount,
|
|
4172
|
+
peerAttemptedCount: effectiveDirectTruth.peerAttemptedCount,
|
|
4173
|
+
peerConfirmedCount: effectiveDirectTruth.peerConfirmedCount,
|
|
4174
|
+
unavailableNodeIds: effectiveDirectTruth.unavailableNodeIds,
|
|
4166
4175
|
},
|
|
4167
4176
|
} : {}),
|
|
4168
4177
|
historicalEvidenceOnly: ['recoveryHints', 'ledger.summary', 'queue.summary'],
|