e98137a04f
Prod gating is dominated by rule-based queries, not direct relations. complex-query-bench.js measures cold-traffic latency (distinct subject/object per sample, no cache reuse) across seven complex policy shapes — tuple-to-userset, 2-hop chain, defeasible exclusion, ABAC relational comparator, OWA union, nested comparator + OWA fusion, and a mixed 10-rule union — for both evaluation paths, and enforces binary/ normal decision parity on every query. At 25k and 100k nodes: binary wins every scenario (1.15x-2.0x median speedup), p99 stays sub-0.05ms, and parity mismatches are zero across all scenarios. Binary's early exit wins where a strong rule exists; the earlier direct-relation 'binary slower' observation was a cache-hit artifact (normal serves repeat queries from the rule result cache, binary correctly does not, since thresholds are per-call options). Note: report median, not avg — GC outliers inflate the mean (avg > p95 observed on two rows).
74 lines
3.7 KiB
JSON
74 lines
3.7 KiB
JSON
{
|
|
"name": "@arbiter/core",
|
|
"version": "1.0.0",
|
|
"description": "Arbiter core engine: graph indices, relation/reachability, authorization rule evaluator, DSL/AST, condensed & sharded snapshots, and evidence fusion.",
|
|
"license": "ISC",
|
|
"author": "",
|
|
"type": "module",
|
|
"main": "src/index.js",
|
|
"exports": {
|
|
".": "./src/index.js",
|
|
"./package.json": "./package.json"
|
|
},
|
|
"files": [
|
|
"src/"
|
|
],
|
|
"scripts": {
|
|
"test": "node --test --test-force-exit \"tests/**/*.test.js\" \"tests/integration/*.js\"",
|
|
"test:all": "npm test",
|
|
"test:rules": "node --test --test-force-exit \"tests/rules/**/*.test.js\"",
|
|
"test:engine": "node --test --test-force-exit \"tests/engine/**/*.test.js\"",
|
|
"test:rigor": "node --test --test-force-exit \"tests/rigor/**/*.test.js\"",
|
|
"test:rigor:authz": "node --test --test-force-exit tests/rigor/authorization-graph.test.js tests/rigor/authorization-config-consistency.test.js",
|
|
"test:rigor:zanzibar": "node --test --test-force-exit tests/rigor/zanzibar-semantics.test.js tests/rigor/zanzibar-consistency.test.js tests/rigor/zanzibar-defeasible-dsl-comparator.test.js",
|
|
"test:rigor:model": "node --test --test-force-exit tests/rigor/model-based-graph.test.js tests/rigor/dsl-mutation-parity.test.js",
|
|
"test:rigor:snapshot": "node --test --test-force-exit tests/rigor/snapshot-parity.test.js",
|
|
"test:rigor:explain": "node --test --test-force-exit tests/rigor/check-explain-agreement.test.js",
|
|
"test:rigor:cache": "node --test --test-force-exit tests/rigor/cache-parity.test.js",
|
|
"test:rigor:batch": "node --test --test-force-exit tests/rigor/batch-loading-parity.test.js",
|
|
"test:rigor:overlay": "node --test --test-force-exit tests/rigor/overlay-precedence.test.js",
|
|
"test:core": "node --test --test-force-exit \"tests/core/**/*.test.js\"",
|
|
"test:ast": "node --test --test-force-exit \"tests/ast/**/*.test.js\"",
|
|
"test:property": "node --test --test-force-exit \"tests/property-based/**/*.test.js\"",
|
|
"test:integration": "node --test --test-force-exit \"tests/integration/*.js\"",
|
|
"test:perf": "RUN_PERF_TESTS=1 node --test --test-force-exit tests/engine/core-performance-targets.test.js",
|
|
"generate:parser": "node scripts/generate-parser.js",
|
|
"build:ast": "npm run generate:parser",
|
|
"benchmark": "node --expose-gc scripts/benchmark.js",
|
|
"benchmark:core": "node benchmarks/core-performance-benchmark.js",
|
|
"benchmark:batch": "node benchmarks/batch-size-analysis.js",
|
|
"benchmark:chain": "node benchmarks/chain-rule-benchmark.js",
|
|
"benchmark:reachability": "node benchmarks/reachability-optimization-benchmark.js",
|
|
"benchmark:comparator": "node benchmarks/relational-comparator-benchmark.js",
|
|
"benchmark:business": "node benchmarks/business-operations-benchmark.js",
|
|
"benchmark:inference": "node benchmarks/benchmark-interval-inference.js",
|
|
"benchmark:b2c": "node benchmarks/b2c-auth-bench.js",
|
|
"benchmark:authz": "node benchmarks/b2c-auth-bench.js",
|
|
"benchmark:snapshot": "node benchmarks/arbiter-snapshot-boot-bench.js",
|
|
"benchmark:sharded": "node benchmarks/sharded-snapshot-build.js",
|
|
"benchmark:memory": "node benchmarks/memory-breakdown.js",
|
|
"benchmark:multi-hop": "node benchmarks/multi-hop-rule-bench.js",
|
|
"benchmark:save": "node --expose-gc scripts/benchmark.js --save",
|
|
"benchmark:complex": "node --expose-gc benchmarks/complex-query-bench.js"
|
|
},
|
|
"keywords": [
|
|
"zanzibar",
|
|
"authorization",
|
|
"graph",
|
|
"rebac",
|
|
"rule-engine",
|
|
"dsl"
|
|
],
|
|
"dependencies": {
|
|
"@tenere/pltc-core": "^0.6.3",
|
|
"heapify": "^1.0.2",
|
|
"uuidv7": "^1.0.2"
|
|
},
|
|
"devDependencies": {
|
|
"@rigor/core": "*",
|
|
"@tenere/benchmark-lib": "^2.0.1",
|
|
"fast-check": "^4.5.3",
|
|
"peggy": "^5.0.6"
|
|
}
|
|
}
|