Three improvements over the complex-graph crucibles:
1. Anti-vacuity guards (assertRealVerdict): rigor's complexity verdict
PASSES on zero observations — a broken action (missing import, wrong
args shape) silently goes green. Every complexity verdict now asserts
observationCount >= 50, costSource == expected, and calibrated ==
true, so a vacuous verdict is a test failure.
2. Snapshot complexity: serialized snapshot BYTE SIZE is O(n) in graph
size, verified deterministically (build and restore round-trip).
Wall-clock timing at sub-ms scale is pure jitter for the e-process
spread check (verified empirically — buildTime O(n) failed on spread
while buildBytes passed); latency stays covered by benchmark
percentiles.
3. complex-graph-mutation-crucible: MUTATION-FRESHNESS — random edge
removals/additions on community + scale-free graphs, normal/binary
agreement re-checked after EVERY mutation, stale grants and missing
fresh grants are failures. Two real findings during bring-up, both
fixture bugs rather than engine bugs:
- the scale-free generator returned a raw edge COUNT as 'relations'
while other generators returned edge arrays (now null, consistent
with dense-adversarial; the crucible walks the arbiter's store)
- arbiter.relations stores NUMERIC ids, so removals must resolve
string keys to ids before matching (string-key comparison silently
no-oped, looking like a stale grant)
Snapshot read-only semantics documented in the crucible: enableCondensed-
Snapshot flips the engine to read-only permanently, so mutation crucibles
exercise the writable path, and frozen-snapshot properties stay with the
snapshot-parity suites. Rigor 239/239, full suite 841/779/0.
The engine's campaigns ran on toy star graphs. complex-graphs.js adds four
production-shaped generators:
- community: stochastic block model with nested groups (groups of groups),
tuple-to-userset access, defeasible blocked overlay, cross-community
delegation chains
- scale-free: preferential attachment, power-law degree distribution,
hub-heavy adjacency
- hierarchy: org-tree (org -> dept -> team -> member) with 3-hop ownership
chains
- dense-adversarial: maximal overlap on small graphs — reciprocal edges,
self-loops, multi-rule policies (cycle + cache-collision pressure)
complex-graph-crucible.test.js runs four crucibles over them: structural
shape assertions across seeds, exhaustive normal/binary/snapshot parity
with bounds on every query, a 300-effort rigor fuzz campaign over
(generator, seed, user, relation, object) triples enforcing
allow/deny + possibility agreement across all three evaluation modes, and
a reachability guard proving complex policies (TTU, chain) are actually
exercised rather than denied trivially.
Generator fixes along the way: sub-groups own their own resources so the
one-level TTU is structurally reachable, and departments own resources so
the 3-hop chain terminates. Full rigor 234/234.