56 Commits

Author SHA1 Message Date
John Dvorak 15e9728d00 js-rigor: tx atomicity (poison at any position rolls back), batch add validation, batch+PLTC
- _addRelationInternal now validates possibility like the single-add path
  (batch adds could store out-of-range values and make the transactional
  wrapper report success:true after a partial apply)
- tx-rollback-parity.test.js: poison at every batch position rolls back
  fully; clean batches apply in order; batch+PLTC reachability reflects
  batch writes immediately
2026-07-31 15:02:12 -07:00
John Dvorak 5c7ec95344 js-rigor: extend fuzzer campaign to 6 config kinds (intersection, defeasible)
Confirms min-intersection and when*unless defeasible semantics hold under
fuzzed config transitions and mutation bursts.
2026-07-31 14:27:13 -07:00
John Dvorak f5690d4777 js-rigor: fix batch operation ordering (last-write-wins), batch-order campaign
updateRelationsBatch previously pre-sorted ops remove->modify->add, which
changed the final state whenever one tuple was touched by mixed kinds:
[add, remove] left the tuple present, [modify, add, modify] ended with
the middle value. Now ops apply strictly in the given order via the
dedup-aware _addRelationInternal (in-place last-write-wins) with upfront
validation, post-batch PLTC edge updates, and per-relation arbiter-level
cache invalidation.

batch-order-parity.test.js pins the contract with an in-order mirror
(modify-of-missing is a silent no-op).
2026-07-31 14:25:07 -07:00
John Dvorak 7ffa5045e6 js-rigor: batch cache staleness, tx-batch crash, TTL bypass; value freshness campaigns
Engine fixes:
- RelationUpdates.updateRelationsBatch: invalidate arbiter-level caches
  (rule result cache, ChainRule caches, direct-check cache) per affected
  relation — batch updates bypassed Arbiter.addRelation and served stale
  decisions after batch modify/swap with warm caches
- updateRelationsBatchTransactional rollback: new Map(Set) crashed with
  'Iterator value is not an entry object' — fixed to new Set
- RelationalComparatorRule: value extraction (direct-list and cached
  direct paths) now gates on valueManager._isValueExpired — TTL-expired
  values no longer feed comparator decisions

Campaigns:
- value-freshness-parity.test.js: batch modify/swap/tx rollback freshness
  with comparator mirror (batch MODIFY of a missing relation is a silent
  no-op — pinned)
- ttl-expiry-parity.test.js: injected-clock TTL expiry through the
  comparator path (exact parity with caching off; bounded staleness with
  caching on), faithful changed_last_at mirror semantics
2026-07-31 14:21:22 -07:00
John Dvorak 2de5faa7c9 js-rigor: greybox fuzzer campaign, config validation, lifecycle positional gates
- fuzzer-mutation-needles.test.js: first greybox-fuzzer campaign (mutation
  + replay-near-failure strategies) hunting cache staleness across config
  kind transitions; pins canonical config shapes ({union:{rules}},
  {exclusion:[a,b]} with probabilistic P(A)*(1-P(B)) semantics) and a
  mirror faithful to the engine's phantom-node no-op rule
- ArbiterConfig.setRelationConfig: clean validation error for non-object
  configs (was cryptic internal TypeError under fuzzed args)
- protocol-snapshot-lifecycle.test.js: beforeStep/afterStep positional
  gates (virgin state, mirror-engine tuple sync)
- dropped complexity-verification attempt: wall-clock e-process too noisy
  at sub-ms operation scale
2026-07-31 13:59:02 -07:00
John Dvorak 717ae1031e initial commit: @arbiter/core authorization engine with js-rigor hardening
Zanzibar-style authorization graph engine (direct/chain/TTU/defeasible/
binary modes, condensed snapshots, value relations) with 39 rigor test
campaigns. Includes fixes for snapshot binary writer/reader format
mismatch (snapshot-of-snapshot corruption), possibility write-boundary
validation, empty-graph snapshot serialization, relation lookup cache
direction collision, config-redefinition cache invalidation, binary
threshold semantics, defeasible compiled routing, and comparator
reason whitelisting.
2026-07-31 13:44:06 -07:00