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:
John Dvorak
2026-07-31 15:34:45 -07:00
parent 8f863275c2
commit ad9aa22225
3 changed files with 51 additions and 2 deletions
+7 -1
View File
@@ -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;
+4 -1
View File
@@ -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;
}