js-rigor: partial-graph policy limits now enforce; binary-partial pins
- Arbiter constructor and setPartialGraphPolicy dropped maxNodes, maxRelations, and reservedRelations — the partial-graph context always saw the 1000/2000 defaults, silently disabling configured DoS guards. Both paths now carry the limits through; policy limits test pins constructor + setter enforcement and custom reservedRelations.
This commit is contained in:
+7
-1
@@ -130,7 +130,13 @@ export class Arbiter {
|
||||
|| 'deterministic',
|
||||
reducers: {
|
||||
...(options?.partialGraphPolicy?.reducers || {})
|
||||
}
|
||||
},
|
||||
// Size/reserved limits must survive construction: the partial-graph
|
||||
// context reads them from the policy, and dropping them silently
|
||||
// disabled configured DoS guards (defaults 1000/2000 applied).
|
||||
maxNodes: options?.partialGraphPolicy?.maxNodes,
|
||||
maxRelations: options?.partialGraphPolicy?.maxRelations,
|
||||
reservedRelations: options?.partialGraphPolicy?.reservedRelations
|
||||
};
|
||||
|
||||
this.snapshotEnabled = false;
|
||||
|
||||
@@ -62,7 +62,10 @@ export class ArbiterConfig {
|
||||
|
||||
this.arbiter.partialGraphPolicy = {
|
||||
conflict_mode: conflictMode,
|
||||
reducers
|
||||
reducers,
|
||||
maxNodes: next.maxNodes !== undefined ? next.maxNodes : current.maxNodes,
|
||||
maxRelations: next.maxRelations !== undefined ? next.maxRelations : current.maxRelations,
|
||||
reservedRelations: next.reservedRelations !== undefined ? next.reservedRelations : current.reservedRelations
|
||||
};
|
||||
return this.arbiter.partialGraphPolicy;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user