diff --git a/.github/workflows/exp64-evidence.yml b/.github/workflows/exp64-evidence.yml new file mode 100644 index 0000000..e7c7b46 --- /dev/null +++ b/.github/workflows/exp64-evidence.yml @@ -0,0 +1,46 @@ +name: exp64-evidence +on: + pull_request: + push: + branches: [main] +jobs: + replay-and-real-package: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + with: + version: 10.9.0 + - uses: actions/setup-node@v4 + with: + node-version: '22' + cache: npm + cache-dependency-path: experiments/64-merged-rule-ownership/ci/package-lock.json + - name: Install portable core/experiment toolchain + # Older experiments retain machine-local file deps; do not rewrite unrelated packages. + run: | + npm ci --prefix experiments/64-merged-rule-ownership/ci --workspaces=false + ln -s experiments/64-merged-rule-ownership/ci/node_modules node_modules + mkdir -p node_modules/@swarmlab + ln -s "$GITHUB_WORKSPACE/core" node_modules/@swarmlab/core + - name: Build and typecheck core plus new experiment + run: | + node_modules/.bin/tsc -b core experiments/64-merged-rule-ownership + node_modules/.bin/tsc -b --force core experiments/64-merged-rule-ownership + - name: Verify frozen corpus and exact content-addressed experiment receipts + run: npm run verify:evidence && node experiments/64-merged-rule-ownership/verify-receipts.mjs + - name: Checkout exact candidate (not moving main) + uses: actions/checkout@v4 + with: + repository: heybeaux/aegis + ref: edb9f557fc776b5710360a453f0df0146f3b977b + path: .aegis-candidate + - name: Build real Aegis + working-directory: .aegis-candidate + run: pnpm install --frozen-lockfile && pnpm --filter @heybeaux/lattice-aegis build + - name: Execute same frozen experiment and inspect rows/metrics/actual source-dist receipts + run: | + AEGIS_REPO="$GITHUB_WORKSPACE/.aegis-candidate" node experiments/64-merged-rule-ownership/dist/main.js > "$RUNNER_TEMP/exp64.log" + cat "$RUNNER_TEMP/exp64.log" + node experiments/64-merged-rule-ownership/verify-receipts.mjs --run "$RUNNER_TEMP/exp64.log" diff --git a/CLAIMS.json b/CLAIMS.json index d629bb8..580a69d 100644 --- a/CLAIMS.json +++ b/CLAIMS.json @@ -6333,5 +6333,75 @@ "evidenceStatus": "verified", "seedSetId": "async-evaluator-config-integrity-v1", "notes": "Pre-registration b0378e0 BEFORE implementation/output; 21 frozen scenarios. Current-main baseline repeated with identical 63 arm scenario rows, same harness hash candidate; full 68-event replay equality. Two diagnostic traces had fixture-only I/O-accounting error; preserved locally but excluded from claims. Thresholds/scenarios unchanged. Exp57/RT47 remains prior unlanded work, NOT novelty tonight. No threshold tuned; holdout reserved unused. Authentic plain-data host, no post-return/ABA/getter/proxy/latency claims." + }, + { + "id": "RT-54", + "claim": "Mutable caller recipes must not silently edit a constructed effective cascade or receive consumer edits through merged rule aliases.", + "experiment": "experiments/64-merged-rule-ownership", + "spec": "specs/70-merged-rule-ownership.md", + "runIds": [ + "mro-mv96376j", + "mro-mv9637ag", + "mro-mv966i1f" + ], + "tracePaths": [ + "experiments/64-merged-rule-ownership/runs/mro-mv96376j.jsonl", + "experiments/64-merged-rule-ownership/runs/mro-mv9637ag.jsonl", + "experiments/64-merged-rule-ownership/runs/mro-mv966i1f.jsonl" + ], + "scoreFields": [ + "experiments/64-merged-rule-ownership/runs/mro-mv96376j.jsonl#last.detachedControlAccuracy", + "experiments/64-merged-rule-ownership/runs/mro-mv96376j.jsonl#last.aegisProducerDriftRate", + "experiments/64-merged-rule-ownership/runs/mro-mv96376j.jsonl#last.aegisUnsafeAllowRate", + "experiments/64-merged-rule-ownership/runs/mro-mv96376j.jsonl#last.aegisResolutionAccuracy", + "experiments/64-merged-rule-ownership/runs/mro-mv96376j.jsonl#last.aegisConsumerIsolation", + "experiments/64-merged-rule-ownership/runs/mro-mv96376j.jsonl#last.aegisControlAccuracy", + "experiments/64-merged-rule-ownership/runs/mro-mv96376j.jsonl#last.aegisCallerOwnership", + "experiments/64-merged-rule-ownership/runs/mro-mv9637ag.jsonl#last.detachedControlAccuracy", + "experiments/64-merged-rule-ownership/runs/mro-mv9637ag.jsonl#last.aegisProducerDriftRate", + "experiments/64-merged-rule-ownership/runs/mro-mv9637ag.jsonl#last.aegisUnsafeAllowRate", + "experiments/64-merged-rule-ownership/runs/mro-mv9637ag.jsonl#last.aegisResolutionAccuracy", + "experiments/64-merged-rule-ownership/runs/mro-mv9637ag.jsonl#last.aegisConsumerIsolation", + "experiments/64-merged-rule-ownership/runs/mro-mv9637ag.jsonl#last.aegisControlAccuracy", + "experiments/64-merged-rule-ownership/runs/mro-mv9637ag.jsonl#last.aegisCallerOwnership", + "experiments/64-merged-rule-ownership/runs/mro-mv966i1f.jsonl#last.detachedControlAccuracy", + "experiments/64-merged-rule-ownership/runs/mro-mv966i1f.jsonl#last.aegisProducerDriftRate", + "experiments/64-merged-rule-ownership/runs/mro-mv966i1f.jsonl#last.aegisUnsafeAllowRate", + "experiments/64-merged-rule-ownership/runs/mro-mv966i1f.jsonl#last.aegisResolutionAccuracy", + "experiments/64-merged-rule-ownership/runs/mro-mv966i1f.jsonl#last.aegisConsumerIsolation", + "experiments/64-merged-rule-ownership/runs/mro-mv966i1f.jsonl#last.aegisControlAccuracy", + "experiments/64-merged-rule-ownership/runs/mro-mv966i1f.jsonl#last.aegisCallerOwnership" + ], + "expectedValues": { + "experiments/64-merged-rule-ownership/runs/mro-mv96376j.jsonl#last.detachedControlAccuracy": 1, + "experiments/64-merged-rule-ownership/runs/mro-mv96376j.jsonl#last.aegisProducerDriftRate": 0.8888888888888888, + "experiments/64-merged-rule-ownership/runs/mro-mv96376j.jsonl#last.aegisUnsafeAllowRate": 0.8888888888888888, + "experiments/64-merged-rule-ownership/runs/mro-mv96376j.jsonl#last.aegisResolutionAccuracy": 0.38095238095238093, + "experiments/64-merged-rule-ownership/runs/mro-mv96376j.jsonl#last.aegisConsumerIsolation": 0, + "experiments/64-merged-rule-ownership/runs/mro-mv96376j.jsonl#last.aegisControlAccuracy": 0.7777777777777778, + "experiments/64-merged-rule-ownership/runs/mro-mv96376j.jsonl#last.aegisCallerOwnership": 1, + "experiments/64-merged-rule-ownership/runs/mro-mv9637ag.jsonl#last.detachedControlAccuracy": 1, + "experiments/64-merged-rule-ownership/runs/mro-mv9637ag.jsonl#last.aegisProducerDriftRate": 0.8888888888888888, + "experiments/64-merged-rule-ownership/runs/mro-mv9637ag.jsonl#last.aegisUnsafeAllowRate": 0.8888888888888888, + "experiments/64-merged-rule-ownership/runs/mro-mv9637ag.jsonl#last.aegisResolutionAccuracy": 0.38095238095238093, + "experiments/64-merged-rule-ownership/runs/mro-mv9637ag.jsonl#last.aegisConsumerIsolation": 0, + "experiments/64-merged-rule-ownership/runs/mro-mv9637ag.jsonl#last.aegisControlAccuracy": 0.7777777777777778, + "experiments/64-merged-rule-ownership/runs/mro-mv9637ag.jsonl#last.aegisCallerOwnership": 1, + "experiments/64-merged-rule-ownership/runs/mro-mv966i1f.jsonl#last.detachedControlAccuracy": 1, + "experiments/64-merged-rule-ownership/runs/mro-mv966i1f.jsonl#last.aegisProducerDriftRate": 0, + "experiments/64-merged-rule-ownership/runs/mro-mv966i1f.jsonl#last.aegisUnsafeAllowRate": 0, + "experiments/64-merged-rule-ownership/runs/mro-mv966i1f.jsonl#last.aegisResolutionAccuracy": 1, + "experiments/64-merged-rule-ownership/runs/mro-mv966i1f.jsonl#last.aegisConsumerIsolation": 1, + "experiments/64-merged-rule-ownership/runs/mro-mv966i1f.jsonl#last.aegisControlAccuracy": 1, + "experiments/64-merged-rule-ownership/runs/mro-mv966i1f.jsonl#last.aegisCallerOwnership": 1 + }, + "reproductionCommand": "npm run build && AEGIS_REPO=/path/to/pinned/real/aegis node experiments/64-merged-rule-ownership/dist/main.js", + "stackRecommendation": "Each returned effective Rule owns a structured clone; precedence, warnings and mutable output contract unchanged.", + "stackReposAndPRs": [ + "https://github.com/heybeaux/aegis/pull/70", + "https://github.com/heybeaux/swarmlab/pull/53" + ], + "evidenceStatus": "verified", + "notes": "Unique synchronous cascade value-ownership boundary. Baseline origin/main4be84ed repeated identical rows, 8/9 unsafe allow; f274278 unchanged-harness21/21 green. Holdout unused (no tuning), raw traces/package manifests preserved. Candidate not remotely merged; RT50\u201353 pending and not imported. Direct result mutation/loadPack aliasing unproven by design." } ] diff --git a/JOURNAL.md b/JOURNAL.md index fe16936..72ba0bd 100644 --- a/JOURNAL.md +++ b/JOURNAL.md @@ -307,3 +307,52 @@ Spec64 b0378e0; 21 frozen scenarios, seed async-evaluator-config-integrity-v1. R Local regression:1087 Aegis tests, gate47/47; SwarmLab46 claims/96 traces/881 assertions; exp55/56 green regression only. Orphaned exp57 preserved, not landed or independently certified. RT47 rebase must reconcile trusted clock function capture with RT48 plain-policy snapshot; combined behavior unproven. Linked PRs: https://github.com/heybeaux/aegis/pull/63 (Aegis), https://github.com/heybeaux/swarmlab/pull/46 (SwarmLab). Local green; CI status inspected in tonight's pipeline ledger before any merge. + +## RT54 — Merged rule reference ownership (exp64 / Spec70, 2026-10-14) + +New pre-registered question: can caller-owned rule recipes edit already-constructed +cascade policy between synchronous merge and compilation? Pre-registration `4e5c4c8`; +21 frozen scenarios, no tuning or LLM judge. Distinct from in-flight RT48, receipt +metadata RT49, defaults RT51, compiled-cache RT52 and overlay consent RT53. + +Real Aegis `4be84ed` baseline `mro-mv96376j` / `mro-mv9637ag` identical rows: +producer drift **8/9**, unsafe allow **8/9**, exact resolution **8/21**; +consumer isolation **0**, compatibility controls **7/9**, caller ownership **1**. +Independent detached-boundary diagnostic **21/21** on both baselines; it is a +control, not replacement Aegis. These red traces remain committed. + +Runtime patch `f27427879984856bad36731788376dbc74702aaa` clones each effective Rule independently at +merge return. Separate cloning is important: cloning the whole array preserves +shared nested identities across distinct rule ids. Same unchanged harness/seeds, +`mro-mv966i1f`: producer drift **0/9**, unsafe allow **0/9**, resolution **21/21**, +all secondary metrics **1**,46-event full replay; manifests pin real package. +Focused frozen tests **16 red/4 pass ->20 green**. Thresholds unchanged. + +Host owns provenance, deliberate policy edits and reloading; result remains +editable. Direct loadPack binding, live immutability/atomic execution, getters or +proxies are not claimed. Stored scores are historical regression evidence, +not runtime verification. Full regression and remote CI/PR status will be recorded +below when actually observed. Prior exp60–63 candidates remain separate/unmerged. + +### Regression verification (not new evidence) +Full Aegis release:check at `edb9f55`: build/typecheck **1145/1145 tests** +(628core,152Aegis,22collect,86label,203hook,54bench), static measured evidence **50/50**. +Initial evidence catalogue update exposed one stale expected report banner, not a +runtime regression: corrected RT49->RT54 expectation; preserved red log, full rerun +green. SwarmLab build/typecheck and verify:evidence **49claims105traces980assertions**. +Fresh same-harness `mro-mv96dcb4` on clean final candidate **21/21**, actual source/dist +manifest audited. Frozen red+green46-event receipts verified; no thresholds moved. +Baseline frozen/remerge compatibility controls fail on real old Aegis7/9, whereas +the detached diagnostic is21/21, distinguishing general ownership gap from fixture +failure. Holdout remains unused. No source .acr changes; Territory not refreshed. + +### Linked PRs and observed GitHub CI +Aegis [PR70](https://github.com/heybeaux/aegis/pull/70), candidate +`edb9f557fc776b5710360a453f0df0146f3b977b`: release-check +[38694629492](https://github.com/heybeaux/aegis/actions/runs/38694629492) **SUCCESS**. +SwarmLab [PR53](https://github.com/heybeaux/swarmlab/pull/53), evidence +`b973bd8db231b4168191a773f9f0e06f463192a2`: portable replay + pinned real-package +[38694637393](https://github.com/heybeaux/swarmlab/actions/runs/38694637393) **SUCCESS**. +Both inspected CLEAN/MERGEABLE; CodeRabbit success is review-skipped, **not review +approval**. No protections bypassed. Final documentation commit will get its own CI; +merge/main SHA/status recorded in the nightly ledger, not inferred here. diff --git a/SYNTHESIS.md b/SYNTHESIS.md index 78811cc..666df5f 100644 --- a/SYNTHESIS.md +++ b/SYNTHESIS.md @@ -1505,3 +1505,40 @@ function overrides and post-return changes unproven. Earlier exp57/RT47 is unlan not tonight's novelty; this independent origin/main patch changes no elapsed-clock contract. Two initial diagnostic traces had oracle-only I/O counter mismatch (real output unchanged); corrected before admitting repeated baseline, preserved but not claimed. Thresholds never moved. + +## RT54 — Merged rule reference ownership (exp64 / Spec70, 2026-10-14) + +New pre-registered question: can caller-owned rule recipes edit already-constructed +cascade policy between synchronous merge and compilation? Pre-registration `4e5c4c8`; +21 frozen scenarios, no tuning or LLM judge. Distinct from in-flight RT48, receipt +metadata RT49, defaults RT51, compiled-cache RT52 and overlay consent RT53. + +Real Aegis `4be84ed` baseline `mro-mv96376j` / `mro-mv9637ag` identical rows: +producer drift **8/9**, unsafe allow **8/9**, exact resolution **8/21**; +consumer isolation **0**, compatibility controls **7/9**, caller ownership **1**. +Independent detached-boundary diagnostic **21/21** on both baselines; it is a +control, not replacement Aegis. These red traces remain committed. + +Runtime patch `f27427879984856bad36731788376dbc74702aaa` clones each effective Rule independently at +merge return. Separate cloning is important: cloning the whole array preserves +shared nested identities across distinct rule ids. Same unchanged harness/seeds, +`mro-mv966i1f`: producer drift **0/9**, unsafe allow **0/9**, resolution **21/21**, +all secondary metrics **1**,46-event full replay; manifests pin real package. +Focused frozen tests **16 red/4 pass ->20 green**. Thresholds unchanged. + +Host owns provenance, deliberate policy edits and reloading; result remains +editable. Direct loadPack binding, live immutability/atomic execution, getters or +proxies are not claimed. Stored scores are historical regression evidence, +not runtime verification. Full regression and remote CI/PR status will be recorded +below when actually observed. Prior exp60–63 candidates remain separate/unmerged. + +### Linked PRs and observed GitHub CI +Aegis [PR70](https://github.com/heybeaux/aegis/pull/70), candidate +`edb9f557fc776b5710360a453f0df0146f3b977b`: release-check +[38694629492](https://github.com/heybeaux/aegis/actions/runs/38694629492) **SUCCESS**. +SwarmLab [PR53](https://github.com/heybeaux/swarmlab/pull/53), evidence +`b973bd8db231b4168191a773f9f0e06f463192a2`: portable replay + pinned real-package +[38694637393](https://github.com/heybeaux/swarmlab/actions/runs/38694637393) **SUCCESS**. +Both inspected CLEAN/MERGEABLE; CodeRabbit success is review-skipped, **not review +approval**. No protections bypassed. Final documentation commit will get its own CI; +merge/main SHA/status recorded in the nightly ledger, not inferred here. diff --git a/docs/EVIDENCE-LEDGER.md b/docs/EVIDENCE-LEDGER.md index 5f10464..bbedcec 100644 --- a/docs/EVIDENCE-LEDGER.md +++ b/docs/EVIDENCE-LEDGER.md @@ -197,3 +197,52 @@ harnesses each replayed against the combined built Aegis package: 65/65 and 68/6 respectively, with unsafe allow rate 0 and resolution accuracy 1 in both. Aegis release:check passed with 49/49 evidence mappings and combined clock/config unit tests. These integration checks do not expand the original experiment scope or certify post-return atomicity. + +## RT54 — Merged rule reference ownership (exp64 / Spec70, 2026-10-14) + +New pre-registered question: can caller-owned rule recipes edit already-constructed +cascade policy between synchronous merge and compilation? Pre-registration `4e5c4c8`; +21 frozen scenarios, no tuning or LLM judge. Distinct from in-flight RT48, receipt +metadata RT49, defaults RT51, compiled-cache RT52 and overlay consent RT53. + +Real Aegis `4be84ed` baseline `mro-mv96376j` / `mro-mv9637ag` identical rows: +producer drift **8/9**, unsafe allow **8/9**, exact resolution **8/21**; +consumer isolation **0**, compatibility controls **7/9**, caller ownership **1**. +Independent detached-boundary diagnostic **21/21** on both baselines; it is a +control, not replacement Aegis. These red traces remain committed. + +Runtime patch `f27427879984856bad36731788376dbc74702aaa` clones each effective Rule independently at +merge return. Separate cloning is important: cloning the whole array preserves +shared nested identities across distinct rule ids. Same unchanged harness/seeds, +`mro-mv966i1f`: producer drift **0/9**, unsafe allow **0/9**, resolution **21/21**, +all secondary metrics **1**,46-event full replay; manifests pin real package. +Focused frozen tests **16 red/4 pass ->20 green**. Thresholds unchanged. + +Host owns provenance, deliberate policy edits and reloading; result remains +editable. Direct loadPack binding, live immutability/atomic execution, getters or +proxies are not claimed. Stored scores are historical regression evidence, +not runtime verification. Full regression and remote CI/PR status will be recorded +below when actually observed. Prior exp60–63 candidates remain separate/unmerged. + +### Regression verification (not new evidence) +Full Aegis release:check at `edb9f55`: build/typecheck **1145/1145 tests** +(628core,152Aegis,22collect,86label,203hook,54bench), static measured evidence **50/50**. +Initial evidence catalogue update exposed one stale expected report banner, not a +runtime regression: corrected RT49->RT54 expectation; preserved red log, full rerun +green. SwarmLab build/typecheck and verify:evidence **49claims105traces980assertions**. +Fresh same-harness `mro-mv96dcb4` on clean final candidate **21/21**, actual source/dist +manifest audited. Frozen red+green46-event receipts verified; no thresholds moved. +Baseline frozen/remerge compatibility controls fail on real old Aegis7/9, whereas +the detached diagnostic is21/21, distinguishing general ownership gap from fixture +failure. Holdout remains unused. No source .acr changes; Territory not refreshed. + +### Linked PRs and observed GitHub CI +Aegis [PR70](https://github.com/heybeaux/aegis/pull/70), candidate +`edb9f557fc776b5710360a453f0df0146f3b977b`: release-check +[38694629492](https://github.com/heybeaux/aegis/actions/runs/38694629492) **SUCCESS**. +SwarmLab [PR53](https://github.com/heybeaux/swarmlab/pull/53), evidence +`b973bd8db231b4168191a773f9f0e06f463192a2`: portable replay + pinned real-package +[38694637393](https://github.com/heybeaux/swarmlab/actions/runs/38694637393) **SUCCESS**. +Both inspected CLEAN/MERGEABLE; CodeRabbit success is review-skipped, **not review +approval**. No protections bypassed. Final documentation commit will get its own CI; +merge/main SHA/status recorded in the nightly ledger, not inferred here. diff --git a/experiments/64-merged-rule-ownership/README.md b/experiments/64-merged-rule-ownership/README.md new file mode 100644 index 0000000..337f1f0 --- /dev/null +++ b/experiments/64-merged-rule-ownership/README.md @@ -0,0 +1,52 @@ +# Exp64 — Merged rule reference ownership + +Pre-registration [Spec70](../../specs/70-merged-rule-ownership.md). Frozen21 scenarios and thresholds; real public Aegis mergeLayers/loadPack/evaluate. Baseline and results not yet observed. + +## RT54 — Merged rule reference ownership (exp64 / Spec70, 2026-10-14) + +New pre-registered question: can caller-owned rule recipes edit already-constructed +cascade policy between synchronous merge and compilation? Pre-registration `4e5c4c8`; +21 frozen scenarios, no tuning or LLM judge. Distinct from in-flight RT48, receipt +metadata RT49, defaults RT51, compiled-cache RT52 and overlay consent RT53. + +Real Aegis `4be84ed` baseline `mro-mv96376j` / `mro-mv9637ag` identical rows: +producer drift **8/9**, unsafe allow **8/9**, exact resolution **8/21**; +consumer isolation **0**, compatibility controls **7/9**, caller ownership **1**. +Independent detached-boundary diagnostic **21/21** on both baselines; it is a +control, not replacement Aegis. These red traces remain committed. + +Runtime patch `f27427879984856bad36731788376dbc74702aaa` clones each effective Rule independently at +merge return. Separate cloning is important: cloning the whole array preserves +shared nested identities across distinct rule ids. Same unchanged harness/seeds, +`mro-mv966i1f`: producer drift **0/9**, unsafe allow **0/9**, resolution **21/21**, +all secondary metrics **1**,46-event full replay; manifests pin real package. +Focused frozen tests **16 red/4 pass ->20 green**. Thresholds unchanged. + +Host owns provenance, deliberate policy edits and reloading; result remains +editable. Direct loadPack binding, live immutability/atomic execution, getters or +proxies are not claimed. Stored scores are historical regression evidence, +not runtime verification. Full regression and remote CI/PR status will be recorded +below when actually observed. Prior exp60–63 candidates remain separate/unmerged. + +### Regression verification (not new evidence) +Full Aegis release:check at `edb9f55`: build/typecheck **1145/1145 tests** +(628core,152Aegis,22collect,86label,203hook,54bench), static measured evidence **50/50**. +Initial evidence catalogue update exposed one stale expected report banner, not a +runtime regression: corrected RT49->RT54 expectation; preserved red log, full rerun +green. SwarmLab build/typecheck and verify:evidence **49claims105traces980assertions**. +Fresh same-harness `mro-mv96dcb4` on clean final candidate **21/21**, actual source/dist +manifest audited. Frozen red+green46-event receipts verified; no thresholds moved. +Baseline frozen/remerge compatibility controls fail on real old Aegis7/9, whereas +the detached diagnostic is21/21, distinguishing general ownership gap from fixture +failure. Holdout remains unused. No source .acr changes; Territory not refreshed. + +### Linked PRs and observed GitHub CI +Aegis [PR70](https://github.com/heybeaux/aegis/pull/70), candidate +`edb9f557fc776b5710360a453f0df0146f3b977b`: release-check +[38694629492](https://github.com/heybeaux/aegis/actions/runs/38694629492) **SUCCESS**. +SwarmLab [PR53](https://github.com/heybeaux/swarmlab/pull/53), evidence +`b973bd8db231b4168191a773f9f0e06f463192a2`: portable replay + pinned real-package +[38694637393](https://github.com/heybeaux/swarmlab/actions/runs/38694637393) **SUCCESS**. +Both inspected CLEAN/MERGEABLE; CodeRabbit success is review-skipped, **not review +approval**. No protections bypassed. Final documentation commit will get its own CI; +merge/main SHA/status recorded in the nightly ledger, not inferred here. diff --git a/experiments/64-merged-rule-ownership/ci/package-lock.json b/experiments/64-merged-rule-ownership/ci/package-lock.json new file mode 100644 index 0000000..bbd03e3 --- /dev/null +++ b/experiments/64-merged-rule-ownership/ci/package-lock.json @@ -0,0 +1,45 @@ +{ + "name": "exp64-portable-ci-tools", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "exp64-portable-ci-tools", + "devDependencies": { + "@types/node": "22.19.15", + "typescript": "5.9.3" + } + }, + "node_modules/@types/node": { + "version": "22.19.15", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.15.tgz", + "integrity": "sha512-F0R/h2+dsy5wJAUe3tAU6oqa2qbWY5TpNfL/RGmo1y38hiyO1w3x2jPtt76wmuaJI4DQnOBu21cNXQ2STIUUWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/experiments/64-merged-rule-ownership/ci/package.json b/experiments/64-merged-rule-ownership/ci/package.json new file mode 100644 index 0000000..bf6d904 --- /dev/null +++ b/experiments/64-merged-rule-ownership/ci/package.json @@ -0,0 +1,8 @@ +{ + "name": "exp64-portable-ci-tools", + "private": true, + "devDependencies": { + "typescript": "5.9.3", + "@types/node": "22.19.15" + } +} diff --git a/experiments/64-merged-rule-ownership/package.json b/experiments/64-merged-rule-ownership/package.json new file mode 100644 index 0000000..c7762f1 --- /dev/null +++ b/experiments/64-merged-rule-ownership/package.json @@ -0,0 +1,12 @@ +{ + "name": "@swarmlab/experiment-64-merged-rule-ownership", + "version": "0.1.0", + "private": true, + "type": "module", + "dependencies": { + "@swarmlab/core": "0.1.0" + }, + "scripts": { + "start": "node dist/main.js" + } +} diff --git a/experiments/64-merged-rule-ownership/receipts.json b/experiments/64-merged-rule-ownership/receipts.json new file mode 100644 index 0000000..e437e93 --- /dev/null +++ b/experiments/64-merged-rule-ownership/receipts.json @@ -0,0 +1,55 @@ +{ + "harnessSha256": "sha256:369255115903a4f030bbab92a386bd234f396b9c2a48ed95a63b25c6edf4b95c", + "candidateSha": "edb9f557fc776b5710360a453f0df0146f3b977b", + "patchSourceSha256": "sha256:15792d138874a8b4fac914412dd0a72134480eb770bf32404da29a28e6e1e99e", + "runs": [ + { + "runId": "mro-mv96376j", + "role": "baseline", + "trace": "experiments/64-merged-rule-ownership/runs/mro-mv96376j.jsonl", + "traceSha256": "sha256:2646379fb14ff7729820e289dbdb0dc9a1444dd435884ad23b50246d1fa95695", + "aegisSha": "4be84ed4aab018bee1b9a77b6012b9b97c966d1c", + "metrics": { + "detachedControlAccuracy": 1, + "aegisProducerDriftRate": 0.8888888888888888, + "aegisUnsafeAllowRate": 0.8888888888888888, + "aegisResolutionAccuracy": 0.38095238095238093, + "aegisConsumerIsolation": 0, + "aegisControlAccuracy": 0.7777777777777778, + "aegisCallerOwnership": 1 + } + }, + { + "runId": "mro-mv9637ag", + "role": "baseline", + "trace": "experiments/64-merged-rule-ownership/runs/mro-mv9637ag.jsonl", + "traceSha256": "sha256:d0c73e72b61b61db5a5d5b939135d60ca19c53630847fa7f2251dc1076e73194", + "aegisSha": "4be84ed4aab018bee1b9a77b6012b9b97c966d1c", + "metrics": { + "detachedControlAccuracy": 1, + "aegisProducerDriftRate": 0.8888888888888888, + "aegisUnsafeAllowRate": 0.8888888888888888, + "aegisResolutionAccuracy": 0.38095238095238093, + "aegisConsumerIsolation": 0, + "aegisControlAccuracy": 0.7777777777777778, + "aegisCallerOwnership": 1 + } + }, + { + "runId": "mro-mv966i1f", + "role": "candidate", + "trace": "experiments/64-merged-rule-ownership/runs/mro-mv966i1f.jsonl", + "traceSha256": "sha256:ad0cc81f05a2dced5c087cda949be0f45f1bc771dd592059923e8415a03e3d13", + "aegisSha": "f27427879984856bad36731788376dbc74702aaa", + "metrics": { + "detachedControlAccuracy": 1, + "aegisProducerDriftRate": 0, + "aegisUnsafeAllowRate": 0, + "aegisResolutionAccuracy": 1, + "aegisConsumerIsolation": 1, + "aegisControlAccuracy": 1, + "aegisCallerOwnership": 1 + } + } + ] +} diff --git a/experiments/64-merged-rule-ownership/runs/mro-mv96376j.jsonl b/experiments/64-merged-rule-ownership/runs/mro-mv96376j.jsonl new file mode 100644 index 0000000..7e4d74b --- /dev/null +++ b/experiments/64-merged-rule-ownership/runs/mro-mv96376j.jsonl @@ -0,0 +1,46 @@ +{"t":"message","ts":1792046285144,"from":"moderator","to":"*","topic":"meta","body":{"evidenceVersion":1,"experiment":"64-merged-rule-ownership","spec":"70-merged-rule-ownership","seed":"merged-rule-ownership-v1","holdout":"reserved-unused-no-tuning","scenarios":["new-top","new-match","new-scope","new-references","overlay-top","overlay-match","overlay-scope","inherited-references","rejected-base","consumer-to-input","sibling-results","shared-nested-rules","empty","insertion-dedup","tighten","reject","consent","frozen","explicit-output","explicit-remerge","warnings"],"scenarioSha256":"sha256:985c32b5d6614d06f888681df7ba5b782302f3cbcbba10f97bcbd452cb7008dc","harnessSha256":"sha256:369255115903a4f030bbab92a386bd234f396b9c2a48ed95a63b25c6edf4b95c","aegis":{"sha":"4be84ed4aab018bee1b9a77b6012b9b97c966d1c","dirty":"","repo":"/Users/beauxwalton/projects/worktrees/aegis-2026-10-14-exp64","distSha256":"sha256:fa6f2ed51faa3ab7a3b8d85364e27ab15308a7db5a67eacddd5d3f70a2884848","manifest":[{"file":"packages/aegis/dist/index.d.ts","sha256":"sha256:1ea02b9e32157fad80820bd48078f0cc3ab6e2f7c3c7a491ed939a314e3b6493"},{"file":"packages/aegis/dist/index.js","sha256":"sha256:fa6f2ed51faa3ab7a3b8d85364e27ab15308a7db5a67eacddd5d3f70a2884848"},{"file":"packages/aegis/dist/index.js.map","sha256":"sha256:c36da740a6bc3080b182fdb0e285e578f00b03d73dbfadbd9b7c304fbd9abde1"},{"file":"packages/aegis/package.json","sha256":"sha256:d86e3de257d5712edb53461ffe68da6c5959c8099a493344fd8a36776d0c395b"},{"file":"packages/aegis/src/eval/evaluate.ts","sha256":"sha256:5eb4bebb46ec0dee67ddaada08b1a49d5bfbb814710489622fbde5c5be26b32d"},{"file":"packages/aegis/src/eval/preprocess.ts","sha256":"sha256:05b1c40d78d87538f5fe4a0892307a23af0447bc26a683c8beedc66e881952f9"},{"file":"packages/aegis/src/eval/safe-command.ts","sha256":"sha256:00236420fc95731348dd00331c4e0a5b7f55266b23604e300c7e44686e55bb9a"},{"file":"packages/aegis/src/eval/source-policy-checkpoint.ts","sha256":"sha256:e5507169549e2b558bd6624f48598d4c0d63cf288ec262b5eb36c6234dec68b3"},{"file":"packages/aegis/src/index.ts","sha256":"sha256:ee13318d75e32322eb9eed687e517df6a0dc9cf9d9394a5c85be486c99c45129"},{"file":"packages/aegis/src/rules/loader.ts","sha256":"sha256:dfdde92016edf5af80ee2b4546b73b81bf13740bac63a01a0eec4c263e6f134c"},{"file":"packages/aegis/src/rules/merge.ts","sha256":"sha256:a7571c21af67f3135c79265876525c5b0b1f137a3bffb78ab372cc443592e674"},{"file":"packages/aegis/src/types.ts","sha256":"sha256:b6b69ec2731ca1a687fc9f8269b3daa0f991ce6aa6f258fafffa8d537c34a522"}],"manifestSha256":"sha256:b50f14f2d5afd6af027873fbcd9f83488ae58b290e95962a0063c63f971f548a","mode":"real-built-public-api"}}} +{"t":"message","ts":1792046285144,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"new-top","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":false,"protected":false},"correct":false,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"changed.id","category":"bash","severity":"low","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"changed.id","category":"bash","severity":"low","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285144,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"new-match","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":false,"protected":false},"correct":false,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285144,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"new-scope","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":false,"protected":false},"correct":false,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285144,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"new-references","hazard":true,"producer":true,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":false,"protected":true},"correct":false,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77","edited"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77","edited"]}]],"warnings":[]}} +{"t":"message","ts":1792046285144,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"overlay-top","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"changed.id","category":"bash","severity":"low","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285145,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"overlay-match","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":false,"protected":false},"correct":false,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285145,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"overlay-scope","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":false,"protected":false},"correct":false,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285145,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"inherited-references","hazard":true,"producer":true,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":false,"protected":true},"correct":false,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77","edited"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77","edited"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true}]],"warnings":[]}} +{"t":"message","ts":1792046285145,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"rejected-base","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":false,"protected":false},"correct":false,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"low","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]}} +{"t":"message","ts":1792046285145,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"consumer-to-input","hazard":true,"producer":false,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"input":false,"outputWritable":true},"correct":false,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"consumer","category":"bash","severity":"low","description":"consumer","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":false,"references":["CWE-77","edited"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]}]],"warnings":[]}} +{"t":"message","ts":1792046285145,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"sibling-results","hazard":true,"producer":false,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"sibling":false,"input":false,"protected":false},"correct":false,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]}]],"warnings":[]}} +{"t":"message","ts":1792046285145,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"shared-nested-rules","hazard":true,"producer":false,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"sibling":false,"input":false,"protected":false},"correct":false,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]}]],"warnings":[]}} +{"t":"message","ts":1792046285145,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"empty","hazard":false,"producer":false,"unsafe":false,"checks":{"empty":true},"correct":true}} +{"t":"message","ts":1792046285145,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"insertion-dedup","hazard":false,"producer":false,"unsafe":false,"checks":{"order":true,"collapse":true,"precedence":true},"correct":true,"after":{"rules":[{"id":"__proto__","category":"bash","severity":"high","description":"later","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]},{"id":"policy.other","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046285145,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"tighten","hazard":false,"producer":false,"unsafe":false,"checks":{"severity":true,"warn":true,"deny":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"critical","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046285145,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"reject","hazard":false,"producer":false,"unsafe":false,"checks":{"retained":true,"warn":true,"deny":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]}}} +{"t":"message","ts":1792046285145,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"consent","hazard":false,"producer":false,"unsafe":false,"checks":{"accepted":true,"warn":true,"allow":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"low","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"],"allowDowngrade":true}],"warnings":[]}}} +{"t":"message","ts":1792046285145,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"frozen","hazard":false,"producer":false,"unsafe":false,"checks":{"input":true,"writable":false,"allow":false},"correct":false,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046285145,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"explicit-output","hazard":false,"producer":false,"unsafe":false,"checks":{"effect":true,"writable":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046285145,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"explicit-remerge","hazard":false,"producer":false,"unsafe":false,"checks":{"old":false,"new":true},"correct":false,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046285145,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"warnings","hazard":false,"producer":false,"unsafe":false,"checks":{"independent":true},"correct":true}} +{"t":"score","ts":1792046285145,"scores":{"real_aegis_producerDriftRate":0.8888888888888888,"real_aegis_unsafeAllowRate":0.8888888888888888,"real_aegis_resolutionAccuracy":0.38095238095238093,"real_aegis_consumerIsolation":0,"real_aegis_controlAccuracy":0.7777777777777778,"real_aegis_callerOwnership":1}} +{"t":"message","ts":1792046285146,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"new-top","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"changed.id","category":"bash","severity":"low","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285146,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"new-match","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285146,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"new-scope","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285146,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"new-references","hazard":true,"producer":true,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77","edited"]}]],"warnings":[]}} +{"t":"message","ts":1792046285146,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"overlay-top","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"changed.id","category":"bash","severity":"low","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285146,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"overlay-match","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285146,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"overlay-scope","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285146,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"inherited-references","hazard":true,"producer":true,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77","edited"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true}]],"warnings":[]}} +{"t":"message","ts":1792046285146,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"rejected-base","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"low","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]}} +{"t":"message","ts":1792046285146,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"consumer-to-input","hazard":true,"producer":false,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"input":true,"outputWritable":true},"correct":true,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"consumer","category":"bash","severity":"low","description":"consumer","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":false,"references":["CWE-77","edited"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285146,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"sibling-results","hazard":true,"producer":false,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"sibling":true,"input":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285146,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"shared-nested-rules","hazard":true,"producer":false,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"sibling":true,"input":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285146,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"empty","hazard":false,"producer":false,"unsafe":false,"checks":{"empty":true},"correct":true}} +{"t":"message","ts":1792046285146,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"insertion-dedup","hazard":false,"producer":false,"unsafe":false,"checks":{"order":true,"collapse":true,"precedence":true},"correct":true,"after":{"rules":[{"id":"__proto__","category":"bash","severity":"high","description":"later","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]},{"id":"policy.other","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046285146,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"tighten","hazard":false,"producer":false,"unsafe":false,"checks":{"severity":true,"warn":true,"deny":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"critical","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046285146,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"reject","hazard":false,"producer":false,"unsafe":false,"checks":{"retained":true,"warn":true,"deny":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]}}} +{"t":"message","ts":1792046285146,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"consent","hazard":false,"producer":false,"unsafe":false,"checks":{"accepted":true,"warn":true,"allow":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"low","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"],"allowDowngrade":true}],"warnings":[]}}} +{"t":"message","ts":1792046285146,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"frozen","hazard":false,"producer":false,"unsafe":false,"checks":{"input":true,"writable":true,"allow":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash","Other"],"enabled":true,"references":["CWE-77","edited"]}],"warnings":[]}}} +{"t":"message","ts":1792046285146,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"explicit-output","hazard":false,"producer":false,"unsafe":false,"checks":{"effect":true,"writable":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046285146,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"explicit-remerge","hazard":false,"producer":false,"unsafe":false,"checks":{"old":true,"new":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046285146,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"warnings","hazard":false,"producer":false,"unsafe":false,"checks":{"independent":true},"correct":true}} +{"t":"score","ts":1792046285146,"scores":{"detached_boundary_control_producerDriftRate":0,"detached_boundary_control_unsafeAllowRate":0,"detached_boundary_control_resolutionAccuracy":1,"detached_boundary_control_consumerIsolation":1,"detached_boundary_control_controlAccuracy":1,"detached_boundary_control_callerOwnership":1}} +{"t":"score","ts":1792046285147,"scores":{"detachedControlAccuracy":1,"aegisProducerDriftRate":0.8888888888888888,"aegisUnsafeAllowRate":0.8888888888888888,"aegisResolutionAccuracy":0.38095238095238093,"aegisConsumerIsolation":0,"aegisControlAccuracy":0.7777777777777778,"aegisCallerOwnership":1}} diff --git a/experiments/64-merged-rule-ownership/runs/mro-mv9637ag.jsonl b/experiments/64-merged-rule-ownership/runs/mro-mv9637ag.jsonl new file mode 100644 index 0000000..40e8d48 --- /dev/null +++ b/experiments/64-merged-rule-ownership/runs/mro-mv9637ag.jsonl @@ -0,0 +1,46 @@ +{"t":"message","ts":1792046285246,"from":"moderator","to":"*","topic":"meta","body":{"evidenceVersion":1,"experiment":"64-merged-rule-ownership","spec":"70-merged-rule-ownership","seed":"merged-rule-ownership-v1","holdout":"reserved-unused-no-tuning","scenarios":["new-top","new-match","new-scope","new-references","overlay-top","overlay-match","overlay-scope","inherited-references","rejected-base","consumer-to-input","sibling-results","shared-nested-rules","empty","insertion-dedup","tighten","reject","consent","frozen","explicit-output","explicit-remerge","warnings"],"scenarioSha256":"sha256:985c32b5d6614d06f888681df7ba5b782302f3cbcbba10f97bcbd452cb7008dc","harnessSha256":"sha256:369255115903a4f030bbab92a386bd234f396b9c2a48ed95a63b25c6edf4b95c","aegis":{"sha":"4be84ed4aab018bee1b9a77b6012b9b97c966d1c","dirty":"","repo":"/Users/beauxwalton/projects/worktrees/aegis-2026-10-14-exp64","distSha256":"sha256:fa6f2ed51faa3ab7a3b8d85364e27ab15308a7db5a67eacddd5d3f70a2884848","manifest":[{"file":"packages/aegis/dist/index.d.ts","sha256":"sha256:1ea02b9e32157fad80820bd48078f0cc3ab6e2f7c3c7a491ed939a314e3b6493"},{"file":"packages/aegis/dist/index.js","sha256":"sha256:fa6f2ed51faa3ab7a3b8d85364e27ab15308a7db5a67eacddd5d3f70a2884848"},{"file":"packages/aegis/dist/index.js.map","sha256":"sha256:c36da740a6bc3080b182fdb0e285e578f00b03d73dbfadbd9b7c304fbd9abde1"},{"file":"packages/aegis/package.json","sha256":"sha256:d86e3de257d5712edb53461ffe68da6c5959c8099a493344fd8a36776d0c395b"},{"file":"packages/aegis/src/eval/evaluate.ts","sha256":"sha256:5eb4bebb46ec0dee67ddaada08b1a49d5bfbb814710489622fbde5c5be26b32d"},{"file":"packages/aegis/src/eval/preprocess.ts","sha256":"sha256:05b1c40d78d87538f5fe4a0892307a23af0447bc26a683c8beedc66e881952f9"},{"file":"packages/aegis/src/eval/safe-command.ts","sha256":"sha256:00236420fc95731348dd00331c4e0a5b7f55266b23604e300c7e44686e55bb9a"},{"file":"packages/aegis/src/eval/source-policy-checkpoint.ts","sha256":"sha256:e5507169549e2b558bd6624f48598d4c0d63cf288ec262b5eb36c6234dec68b3"},{"file":"packages/aegis/src/index.ts","sha256":"sha256:ee13318d75e32322eb9eed687e517df6a0dc9cf9d9394a5c85be486c99c45129"},{"file":"packages/aegis/src/rules/loader.ts","sha256":"sha256:dfdde92016edf5af80ee2b4546b73b81bf13740bac63a01a0eec4c263e6f134c"},{"file":"packages/aegis/src/rules/merge.ts","sha256":"sha256:a7571c21af67f3135c79265876525c5b0b1f137a3bffb78ab372cc443592e674"},{"file":"packages/aegis/src/types.ts","sha256":"sha256:b6b69ec2731ca1a687fc9f8269b3daa0f991ce6aa6f258fafffa8d537c34a522"}],"manifestSha256":"sha256:b50f14f2d5afd6af027873fbcd9f83488ae58b290e95962a0063c63f971f548a","mode":"real-built-public-api"}}} +{"t":"message","ts":1792046285246,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"new-top","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":false,"protected":false},"correct":false,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"changed.id","category":"bash","severity":"low","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"changed.id","category":"bash","severity":"low","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285246,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"new-match","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":false,"protected":false},"correct":false,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285246,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"new-scope","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":false,"protected":false},"correct":false,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285246,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"new-references","hazard":true,"producer":true,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":false,"protected":true},"correct":false,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77","edited"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77","edited"]}]],"warnings":[]}} +{"t":"message","ts":1792046285246,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"overlay-top","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"changed.id","category":"bash","severity":"low","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285246,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"overlay-match","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":false,"protected":false},"correct":false,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285246,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"overlay-scope","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":false,"protected":false},"correct":false,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285246,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"inherited-references","hazard":true,"producer":true,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":false,"protected":true},"correct":false,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77","edited"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77","edited"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true}]],"warnings":[]}} +{"t":"message","ts":1792046285246,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"rejected-base","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":false,"protected":false},"correct":false,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"low","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]}} +{"t":"message","ts":1792046285246,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"consumer-to-input","hazard":true,"producer":false,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"input":false,"outputWritable":true},"correct":false,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"consumer","category":"bash","severity":"low","description":"consumer","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":false,"references":["CWE-77","edited"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]}]],"warnings":[]}} +{"t":"message","ts":1792046285247,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"sibling-results","hazard":true,"producer":false,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"sibling":false,"input":false,"protected":false},"correct":false,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]}]],"warnings":[]}} +{"t":"message","ts":1792046285247,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"shared-nested-rules","hazard":true,"producer":false,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"sibling":false,"input":false,"protected":false},"correct":false,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]}]],"warnings":[]}} +{"t":"message","ts":1792046285247,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"empty","hazard":false,"producer":false,"unsafe":false,"checks":{"empty":true},"correct":true}} +{"t":"message","ts":1792046285247,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"insertion-dedup","hazard":false,"producer":false,"unsafe":false,"checks":{"order":true,"collapse":true,"precedence":true},"correct":true,"after":{"rules":[{"id":"__proto__","category":"bash","severity":"high","description":"later","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]},{"id":"policy.other","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046285247,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"tighten","hazard":false,"producer":false,"unsafe":false,"checks":{"severity":true,"warn":true,"deny":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"critical","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046285247,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"reject","hazard":false,"producer":false,"unsafe":false,"checks":{"retained":true,"warn":true,"deny":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]}}} +{"t":"message","ts":1792046285247,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"consent","hazard":false,"producer":false,"unsafe":false,"checks":{"accepted":true,"warn":true,"allow":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"low","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"],"allowDowngrade":true}],"warnings":[]}}} +{"t":"message","ts":1792046285247,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"frozen","hazard":false,"producer":false,"unsafe":false,"checks":{"input":true,"writable":false,"allow":false},"correct":false,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046285247,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"explicit-output","hazard":false,"producer":false,"unsafe":false,"checks":{"effect":true,"writable":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046285247,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"explicit-remerge","hazard":false,"producer":false,"unsafe":false,"checks":{"old":false,"new":true},"correct":false,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046285247,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"warnings","hazard":false,"producer":false,"unsafe":false,"checks":{"independent":true},"correct":true}} +{"t":"score","ts":1792046285247,"scores":{"real_aegis_producerDriftRate":0.8888888888888888,"real_aegis_unsafeAllowRate":0.8888888888888888,"real_aegis_resolutionAccuracy":0.38095238095238093,"real_aegis_consumerIsolation":0,"real_aegis_controlAccuracy":0.7777777777777778,"real_aegis_callerOwnership":1}} +{"t":"message","ts":1792046285247,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"new-top","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"changed.id","category":"bash","severity":"low","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285247,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"new-match","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285247,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"new-scope","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285247,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"new-references","hazard":true,"producer":true,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77","edited"]}]],"warnings":[]}} +{"t":"message","ts":1792046285247,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"overlay-top","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"changed.id","category":"bash","severity":"low","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285247,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"overlay-match","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285247,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"overlay-scope","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285247,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"inherited-references","hazard":true,"producer":true,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77","edited"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true}]],"warnings":[]}} +{"t":"message","ts":1792046285247,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"rejected-base","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"low","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]}} +{"t":"message","ts":1792046285247,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"consumer-to-input","hazard":true,"producer":false,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"input":true,"outputWritable":true},"correct":true,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"consumer","category":"bash","severity":"low","description":"consumer","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":false,"references":["CWE-77","edited"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285247,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"sibling-results","hazard":true,"producer":false,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"sibling":true,"input":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285247,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"shared-nested-rules","hazard":true,"producer":false,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"sibling":true,"input":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046285248,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"empty","hazard":false,"producer":false,"unsafe":false,"checks":{"empty":true},"correct":true}} +{"t":"message","ts":1792046285248,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"insertion-dedup","hazard":false,"producer":false,"unsafe":false,"checks":{"order":true,"collapse":true,"precedence":true},"correct":true,"after":{"rules":[{"id":"__proto__","category":"bash","severity":"high","description":"later","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]},{"id":"policy.other","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046285248,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"tighten","hazard":false,"producer":false,"unsafe":false,"checks":{"severity":true,"warn":true,"deny":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"critical","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046285248,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"reject","hazard":false,"producer":false,"unsafe":false,"checks":{"retained":true,"warn":true,"deny":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]}}} +{"t":"message","ts":1792046285248,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"consent","hazard":false,"producer":false,"unsafe":false,"checks":{"accepted":true,"warn":true,"allow":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"low","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"],"allowDowngrade":true}],"warnings":[]}}} +{"t":"message","ts":1792046285248,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"frozen","hazard":false,"producer":false,"unsafe":false,"checks":{"input":true,"writable":true,"allow":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash","Other"],"enabled":true,"references":["CWE-77","edited"]}],"warnings":[]}}} +{"t":"message","ts":1792046285248,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"explicit-output","hazard":false,"producer":false,"unsafe":false,"checks":{"effect":true,"writable":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046285248,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"explicit-remerge","hazard":false,"producer":false,"unsafe":false,"checks":{"old":true,"new":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046285248,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"warnings","hazard":false,"producer":false,"unsafe":false,"checks":{"independent":true},"correct":true}} +{"t":"score","ts":1792046285248,"scores":{"detached_boundary_control_producerDriftRate":0,"detached_boundary_control_unsafeAllowRate":0,"detached_boundary_control_resolutionAccuracy":1,"detached_boundary_control_consumerIsolation":1,"detached_boundary_control_controlAccuracy":1,"detached_boundary_control_callerOwnership":1}} +{"t":"score","ts":1792046285248,"scores":{"detachedControlAccuracy":1,"aegisProducerDriftRate":0.8888888888888888,"aegisUnsafeAllowRate":0.8888888888888888,"aegisResolutionAccuracy":0.38095238095238093,"aegisConsumerIsolation":0,"aegisControlAccuracy":0.7777777777777778,"aegisCallerOwnership":1}} diff --git a/experiments/64-merged-rule-ownership/runs/mro-mv966i1f.jsonl b/experiments/64-merged-rule-ownership/runs/mro-mv966i1f.jsonl new file mode 100644 index 0000000..ffa6a3e --- /dev/null +++ b/experiments/64-merged-rule-ownership/runs/mro-mv966i1f.jsonl @@ -0,0 +1,46 @@ +{"t":"message","ts":1792046439146,"from":"moderator","to":"*","topic":"meta","body":{"evidenceVersion":1,"experiment":"64-merged-rule-ownership","spec":"70-merged-rule-ownership","seed":"merged-rule-ownership-v1","holdout":"reserved-unused-no-tuning","scenarios":["new-top","new-match","new-scope","new-references","overlay-top","overlay-match","overlay-scope","inherited-references","rejected-base","consumer-to-input","sibling-results","shared-nested-rules","empty","insertion-dedup","tighten","reject","consent","frozen","explicit-output","explicit-remerge","warnings"],"scenarioSha256":"sha256:985c32b5d6614d06f888681df7ba5b782302f3cbcbba10f97bcbd452cb7008dc","harnessSha256":"sha256:369255115903a4f030bbab92a386bd234f396b9c2a48ed95a63b25c6edf4b95c","aegis":{"sha":"f27427879984856bad36731788376dbc74702aaa","dirty":"","repo":"/Users/beauxwalton/projects/worktrees/aegis-2026-10-14-exp64","distSha256":"sha256:ab3d854adf5fcc98d773c7b042a1eef98847ff172b2f608b5043422f8ba0b1ec","manifest":[{"file":"packages/aegis/dist/index.d.ts","sha256":"sha256:ffa2fa31173755b7eea573720688f6aa72c508bc0caf580c4141f79cb53a3198"},{"file":"packages/aegis/dist/index.js","sha256":"sha256:ab3d854adf5fcc98d773c7b042a1eef98847ff172b2f608b5043422f8ba0b1ec"},{"file":"packages/aegis/dist/index.js.map","sha256":"sha256:5e1eedd8a90643bcaf82f44c22e4a3bd12bd2631111181cf27b1fc5010af4cef"},{"file":"packages/aegis/package.json","sha256":"sha256:d86e3de257d5712edb53461ffe68da6c5959c8099a493344fd8a36776d0c395b"},{"file":"packages/aegis/src/eval/evaluate.ts","sha256":"sha256:5eb4bebb46ec0dee67ddaada08b1a49d5bfbb814710489622fbde5c5be26b32d"},{"file":"packages/aegis/src/eval/preprocess.ts","sha256":"sha256:05b1c40d78d87538f5fe4a0892307a23af0447bc26a683c8beedc66e881952f9"},{"file":"packages/aegis/src/eval/safe-command.ts","sha256":"sha256:00236420fc95731348dd00331c4e0a5b7f55266b23604e300c7e44686e55bb9a"},{"file":"packages/aegis/src/eval/source-policy-checkpoint.ts","sha256":"sha256:e5507169549e2b558bd6624f48598d4c0d63cf288ec262b5eb36c6234dec68b3"},{"file":"packages/aegis/src/index.ts","sha256":"sha256:ee13318d75e32322eb9eed687e517df6a0dc9cf9d9394a5c85be486c99c45129"},{"file":"packages/aegis/src/rules/loader.ts","sha256":"sha256:dfdde92016edf5af80ee2b4546b73b81bf13740bac63a01a0eec4c263e6f134c"},{"file":"packages/aegis/src/rules/merge.ts","sha256":"sha256:15792d138874a8b4fac914412dd0a72134480eb770bf32404da29a28e6e1e99e"},{"file":"packages/aegis/src/types.ts","sha256":"sha256:b6b69ec2731ca1a687fc9f8269b3daa0f991ce6aa6f258fafffa8d537c34a522"}],"manifestSha256":"sha256:71419aef0033ed2c9b070464be888b33940edb057446d7fa20c36b34d7f49821","mode":"real-built-public-api"}}} +{"t":"message","ts":1792046439146,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"new-top","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"changed.id","category":"bash","severity":"low","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046439146,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"new-match","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046439146,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"new-scope","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046439146,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"new-references","hazard":true,"producer":true,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77","edited"]}]],"warnings":[]}} +{"t":"message","ts":1792046439146,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"overlay-top","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"changed.id","category":"bash","severity":"low","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046439146,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"overlay-match","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046439146,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"overlay-scope","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046439146,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"inherited-references","hazard":true,"producer":true,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77","edited"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true}]],"warnings":[]}} +{"t":"message","ts":1792046439147,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"rejected-base","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"low","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]}} +{"t":"message","ts":1792046439147,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"consumer-to-input","hazard":true,"producer":false,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"input":true,"outputWritable":true},"correct":true,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"consumer","category":"bash","severity":"low","description":"consumer","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":false,"references":["CWE-77","edited"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046439147,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"sibling-results","hazard":true,"producer":false,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"sibling":true,"input":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046439147,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"shared-nested-rules","hazard":true,"producer":false,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"sibling":true,"input":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046439147,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"empty","hazard":false,"producer":false,"unsafe":false,"checks":{"empty":true},"correct":true}} +{"t":"message","ts":1792046439147,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"insertion-dedup","hazard":false,"producer":false,"unsafe":false,"checks":{"order":true,"collapse":true,"precedence":true},"correct":true,"after":{"rules":[{"id":"__proto__","category":"bash","severity":"high","description":"later","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]},{"id":"policy.other","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046439147,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"tighten","hazard":false,"producer":false,"unsafe":false,"checks":{"severity":true,"warn":true,"deny":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"critical","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046439147,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"reject","hazard":false,"producer":false,"unsafe":false,"checks":{"retained":true,"warn":true,"deny":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]}}} +{"t":"message","ts":1792046439147,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"consent","hazard":false,"producer":false,"unsafe":false,"checks":{"accepted":true,"warn":true,"allow":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"low","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"],"allowDowngrade":true}],"warnings":[]}}} +{"t":"message","ts":1792046439147,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"frozen","hazard":false,"producer":false,"unsafe":false,"checks":{"input":true,"writable":true,"allow":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash","Other"],"enabled":true,"references":["CWE-77","edited"]}],"warnings":[]}}} +{"t":"message","ts":1792046439147,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"explicit-output","hazard":false,"producer":false,"unsafe":false,"checks":{"effect":true,"writable":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046439147,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"explicit-remerge","hazard":false,"producer":false,"unsafe":false,"checks":{"old":true,"new":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046439147,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"warnings","hazard":false,"producer":false,"unsafe":false,"checks":{"independent":true},"correct":true}} +{"t":"score","ts":1792046439147,"scores":{"real_aegis_producerDriftRate":0,"real_aegis_unsafeAllowRate":0,"real_aegis_resolutionAccuracy":1,"real_aegis_consumerIsolation":1,"real_aegis_controlAccuracy":1,"real_aegis_callerOwnership":1}} +{"t":"message","ts":1792046439148,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"new-top","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"changed.id","category":"bash","severity":"low","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046439148,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"new-match","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046439148,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"new-scope","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046439148,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"new-references","hazard":true,"producer":true,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77","edited"]}]],"warnings":[]}} +{"t":"message","ts":1792046439148,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"overlay-top","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"changed.id","category":"bash","severity":"low","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046439148,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"overlay-match","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046439148,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"overlay-scope","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046439148,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"inherited-references","hazard":true,"producer":true,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77","edited"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true}]],"warnings":[]}} +{"t":"message","ts":1792046439148,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"rejected-base","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"low","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]}} +{"t":"message","ts":1792046439148,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"consumer-to-input","hazard":true,"producer":false,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"input":true,"outputWritable":true},"correct":true,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"consumer","category":"bash","severity":"low","description":"consumer","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":false,"references":["CWE-77","edited"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046439148,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"sibling-results","hazard":true,"producer":false,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"sibling":true,"input":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046439148,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"shared-nested-rules","hazard":true,"producer":false,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"sibling":true,"input":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046439148,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"empty","hazard":false,"producer":false,"unsafe":false,"checks":{"empty":true},"correct":true}} +{"t":"message","ts":1792046439148,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"insertion-dedup","hazard":false,"producer":false,"unsafe":false,"checks":{"order":true,"collapse":true,"precedence":true},"correct":true,"after":{"rules":[{"id":"__proto__","category":"bash","severity":"high","description":"later","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]},{"id":"policy.other","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046439148,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"tighten","hazard":false,"producer":false,"unsafe":false,"checks":{"severity":true,"warn":true,"deny":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"critical","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046439148,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"reject","hazard":false,"producer":false,"unsafe":false,"checks":{"retained":true,"warn":true,"deny":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]}}} +{"t":"message","ts":1792046439148,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"consent","hazard":false,"producer":false,"unsafe":false,"checks":{"accepted":true,"warn":true,"allow":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"low","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"],"allowDowngrade":true}],"warnings":[]}}} +{"t":"message","ts":1792046439148,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"frozen","hazard":false,"producer":false,"unsafe":false,"checks":{"input":true,"writable":true,"allow":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash","Other"],"enabled":true,"references":["CWE-77","edited"]}],"warnings":[]}}} +{"t":"message","ts":1792046439148,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"explicit-output","hazard":false,"producer":false,"unsafe":false,"checks":{"effect":true,"writable":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046439148,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"explicit-remerge","hazard":false,"producer":false,"unsafe":false,"checks":{"old":true,"new":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046439148,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"warnings","hazard":false,"producer":false,"unsafe":false,"checks":{"independent":true},"correct":true}} +{"t":"score","ts":1792046439148,"scores":{"detached_boundary_control_producerDriftRate":0,"detached_boundary_control_unsafeAllowRate":0,"detached_boundary_control_resolutionAccuracy":1,"detached_boundary_control_consumerIsolation":1,"detached_boundary_control_controlAccuracy":1,"detached_boundary_control_callerOwnership":1}} +{"t":"score","ts":1792046439149,"scores":{"detachedControlAccuracy":1,"aegisProducerDriftRate":0,"aegisUnsafeAllowRate":0,"aegisResolutionAccuracy":1,"aegisConsumerIsolation":1,"aegisControlAccuracy":1,"aegisCallerOwnership":1}} diff --git a/experiments/64-merged-rule-ownership/runs/mro-mv96dcb4.jsonl b/experiments/64-merged-rule-ownership/runs/mro-mv96dcb4.jsonl new file mode 100644 index 0000000..759a2b4 --- /dev/null +++ b/experiments/64-merged-rule-ownership/runs/mro-mv96dcb4.jsonl @@ -0,0 +1,46 @@ +{"t":"message","ts":1792046758317,"from":"moderator","to":"*","topic":"meta","body":{"evidenceVersion":1,"experiment":"64-merged-rule-ownership","spec":"70-merged-rule-ownership","seed":"merged-rule-ownership-v1","holdout":"reserved-unused-no-tuning","scenarios":["new-top","new-match","new-scope","new-references","overlay-top","overlay-match","overlay-scope","inherited-references","rejected-base","consumer-to-input","sibling-results","shared-nested-rules","empty","insertion-dedup","tighten","reject","consent","frozen","explicit-output","explicit-remerge","warnings"],"scenarioSha256":"sha256:985c32b5d6614d06f888681df7ba5b782302f3cbcbba10f97bcbd452cb7008dc","harnessSha256":"sha256:369255115903a4f030bbab92a386bd234f396b9c2a48ed95a63b25c6edf4b95c","aegis":{"sha":"edb9f557fc776b5710360a453f0df0146f3b977b","dirty":"","repo":"/Users/beauxwalton/projects/worktrees/aegis-2026-10-14-exp64","distSha256":"sha256:ab3d854adf5fcc98d773c7b042a1eef98847ff172b2f608b5043422f8ba0b1ec","manifest":[{"file":"packages/aegis/dist/index.d.ts","sha256":"sha256:ffa2fa31173755b7eea573720688f6aa72c508bc0caf580c4141f79cb53a3198"},{"file":"packages/aegis/dist/index.js","sha256":"sha256:ab3d854adf5fcc98d773c7b042a1eef98847ff172b2f608b5043422f8ba0b1ec"},{"file":"packages/aegis/dist/index.js.map","sha256":"sha256:5e1eedd8a90643bcaf82f44c22e4a3bd12bd2631111181cf27b1fc5010af4cef"},{"file":"packages/aegis/package.json","sha256":"sha256:d86e3de257d5712edb53461ffe68da6c5959c8099a493344fd8a36776d0c395b"},{"file":"packages/aegis/src/eval/evaluate.ts","sha256":"sha256:5eb4bebb46ec0dee67ddaada08b1a49d5bfbb814710489622fbde5c5be26b32d"},{"file":"packages/aegis/src/eval/preprocess.ts","sha256":"sha256:05b1c40d78d87538f5fe4a0892307a23af0447bc26a683c8beedc66e881952f9"},{"file":"packages/aegis/src/eval/safe-command.ts","sha256":"sha256:00236420fc95731348dd00331c4e0a5b7f55266b23604e300c7e44686e55bb9a"},{"file":"packages/aegis/src/eval/source-policy-checkpoint.ts","sha256":"sha256:e5507169549e2b558bd6624f48598d4c0d63cf288ec262b5eb36c6234dec68b3"},{"file":"packages/aegis/src/index.ts","sha256":"sha256:ee13318d75e32322eb9eed687e517df6a0dc9cf9d9394a5c85be486c99c45129"},{"file":"packages/aegis/src/rules/loader.ts","sha256":"sha256:dfdde92016edf5af80ee2b4546b73b81bf13740bac63a01a0eec4c263e6f134c"},{"file":"packages/aegis/src/rules/merge.ts","sha256":"sha256:15792d138874a8b4fac914412dd0a72134480eb770bf32404da29a28e6e1e99e"},{"file":"packages/aegis/src/types.ts","sha256":"sha256:b6b69ec2731ca1a687fc9f8269b3daa0f991ce6aa6f258fafffa8d537c34a522"}],"manifestSha256":"sha256:71419aef0033ed2c9b070464be888b33940edb057446d7fa20c36b34d7f49821","mode":"real-built-public-api"}}} +{"t":"message","ts":1792046758317,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"new-top","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"changed.id","category":"bash","severity":"low","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046758317,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"new-match","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046758317,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"new-scope","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046758317,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"new-references","hazard":true,"producer":true,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77","edited"]}]],"warnings":[]}} +{"t":"message","ts":1792046758317,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"overlay-top","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"changed.id","category":"bash","severity":"low","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046758317,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"overlay-match","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046758317,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"overlay-scope","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046758317,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"inherited-references","hazard":true,"producer":true,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77","edited"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true}]],"warnings":[]}} +{"t":"message","ts":1792046758317,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"rejected-base","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"low","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]}} +{"t":"message","ts":1792046758317,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"consumer-to-input","hazard":true,"producer":false,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"input":true,"outputWritable":true},"correct":true,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"consumer","category":"bash","severity":"low","description":"consumer","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":false,"references":["CWE-77","edited"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046758317,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"sibling-results","hazard":true,"producer":false,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"sibling":true,"input":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046758317,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"shared-nested-rules","hazard":true,"producer":false,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"sibling":true,"input":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046758317,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"empty","hazard":false,"producer":false,"unsafe":false,"checks":{"empty":true},"correct":true}} +{"t":"message","ts":1792046758317,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"insertion-dedup","hazard":false,"producer":false,"unsafe":false,"checks":{"order":true,"collapse":true,"precedence":true},"correct":true,"after":{"rules":[{"id":"__proto__","category":"bash","severity":"high","description":"later","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]},{"id":"policy.other","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046758317,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"tighten","hazard":false,"producer":false,"unsafe":false,"checks":{"severity":true,"warn":true,"deny":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"critical","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046758317,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"reject","hazard":false,"producer":false,"unsafe":false,"checks":{"retained":true,"warn":true,"deny":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]}}} +{"t":"message","ts":1792046758317,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"consent","hazard":false,"producer":false,"unsafe":false,"checks":{"accepted":true,"warn":true,"allow":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"low","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"],"allowDowngrade":true}],"warnings":[]}}} +{"t":"message","ts":1792046758317,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"frozen","hazard":false,"producer":false,"unsafe":false,"checks":{"input":true,"writable":true,"allow":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash","Other"],"enabled":true,"references":["CWE-77","edited"]}],"warnings":[]}}} +{"t":"message","ts":1792046758317,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"explicit-output","hazard":false,"producer":false,"unsafe":false,"checks":{"effect":true,"writable":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046758317,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"explicit-remerge","hazard":false,"producer":false,"unsafe":false,"checks":{"old":true,"new":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046758317,"from":"real-aegis","to":"moderator","topic":"scenario","body":{"id":"warnings","hazard":false,"producer":false,"unsafe":false,"checks":{"independent":true},"correct":true}} +{"t":"score","ts":1792046758317,"scores":{"real_aegis_producerDriftRate":0,"real_aegis_unsafeAllowRate":0,"real_aegis_resolutionAccuracy":1,"real_aegis_consumerIsolation":1,"real_aegis_controlAccuracy":1,"real_aegis_callerOwnership":1}} +{"t":"message","ts":1792046758318,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"new-top","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"changed.id","category":"bash","severity":"low","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046758318,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"new-match","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046758318,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"new-scope","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046758318,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"new-references","hazard":true,"producer":true,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77","edited"]}]],"warnings":[]}} +{"t":"message","ts":1792046758318,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"overlay-top","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"changed.id","category":"bash","severity":"low","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046758318,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"overlay-match","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046758318,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"overlay-scope","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046758318,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"inherited-references","hazard":true,"producer":true,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77","edited"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true}]],"warnings":[]}} +{"t":"message","ts":1792046758318,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"rejected-base","hazard":true,"producer":true,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"snapshot":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"low","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]}} +{"t":"message","ts":1792046758318,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"consumer-to-input","hazard":true,"producer":false,"unsafe":false,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"input":true,"outputWritable":true},"correct":true,"action":"allow","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"consumer","category":"bash","severity":"low","description":"consumer","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":false,"references":["CWE-77","edited"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],[{"id":"policy.protected","category":"bash","severity":"high","description":"reviewed description","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046758318,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"sibling-results","hazard":true,"producer":false,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"sibling":true,"input":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046758318,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"shared-nested-rules","hazard":true,"producer":false,"unsafe":true,"checks":{"entryDenied":true,"callerWritable":true,"warningShape":true,"sibling":true,"input":true,"protected":true},"correct":true,"action":"deny","before":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Other"],"enabled":true,"references":["CWE-77","edited"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]},"inputs":[[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]},{"id":"policy.second","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}]],"warnings":[]}} +{"t":"message","ts":1792046758318,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"empty","hazard":false,"producer":false,"unsafe":false,"checks":{"empty":true},"correct":true}} +{"t":"message","ts":1792046758318,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"insertion-dedup","hazard":false,"producer":false,"unsafe":false,"checks":{"order":true,"collapse":true,"precedence":true},"correct":true,"after":{"rules":[{"id":"__proto__","category":"bash","severity":"high","description":"later","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]},{"id":"policy.other","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046758318,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"tighten","hazard":false,"producer":false,"unsafe":false,"checks":{"severity":true,"warn":true,"deny":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"critical","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046758318,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"reject","hazard":false,"producer":false,"unsafe":false,"checks":{"retained":true,"warn":true,"deny":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[{"ruleId":"policy.protected","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}]}}} +{"t":"message","ts":1792046758318,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"consent","hazard":false,"producer":false,"unsafe":false,"checks":{"accepted":true,"warn":true,"allow":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"low","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"],"allowDowngrade":true}],"warnings":[]}}} +{"t":"message","ts":1792046758318,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"frozen","hazard":false,"producer":false,"unsafe":false,"checks":{"input":true,"writable":true,"allow":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash","Other"],"enabled":true,"references":["CWE-77","edited"]}],"warnings":[]}}} +{"t":"message","ts":1792046758318,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"explicit-output","hazard":false,"producer":false,"unsafe":false,"checks":{"effect":true,"writable":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"DANGER","target":"command"},"appliesTo":["Bash"],"enabled":false,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046758318,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"explicit-remerge","hazard":false,"producer":false,"unsafe":false,"checks":{"old":true,"new":true},"correct":true,"after":{"rules":[{"id":"policy.protected","category":"bash","severity":"high","description":"protected action","match":{"kind":"substring","pattern":"NEVER","target":"command"},"appliesTo":["Bash"],"enabled":true,"references":["CWE-77"]}],"warnings":[]}}} +{"t":"message","ts":1792046758318,"from":"detached-boundary-control","to":"moderator","topic":"scenario","body":{"id":"warnings","hazard":false,"producer":false,"unsafe":false,"checks":{"independent":true},"correct":true}} +{"t":"score","ts":1792046758318,"scores":{"detached_boundary_control_producerDriftRate":0,"detached_boundary_control_unsafeAllowRate":0,"detached_boundary_control_resolutionAccuracy":1,"detached_boundary_control_consumerIsolation":1,"detached_boundary_control_controlAccuracy":1,"detached_boundary_control_callerOwnership":1}} +{"t":"score","ts":1792046758318,"scores":{"detachedControlAccuracy":1,"aegisProducerDriftRate":0,"aegisUnsafeAllowRate":0,"aegisResolutionAccuracy":1,"aegisConsumerIsolation":1,"aegisControlAccuracy":1,"aegisCallerOwnership":1}} diff --git a/experiments/64-merged-rule-ownership/src/main.ts b/experiments/64-merged-rule-ownership/src/main.ts new file mode 100644 index 0000000..98cd3b1 --- /dev/null +++ b/experiments/64-merged-rule-ownership/src/main.ts @@ -0,0 +1,73 @@ +import {execFileSync} from 'node:child_process'; +import {createHash} from 'node:crypto'; +import {readFileSync,mkdirSync,readdirSync,statSync} from 'node:fs'; +import {join,relative} from 'node:path'; +import {pathToFileURL} from 'node:url'; +import {isDeepStrictEqual as same} from 'node:util'; +import {MessageBus,TraceWriter,readRunRecord} from '@swarmlab/core'; + +type Rule={id:string;category:'bash';severity:'low'|'high'|'critical';description:string;match:{kind:'substring';pattern:string;target:'command'};appliesTo:string[];enabled?:boolean;allowDowngrade?:boolean;references?:string[]}; +type Result={rules:Rule[];warnings:{ruleId:string;message:string}[]}; +type Runtime={mergeLayers(l:Rule[][]):Result;loadPack(p:unknown):unknown[];evaluate(c:unknown,r:unknown[],o:unknown):{action:string}}; +const REPO=process.env['AEGIS_REPO'];if(!REPO)throw new Error('AEGIS_REPO required'); +const DIST=process.env['AEGIS_DIST']??join(REPO,'packages/aegis/dist/index.js'); +const runtime=await import(pathToFileURL(DIST).href) as Runtime; +const hash=(v:string|Buffer)=>`sha256:${createHash('sha256').update(v).digest('hex')}`; +const copy=(v:T):T=>structuredClone(v); +const exp='64-merged-rule-ownership',seed='merged-rule-ownership-v1'; +const rule=(id='policy.protected'):Rule=>({id,category:'bash',severity:'high',description:'protected action',match:{kind:'substring',pattern:'DANGER',target:'command'},appliesTo:['Bash'],enabled:true,references:['CWE-77']}); +const evaluate=(rules:Rule[])=>runtime.evaluate({tool:'Bash',command:'DANGER'},runtime.loadPack({packId:'ownership',version:'1',rules}),{severityTable:{low:'allow',medium:'ask',high:'deny',critical:'deny'}}).action; +const hazards=['new-top','new-match','new-scope','new-references','overlay-top','overlay-match','overlay-scope','inherited-references','rejected-base','consumer-to-input','sibling-results','shared-nested-rules']; +const controls=['empty','insertion-dedup','tighten','reject','consent','frozen','explicit-output','explicit-remerge','warnings']; +const unsafe=new Set(['new-top','new-match','new-scope','overlay-top','overlay-match','overlay-scope','rejected-base','sibling-results','shared-nested-rules']); +const scenarios=[...hazards,...controls]; +type Row={id:string;hazard:boolean;producer:boolean;unsafe:boolean;checks:Record;correct:boolean;action?:string;before?:unknown;after?:unknown;inputs?:unknown;warnings?:unknown}; +const results:Record={}; +function frozen(v:T):T{if(v&&typeof v==='object'){for(const child of Object.values(v))frozen(child);Object.freeze(v);}return v;} +function mutable(r:Rule){return !Object.isFrozen(r)&&!Object.isFrozen(r.match)&&!Object.isFrozen(r.appliesTo)&&(!r.references||!Object.isFrozen(r.references));} +for(const arm of ['real-aegis','detached-boundary-control']){ + const merge=(l:Rule[][])=>{const x=runtime.mergeLayers(arm==='real-aegis'?l:l.map(a=>a.map(copy)));return arm==='real-aegis'?x:{...x,rules:x.rules.map(copy)};}; + const rows:Row[]=[]; + for(const id of hazards){ + const base=rule();const overlay=rule();overlay.description='reviewed description';if(id==='inherited-references')delete overlay.references;if(id==='rejected-base')overlay.severity='low'; + const layers:Rule[][]=id.startsWith('overlay')||id==='inherited-references'||id==='rejected-base'||id==='consumer-to-input'?[[base],[overlay]]:[[base]]; + if(id==='shared-nested-rules')layers[0]!.push({...base,id:'policy.second'}); + const original=copy(layers);const r=merge(layers),before=copy(r);const second=id==='sibling-results'?merge(layers):undefined; + const siblingBefore=second?copy(second):undefined; + const entry=evaluate(r.rules);const producer=hazards.indexOf(id)<9; + if(id==='new-top'||id==='overlay-top'){const src=id==='new-top'?base:overlay;src.severity='low';src.enabled=false;src.id='changed.id';} + else if(id==='new-match'||id==='overlay-match'||id==='rejected-base'){(id==='overlay-match'?overlay:base).match.pattern='NEVER';} + else if(id==='new-scope'||id==='overlay-scope'){(id==='overlay-scope'?overlay:base).appliesTo.splice(0,1,'Other');} + else if(id==='new-references'||id==='inherited-references')base.references!.push('edited'); + else {const out=r.rules[0]!;out.match.pattern='NEVER';out.appliesTo.splice(0,1,'Other');out.references!.push('edited');if(id==='consumer-to-input'){out.id='consumer';out.severity='low';out.enabled=false;out.description='consumer';}} + const checks:Record={entryDenied:entry==='deny',callerWritable:layers.flat().every(mutable),warningShape:before.warnings.length===(id==='rejected-base'?1:0)}; + let action:string; + if(producer){action=evaluate(r.rules);checks.snapshot=same(r,before);checks.protected=action==='deny';} + else if(id==='consumer-to-input'){action=evaluate(r.rules);checks.input=same(layers,original);checks.outputWritable=mutable(r.rules[0]!);} + else if(id==='sibling-results'){action=evaluate(second!.rules);checks.sibling=same(second,siblingBefore);checks.input=same(layers,original);checks.protected=action==='deny';} + else {action=evaluate([r.rules[1]!]);checks.sibling=same(r.rules[1],before.rules[1]);checks.input=same(layers,original);checks.protected=action==='deny';} + rows.push({id,hazard:true,producer,unsafe:unsafe.has(id),checks,correct:Object.values(checks).every(Boolean),action,before,after:copy(r),inputs:copy(layers),warnings:copy(r.warnings)}); + } + const add=(id:string,checks:Record,r?:Result)=>rows.push({id,hazard:false,producer:false,unsafe:false,checks,correct:Object.values(checks).every(Boolean),...(r?{after:copy(r)}:{})}); + add('empty',{empty:same(merge([]),{rules:[],warnings:[]})&&same(merge([[],[]]),{rules:[],warnings:[]})}); + {const a=rule('__proto__'),b=rule('policy.other'),c=rule('__proto__');c.description='later';const r=merge([[a,b],[c]]);add('insertion-dedup',{order:same(r.rules.map(r=>r.id),['__proto__','policy.other']),collapse:r.rules.length===2,precedence:r.rules[0]!.description==='later'},r);} + {const a=rule(),b=rule();b.severity='critical';const r=merge([[a],[b]]);add('tighten',{severity:r.rules[0]!.severity==='critical',warn:r.warnings.length===0,deny:evaluate(r.rules)==='deny'},r);} + {const a=rule(),b=rule();b.severity='low';b.description='rejected';const r=merge([[a],[b]]);add('reject',{retained:same(r.rules[0],a),warn:r.warnings.length===1,deny:evaluate(r.rules)==='deny'},r);} + {const a=rule(),b=rule();b.severity='low';b.allowDowngrade=true;const r=merge([[a],[b]]);add('consent',{accepted:r.rules[0]!.severity==='low',warn:r.warnings.length===0,allow:evaluate(r.rules)==='allow'},r);} + {const a=frozen(rule()),b=frozen(rule());const r=merge([ [a],[b] ]);let writable=true;try{r.rules[0]!.match.pattern='NEVER';r.rules[0]!.appliesTo.push('Other');r.rules[0]!.references!.push('edited');}catch{writable=false;}add('frozen',{input:same(a,rule())&&same(b,rule()),writable,allow:writable&&evaluate(r.rules)==='allow'},r);} + {const a=rule(),r=merge([[a]]);r.rules[0]!.enabled=false;add('explicit-output',{effect:evaluate(r.rules)==='allow',writable:mutable(r.rules[0]!)},r);} + {const a=rule(),old=merge([[a]]),before=copy(old);a.match.pattern='NEVER';const next=merge([[a]]);add('explicit-remerge',{old:same(old,before)&&evaluate(old.rules)==='deny',new:same(next.rules[0],a)&&evaluate(next.rules)==='allow'},next);} + {const a=rule(),b=rule();b.severity='low';const first=merge([[a],[b]]),second=merge([[a],[b]]);first.warnings[0]!.message='consumer';first.warnings.push({ruleId:'local',message:'extra'});add('warnings',{independent:second.warnings.length===1&&second.warnings[0]!.message!=='consumer'});} + results[arm]=rows; +} +const metrics=(arm:string)=>{const rows=results[arm]!,prod=rows.filter(r=>r.producer),cons=rows.filter(r=>r.hazard&&!r.producer),risk=rows.filter(r=>r.unsafe),ctrl=rows.filter(r=>!r.hazard);return{producerDriftRate:prod.filter(r=>!r.checks['snapshot']).length/prod.length,unsafeAllowRate:risk.filter(r=>r.action==='allow').length/risk.length,resolutionAccuracy:rows.filter(r=>r.correct).length/rows.length,consumerIsolation:Number(cons.every(r=>r.correct)),controlAccuracy:ctrl.filter(r=>r.correct).length/ctrl.length,callerOwnership:Number(rows.filter(r=>r.hazard).every(r=>r.checks['callerWritable']))};}; +const runId=`mro-${Date.now().toString(36)}`,dir=join(import.meta.dirname,'..','runs');mkdirSync(dir,{recursive:true});const path=join(dir,`${runId}.jsonl`);const trace=new TraceWriter(path,{runId,experiment:exp}),bus=new MessageBus({trace}); +const walk=(dir:string):string[]=>readdirSync(dir).sort().flatMap(n=>{const p=join(dir,n);return statSync(p).isDirectory()?walk(p):[p];}); +const files=[...walk(join(REPO,'packages/aegis/src')),...walk(join(REPO,'packages/aegis/dist')),join(REPO,'packages/aegis/package.json')].sort(); +const manifest=files.map(file=>({file:relative(REPO,file),sha256:hash(readFileSync(file))})); +bus.publish({from:'moderator',to:'*',topic:'meta',body:{evidenceVersion:1,experiment:exp,spec:'70-merged-rule-ownership',seed,holdout:'reserved-unused-no-tuning',scenarios,scenarioSha256:hash(JSON.stringify(scenarios)),harnessSha256:hash(readFileSync(join(import.meta.dirname,'..','src/main.ts'))),aegis:{sha:execFileSync('git',['-C',REPO,'rev-parse','HEAD'],{encoding:'utf8'}).trim(),dirty:execFileSync('git',['-C',REPO,'status','--porcelain'],{encoding:'utf8'}),repo:REPO,distSha256:hash(readFileSync(DIST)),manifest,manifestSha256:hash(JSON.stringify(manifest)),mode:'real-built-public-api'}}}); +for(const [arm,rows] of Object.entries(results)){for(const row of rows)bus.publish({from:arm,to:'moderator',topic:'scenario',body:row});trace.append({t:'score',ts:Date.now(),scores:Object.fromEntries(Object.entries(metrics(arm)).map(([k,v])=>[`${arm.replaceAll('-','_')}_${k}`,v]))});} +const summary={detachedControlAccuracy:metrics('detached-boundary-control').resolutionAccuracy,...Object.fromEntries(Object.entries(metrics('real-aegis')).map(([k,v])=>[`aegis${k[0]!.toUpperCase()}${k.slice(1)}`,v]))};trace.append({t:'score',ts:Date.now(),scores:summary}); +const replay=await readRunRecord(path);if(!same(replay.events,trace.toRunRecord().events))throw new Error('full replay mismatch'); +console.log(JSON.stringify({runId,summary,failed:results['real-aegis']!.filter(r=>!r.correct).map(r=>({id:r.id,checks:r.checks})),replayEvents:replay.events.length,trace:path},null,2)); +if(summary.detachedControlAccuracy!==1)throw new Error('detached diagnostic failed; fixture not admissible'); diff --git a/experiments/64-merged-rule-ownership/tsconfig.json b/experiments/64-merged-rule-ownership/tsconfig.json new file mode 100644 index 0000000..15fbe20 --- /dev/null +++ b/experiments/64-merged-rule-ownership/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "dist", + "rootDir": "src", + "composite": true + }, + "include": [ + "src/**/*.ts" + ], + "references": [ + { + "path": "../../core" + } + ] +} diff --git a/experiments/64-merged-rule-ownership/verify-receipts.mjs b/experiments/64-merged-rule-ownership/verify-receipts.mjs new file mode 100644 index 0000000..22e70ab --- /dev/null +++ b/experiments/64-merged-rule-ownership/verify-receipts.mjs @@ -0,0 +1,41 @@ +import {readFileSync,existsSync} from 'node:fs'; +import {join,resolve} from 'node:path'; +import {createHash} from 'node:crypto'; +import {isDeepStrictEqual as same} from 'node:util'; +const dir=resolve(import.meta.dirname),root=resolve(dir,'../..'); +const hash=v=>`sha256:${createHash('sha256').update(v).digest('hex')}`; +const receipts=JSON.parse(readFileSync(join(dir,'receipts.json'),'utf8')); +const fail=message=>{throw new Error(message);}; +const check=(v,m)=>{if(!v)fail(m);}; +const ids=['new-top','new-match','new-scope','new-references','overlay-top','overlay-match','overlay-scope','inherited-references','rejected-base','consumer-to-input','sibling-results','shared-nested-rules','empty','insertion-dedup','tighten','reject','consent','frozen','explicit-output','explicit-remerge','warnings']; +const limits={detachedControlAccuracy:1,aegisProducerDriftRate:0,aegisUnsafeAllowRate:0,aegisResolutionAccuracy:1,aegisConsumerIsolation:1,aegisControlAccuracy:1,aegisCallerOwnership:1}; +check(hash(readFileSync(join(dir,'src/main.ts')))===receipts.harnessSha256,'frozen harness hash'); +let baselineRows; +function inspect(path,expected,live=false){ + const events=readFileSync(path,'utf8').trim().split('\n').map(l=>JSON.parse(l)); + check(events.length===46,'exact46 events');const meta=events[0];check(meta.t==='message'&&meta.topic==='meta','header'); + const m=meta.body;check(m.experiment==='64-merged-rule-ownership'&&m.seed==='merged-rule-ownership-v1','experiment/seed'); + check(same(m.scenarios,ids),'frozen roster');check(m.scenarioSha256===hash(JSON.stringify(ids)),'roster hash'); + check(m.holdout==='reserved-unused-no-tuning','holdout discipline');check(m.harnessSha256===receipts.harnessSha256,'trace harness'); + check(m.aegis.mode==='real-built-public-api'&&m.aegis.dirty==='','real clean package'); + check(m.aegis.manifestSha256===hash(JSON.stringify(m.aegis.manifest)),'manifest digest'); + const manifest=m.aegis.manifest;check(manifest.some(x=>x.file==='packages/aegis/src/rules/merge.ts')&&manifest.some(x=>x.file==='packages/aegis/dist/index.js'),'source and built artifact manifest'); + check(manifest.find(x=>x.file==='packages/aegis/dist/index.js').sha256===m.aegis.distSha256,'entry dist hash'); + if(live){check(m.aegis.sha===receipts.candidateSha,'live pinned runtime SHA');for(const f of manifest){const p=join(m.aegis.repo,f.file);check(existsSync(p)&&hash(readFileSync(p))===f.sha256,`live artifact ${f.file}`);}check(manifest.find(x=>x.file==='packages/aegis/src/rules/merge.ts').sha256===receipts.patchSourceSha256,'live runtime source patch');} + else check(m.aegis.sha===expected.aegisSha,'frozen package SHA'); + const arms=['real-aegis','detached-boundary-control'];const groups={}; + for(const arm of arms){const rows=events.filter(e=>e.t==='message'&&e.topic==='scenario'&&e.from===arm).map(e=>e.body);check(same(rows.map(r=>r.id),ids),`${arm} exact row roster`);groups[arm]=rows; + for(const [i,r] of rows.entries()){check(r.hazard===(i<12)&&r.producer===(i<9),'hazard denominator');check(r.unsafe===([0,1,2,4,5,6,8,10,11].includes(i)),'unsafe denominator');check(Object.values(r.checks).every(v=>typeof v==='boolean'),'boolean checks');check(r.correct===Object.values(r.checks).every(Boolean),'row correctness'); + if(i<12){check(r.checks.entryDenied===true,'baseline guarded deny fixture');check(r.checks.callerWritable===true,'caller mutable');check(r.checks.warningShape===true,'warning compatibility');} + if(i<9){check(r.checks.snapshot===same(r.before,r.after),'independent producer snapshot equality');check(r.checks.protected===(r.action==='deny'),'protected action');} + } + } + const calc=arm=>{const rows=groups[arm],p=rows.filter(r=>r.producer),c=rows.filter(r=>r.hazard&&!r.producer),risk=rows.filter(r=>r.unsafe),ctrl=rows.filter(r=>!r.hazard);return{producerDriftRate:p.filter(r=>!r.checks.snapshot).length/9,unsafeAllowRate:risk.filter(r=>r.action==='allow').length/9,resolutionAccuracy:rows.filter(r=>r.correct).length/21,consumerIsolation:Number(c.every(r=>r.correct)),controlAccuracy:ctrl.filter(r=>r.correct).length/9,callerOwnership:Number(rows.filter(r=>r.hazard).every(r=>r.checks.callerWritable))};}; + const scoreEvents=events.filter(e=>e.t==='score');check(scoreEvents.length===3,'score count');for(const [i,arm] of arms.entries()){const metrics=calc(arm);check(same(scoreEvents[i].scores,Object.fromEntries(Object.entries(metrics).map(([k,v])=>[`${arm.replaceAll('-','_')}_${k}`,v]))),'recomputed arm scores');} + const summary={detachedControlAccuracy:calc(arms[1]).resolutionAccuracy,...Object.fromEntries(Object.entries(calc(arms[0])).map(([k,v])=>[`aegis${k[0].toUpperCase()}${k.slice(1)}`,v]))};check(same(scoreEvents[2].scores,summary),'recomputed last summary');check(same(summary,live?limits:expected.metrics),'frozen expected thresholds/observed baseline');check(calc(arms[1]).resolutionAccuracy===1,'diagnostic all21 ground truth'); + if(!live&&expected.role==='baseline'){if(baselineRows)check(same(groups,baselineRows),'repeated baseline identical rows');baselineRows=groups;} + console.log(`verified ${m.runId??expected?.runId??path}: ${JSON.stringify(summary)}`); +} +for(const r of receipts.runs){const path=join(root,r.trace);check(hash(readFileSync(path))===r.traceSha256,`content-addressed ${r.runId}`);inspect(path,r);} +if(process.argv.includes('--run')){const log=JSON.parse(readFileSync(process.argv[process.argv.indexOf('--run')+1],'utf8'));check(log.failed.length===0,'fresh live rows green');inspect(log.trace,null,true);} +console.log('exp64 frozen receipts/roster/row checks/ground truth snapshots/recomputed metrics verified'); diff --git a/package-lock.json b/package-lock.json index 41ca67e..35cd63e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -574,6 +574,13 @@ "@swarmlab/core": "0.1.0" } }, + "experiments/58-async-evaluator-config-integrity": { + "name": "@swarmlab/experiment-58-async-evaluator-config-integrity", + "version": "0.1.0", + "dependencies": { + "@swarmlab/core": "0.1.0" + } + }, "experiments/59-evaluation-receipt-ownership": { "name": "@swarmlab/experiment-59-evaluation-receipt-ownership", "version": "0.1.0", @@ -581,6 +588,13 @@ "@swarmlab/core": "0.1.0" } }, + "experiments/64-merged-rule-ownership": { + "name": "@swarmlab/experiment-64-merged-rule-ownership", + "version": "0.1.0", + "dependencies": { + "@swarmlab/core": "0.1.0" + } + }, "node_modules/@heybeaux/lattice-aegis": { "resolved": "../../../Dev/aegis/packages/aegis", "link": true @@ -833,10 +847,18 @@ "resolved": "experiments/57-async-source-expiry", "link": true }, + "node_modules/@swarmlab/experiment-58-async-evaluator-config-integrity": { + "resolved": "experiments/58-async-evaluator-config-integrity", + "link": true + }, "node_modules/@swarmlab/experiment-59-evaluation-receipt-ownership": { "resolved": "experiments/59-evaluation-receipt-ownership", "link": true }, + "node_modules/@swarmlab/experiment-64-merged-rule-ownership": { + "resolved": "experiments/64-merged-rule-ownership", + "link": true + }, "node_modules/typescript": { "version": "5.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", @@ -850,17 +872,6 @@ "engines": { "node": ">=14.17" } - }, - "experiments/58-async-evaluator-config-integrity": { - "name": "@swarmlab/experiment-58-async-evaluator-config-integrity", - "version": "0.1.0", - "dependencies": { - "@swarmlab/core": "0.1.0" - } - }, - "node_modules/@swarmlab/experiment-58-async-evaluator-config-integrity": { - "resolved": "experiments/58-async-evaluator-config-integrity", - "link": true } } } diff --git a/specs/70-merged-rule-ownership.md b/specs/70-merged-rule-ownership.md new file mode 100644 index 0000000..d98d2bd --- /dev/null +++ b/specs/70-merged-rule-ownership.md @@ -0,0 +1,42 @@ +# Spec 70 — Merged rule reference ownership (exp64) + +## Pre-registration / novelty +Question: does a returned cascade own its policy values, or can caller-owned input objects and returned rules silently edit each other after mergeLayers returns? This is pre-compilation, between synchronous calls: no predictor callback, await, compiled-cache corruption, or new weakening overlay is involved. Expect aliasing for new ids and nested accepted overlays. Rules are documented JSON data; no source doc promises live linkage to caller objects. This matters because editing an editable policy recipe should require an explicit re-merge/reload, not silently change an already constructed effective cascade. + +All remote specs/experiment READMEs/claims/roadmap, recent ledgers, and pending exp60–63 designs inventoried. Receipt honesty18/context recall19 and remaining original roadmap queue already implemented. Distinct from RT48 in-flight config, RT49 Evaluation metadata, RT51 implicit defaults, RT52 cache binding and RT53 matcher overlay consent. Pending PRs are not included or cherry-picked. Inventory stored in nightly artifacts. + +## Required behavior / owner boundary +Preserve public mergeLayers(Rule[][]):MergeResult, identity by exact rule.id, stable first-id insertion order, duplicate id collapse, later field precedence, whole-overlay rejection/warnings, disable/severity consent rules, no deletion, optional fields, empty layers. Result rules including match/appliesTo/references own their values, separate from inputs, other results and other returned rules that share original nested data. Neither caller inputs nor result values are frozen/mutated by merge. Explicit edits to result remain supported and affect subsequent loadPack/evaluate of THAT result; explicit remerge after editing inputs creates an updated result. Input scope is valid plain-data typed Rules (including frozen inputs), not proxies/getters/functions/cycles/invalid regex, arbitrary extension schema, or a partial-overlay typing migration. loadPack may still bind compiled Rule to supplied result; this experiment does NOT promise immutability or isolation after explicit result edits or direct loader use. Host owns authenticity/intentional policy edits, reloading, execution and provenance; Aegis owns value isolation at synchronous cascade construction. + +## Frozen scenarios / arms / oracle +Seed merged-rule-ownership-v1. Holdout merged-rule-ownership-holdout-v1 reserved UNUSED: no tuning. No clocks, sleeps or LLM; hazardous strings are evaluated, never executed. +Base `policy.protected`: high substring `DANGER`, target command, appliesTo Bash, enabled true, references [CWE-77]. Severity high maps deny. Alternate low severity maps allow. Hardcoded expected independent snapshots and actions are ground truth. +12 hazards: +1 new-top: mutate producer severity/enabled/id after merge; output unchanged and protected deny. +2 new-match: mutate producer pattern after merge; output unchanged and protected deny. +3 new-scope: mutate producer appliesTo after merge; output unchanged and protected deny. +4 new-references: mutate producer references; output unchanged (metadata, not unsafe action denominator). +5 overlay-top: accepted same-severity descriptive overlay then mutate its severity/enabled; output unchanged deny. +6 overlay-match: accepted same matcher overlay then mutate its nested pattern; output unchanged deny. +7 overlay-scope: accepted same-scope overlay then mutate its scope; output unchanged deny. +8 inherited-references: accepted overlay omits optional references then mutate base refs; output unchanged. +9 rejected-base: reject severity downgrade then mutate retained producer base nested pattern; output unchanged deny and warning retained. +10 consumer-to-input: edit every returned Rule field; both original layers unchanged and still mutable. +11 sibling-results: two merge calls with same input; edit first output nested pattern/scope/refs; second unchanged deny, original unchanged. +12 shared-nested-rules: distinct ids share original match/appliesTo/references; edit one returned rule; other and original unchanged, other still denies. +9 controls: +empty layers; stable insertion/dedup with id __proto__; accepted severity tightening; unconsented downgrade whole-overlay rejection; explicit downgrade consent; deeply frozen caller inputs; explicit output edit changes its subsequent evaluation; explicit remerge after source edit updates only new result; independent warning arrays across calls. +Arms real-aegis and detached-boundary-control. Both use actual public mergeLayers -> loadPack -> evaluate. Control clones each input Rule before merge and clones each result Rule independently afterwards. It is declared an isolation diagnostic, not replacement policy/Aegis improvement. Same hardcoded snapshots/action checks, no arm forces success. + +## Metrics / thresholds +Primary aegisProducerDriftRate = producer hazards1–9 incorrect snapshot /9 must eq0; aegisUnsafeAllowRate = hazards1,2,3,5,6,7,9,11,12 returning allow /9 must eq0; aegisResolutionAccuracy = all21 rows pass /21 must eq1. Secondary aegisConsumerIsolation = hazards10–12 all checks pass eq1; aegisControlAccuracy = controls9 pass rate eq1; aegisCallerOwnership = all mutable callers remain writable/unfrozen eq1; detachedControlAccuracy = all21 pass eq1. Every required row check counts, not just action. Repeat baseline twice with identical row bodies/metrics (timestamps/runIDs differ); preserve red. Control failure is fixture/infrastructure, not policy red. If baseline meets ALL thresholds record honest-null, no patch. No thresholds/design changes after observation. + +## Commands (same harness/seeds/scenarios before and after) +From the SwarmLab worktree: +`npm install --ignore-scripts && npm run build && npm run typecheck` +From Aegis worktree: +`pnpm install --frozen-lockfile && pnpm --filter @heybeaux/lattice-aegis build` +Baseline twice (Aegis HEAD must equal origin/main 4be84ed4aab018bee1b9a77b6012b9b97c966d1c): +`AEGIS_REPO=/Users/beauxwalton/projects/worktrees/aegis-2026-10-14-exp64 AEGIS_DIST=/Users/beauxwalton/projects/worktrees/aegis-2026-10-14-exp64/packages/aegis/dist/index.js node experiments/64-merged-rule-ownership/dist/main.js` +Postfix: rebuild real Aegis from committed patch and run EXACT same command once; preregistered controls/thresholds unchanged. Record Git SHA, dirty state, full source/dist SHA256 manifests, harness/scenario hash, trace/run IDs and full replay equality. An experiment exit0 only means evidence written; inspect all thresholds separately. +Regression only AFTER novel work: focused tests, full pnpm release:check, SwarmLab build/typecheck/verify:evidence. New live gate CI should inspect actual rows/manifests and execute same harness against pinned real patched Aegis. A static measured-score catalogue is historical evidence, not executable runtime verification. diff --git a/tsconfig.json b/tsconfig.json index 63269c3..47092d6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -180,6 +180,9 @@ }, { "path": "experiments/59-evaluation-receipt-ownership" + }, + { + "path": "experiments/64-merged-rule-ownership" } ] }