From c8bc120c34dbf77a206716a4893317c13277ea2e Mon Sep 17 00:00:00 2001 From: heybeaux Date: Tue, 13 Oct 2026 23:34:23 -0700 Subject: [PATCH 1/7] spec(exp63): preregister rule-overlay coverage consent before observations --- .../README.md | 5 +++ specs/69-rule-overlay-coverage-consent.md | 34 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 experiments/63-rule-overlay-coverage-consent/README.md create mode 100644 specs/69-rule-overlay-coverage-consent.md diff --git a/experiments/63-rule-overlay-coverage-consent/README.md b/experiments/63-rule-overlay-coverage-consent/README.md new file mode 100644 index 0000000..3e71cbb --- /dev/null +++ b/experiments/63-rule-overlay-coverage-consent/README.md @@ -0,0 +1,5 @@ +# Experiment63 — Rule-overlay coverage consent + +Pre-registration before observations: [Spec69](../../specs/69-rule-overlay-coverage-consent.md). + +New question: does unchanged severity hide classifier coverage loss through cascade overrides? Results pending; no green claim. diff --git a/specs/69-rule-overlay-coverage-consent.md b/specs/69-rule-overlay-coverage-consent.md new file mode 100644 index 0000000..0153c78 --- /dev/null +++ b/specs/69-rule-overlay-coverage-consent.md @@ -0,0 +1,34 @@ +# Spec69 — Rule-overlay coverage consent (exp63 / RT53) + +Pre-registered 2026-10-14T06:34:23.361583+00:00 BEFORE implementation, any experiment observation or Aegis edit. +Fetched Aegis main `4be84ed4aab018bee1b9a77b6012b9b97c966d1c`, SwarmLab `ded948b57f04338965ddb5bdd6deda6c2e3917fa`. + +## Hypothesis / novelty +An overlay can keep severity/enabled unchanged yet silently remove a protected tool-call set by changing pattern, flags, kind, target or appliesTo. Real mergeLayers only checks disabling/severity; its strictness promise does not cover classifier coverage. This tests AUTHORITY to replace a rule at cascade construction, not RT48 in-flight drift, RT52 declared/cache consistency, RT51 defaults, RT50 numeric validity, or exp22 repository merge races. Inventory of all specs/README/claims/synthesis, docs/cards and unmerged exp60–62 inspected; specs24/25 and roadmap experiments already built. No earlier mergeLayers coverage consent experiment. Prior unmerged PRs remain separate. + +## Frozen contract / behavior boundaries +Keep public mergeLayers(Rule[][]):MergeResult and insertion order, loadPack and evaluate interfaces. New IDs add; no delete semantics. Disabled overlays/severity downgrade continue requiring explicit allowDowngrade:true ON THIS OVERLAY (not inherited). Additionally, for an enabled effective base: +- opaque match definition changes (kind/pattern/target/effective flags) require explicit consent, since JS-regex language inclusion is not reliably decidable here; +- semantically identical allowed regex flags in a different order and absent vs empty are equivalent; +- appliesTo may freely retain/expand the exact case-sensitive tool set, or replace it with '*'; losing a tool or replacing '*' with a finite set needs consent; +- unchanged match, descriptive edits, severity escalation and enabling a disabled rule remain allowed; disabled base has no matcher coverage to protect (existing severity/disable checks still apply). +Reject unconsented overlay wholesale with existing warning shape and keep effective preceding base, not necessarily builtin. Consent is not durable authorization inherited by later layers. Inputs are valid typed plain-data Rule objects; no partial-rule typing migration, getters/proxies, post-merge alias protection, invalid regex or sandbox execution claim. Aegis owns conservative consent checks; host owns overlay provenance, deliberate allowDowngrade review, valid rule packs and safe execution. + +## Frozen scenarios / deterministic ground truth +Seed `overlay-coverage-consent-v1`, holdout `overlay-coverage-consent-holdout-v1` reserved UNUSED (no tuning). No LLM or sleeps. Commands are strings, never executed. Real built Aegis public mergeLayers -> loadPack -> evaluate. Hardcoded expected merge result/warning/action for each scenario; pre-layer base is independently evaluated to confirm protected call and fixture, same stimuli in all runs. +10 coverage hazards, fixed order: regex-pattern-narrow, substring-pattern-narrow, regex-remove-i, target-command-to-content, regex-to-substring, appliesTo-drop-Bash, wildcard-to-finite, severity-escalation-plus-narrow, prior-explicit-consent-not-inherited, intermediate-base-retained. Each preceding effective base DENIES its protected command; unconsented replacement must be rejected, warn1 and still DENY. +14 controls, fixed order: unchanged, description-only, severity-tighten, tools-expand, tools-wildcard, tools-reorder-duplicate, regex-flags-reorder, empty-flags-equivalent, explicit-pattern-consent, explicit-scope-consent, new-rule-addition, disabled-base-retune, explicit-severity-consent, silent-severity-downgrade. Expected warning0 except final severity downgrade warning1; explicit retune may ALLOW and is intentional, not a hazard escape. Controls pin exact effective rule ID/description/match/appliesTo/severity and action; disabled/new baseline calls may allow. +Additional conservative control: opaque-regex-broadening-without-proof (pattern expansion that really catches more strings). Reject/warn1 despite safe observed stimulus; no general semantic-inclusion proof promised. Total25 scenarios. +Arms: real-current-cascade, pinned-effective-base control for10 hazards (simulates host declining unreviewed overlays and calls real evaluate, not an Aegis fix). Expected table is a machine-owned oracle, not an LLM judge or fake Aegis runtime. + +## Metrics / thresholds (immutable) +Primary: aegisUnsafeCoverageLossRate=hazards returning allow /10 MUST equal0; aegisCoverageRejectionRate=hazards with exactly1 correct-ID warning and exact retained preceding base /10 MUST equal1; aegisResolutionAccuracy=all25 exact field/action/warning checks /25 MUST equal1. +Secondary: pinnedBaseControlAccuracy=10/10 MUST1; aegisControlAccuracy=15/15 MUST1; aegisInputOwnership=all inputs JSON unchanged MUST1; protectedBaseFixtureAccuracy=10/10 initial base deny MUST1; explicitConsentAccuracy=3/3 intentional allowances plus exact output MUST1. Baseline failure is diagnostic, not failure to run; runner exits nonzero for broken fixture/replay, prints inspectable threshold verdict for real policy. + +## Exact commands (same baseline / post-fix) +From Aegis dated worktree: `pnpm install --frozen-lockfile && pnpm --filter @heybeaux/lattice-aegis build`. +From SwarmLab dated worktree: `npm install && npm run build && AEGIS_REPO=/Users/beauxwalton/projects/worktrees/aegis-2026-10-13-exp63 node experiments/63-rule-overlay-coverage-consent/dist/main.js`. +Repeat exact node invocation twice for baseline reproducibility, once post-patch (same seed/scenarios/harness hash). AEGIS_REPO points to fetched-main worktree at baseline and committed patch at post-fix; trace captures exact HEAD, dirty state, full dist/source manifests, run ID. Pre-registration commit/time recorded in nightly ledger before outputs. Then SwarmLab build/typecheck/verify:evidence; Aegis focused/full release:check. Old evidence is regression ONLY. + +## Landing and uncertainty +Full replay equality, content-addressed receipts and committed traces; preserve red. Small general Aegis policy fix only after reproducible red. No speculative inclusion algorithm or special fixture names. Changing formerly accepted matcher retunes is a deliberate authority tightening; hold for migration/owner review if necessary. No improvement claim without same real-package before/after. PR CI required before merge; no CI workflow in current SwarmLab main is NOT executable green. From e1e84d31825fcfea7d931fcc921616f3c03c0e0d Mon Sep 17 00:00:00 2001 From: heybeaux Date: Tue, 13 Oct 2026 23:36:04 -0700 Subject: [PATCH 2/7] experiment(exp63): build deterministic real-Aegis cascade consent probe --- .../package.json | 12 +++ .../src/main.ts | 81 +++++++++++++++++++ .../tsconfig.json | 16 ++++ package-lock.json | 33 +++++--- tsconfig.json | 3 + 5 files changed, 134 insertions(+), 11 deletions(-) create mode 100644 experiments/63-rule-overlay-coverage-consent/package.json create mode 100644 experiments/63-rule-overlay-coverage-consent/src/main.ts create mode 100644 experiments/63-rule-overlay-coverage-consent/tsconfig.json diff --git a/experiments/63-rule-overlay-coverage-consent/package.json b/experiments/63-rule-overlay-coverage-consent/package.json new file mode 100644 index 0000000..0a6a8da --- /dev/null +++ b/experiments/63-rule-overlay-coverage-consent/package.json @@ -0,0 +1,12 @@ +{ + "name": "@swarmlab/experiment-63-rule-overlay-coverage-consent", + "version": "0.1.0", + "private": true, + "type": "module", + "dependencies": { + "@swarmlab/core": "0.1.0" + }, + "scripts": { + "start": "node dist/main.js" + } +} diff --git a/experiments/63-rule-overlay-coverage-consent/src/main.ts b/experiments/63-rule-overlay-coverage-consent/src/main.ts new file mode 100644 index 0000000..b20df9c --- /dev/null +++ b/experiments/63-rule-overlay-coverage-consent/src/main.ts @@ -0,0 +1,81 @@ +import { execFileSync } from 'node:child_process'; +import { createHash } from 'node:crypto'; +import { mkdirSync, readFileSync, writeFileSync } from 'node:fs'; +import { join } from 'node:path'; +import { pathToFileURL } from 'node:url'; +import { isDeepStrictEqual } from 'node:util'; +import { MessageBus, TraceWriter, readRunRecord } from '@swarmlab/core'; + +type Action = 'allow' | 'ask' | 'deny'; +type Severity = 'critical' | 'high' | 'medium' | 'low'; +type Rule = {id:string;category:'bash';severity:Severity;description:string;match:{kind:'regex'|'substring';pattern:string;flags?:string;target:'command'|'content'};appliesTo:string[];enabled?:boolean;allowDowngrade?:boolean}; +interface Runtime {mergeLayers(layers:Rule[][]):{rules:Rule[];warnings:{ruleId:string;message:string}[]}; loadPack(pack:{packId:string;version:string;rules:Rule[]}):unknown[];evaluate(call:{tool:string;command:string},rules:unknown[]):{action:Action;matches:unknown[]}} +const EXP='63-rule-overlay-coverage-consent'; +const SEED='overlay-coverage-consent-v1'; +const REPO=process.env['AEGIS_REPO']; +if(!REPO) throw new Error('AEGIS_REPO required; this experiment must use real Aegis'); +const DIST=join(REPO,'packages/aegis/dist/index.js'); +const runtime=await import(pathToFileURL(DIST).href) as Runtime; +const clone=(v:T):T=>structuredClone(v); +const hash=(v:string|Buffer)=>`sha256:${createHash('sha256').update(v).digest('hex')}`; +const base=():Rule=>({id:'coverage.block',category:'bash',severity:'critical',description:'protected classifier',match:{kind:'regex',pattern:'BLOCK\\b',flags:'i',target:'command'},appliesTo:['Bash','Shell']}); +const overlay=(b:Rule,fields:Partial):Rule=>({...clone(b),...fields}); +type Scenario={id:string;hazard:boolean;layers:Rule[][];preceding:Rule[];expected:Rule[];warnings:number;action:Action;command:string;tool:string;explicit?:boolean}; +const scenarios:Scenario[]=[]; +function hazard(id:string,b:Rule,o:Rule,command='BLOCK',prior?:Rule){ + const layers=prior?[[base()],[b],[o]]:[[b],[o]]; + scenarios.push({id,hazard:true,layers,preceding:[clone(b)],expected:[clone(b)],warnings:1,action:'deny',command,tool:'Bash'}); +} +{const b=base();hazard('regex-pattern-narrow',b,overlay(b,{match:{...b.match,pattern:'OTHER'}}));} +{const b=overlay(base(),{match:{kind:'substring',pattern:'BLOCK',target:'command'}});hazard('substring-pattern-narrow',b,overlay(b,{match:{...b.match,pattern:'OTHER'}}));} +{const b=base(),o=clone(b);delete o.match.flags;hazard('regex-remove-i',b,o,'block');} +{const b=base();hazard('target-command-to-content',b,overlay(b,{match:{...b.match,target:'content'}}));} +{const b=base();hazard('regex-to-substring',b,overlay(b,{match:{...b.match,kind:'substring'}}));} +{const b=base();hazard('appliesTo-drop-Bash',b,overlay(b,{appliesTo:['Shell']}));} +{const b=overlay(base(),{appliesTo:['*']});hazard('wildcard-to-finite',b,overlay(b,{appliesTo:['Shell']}));} +{const b=overlay(base(),{appliesTo:['Bash']});hazard('severity-escalation-plus-narrow',b,overlay(b,{severity:'critical',match:{...b.match,pattern:'OTHER'}}));} +{const b=overlay(base(),{description:'explicit previous consent',allowDowngrade:true});const o=overlay(b,{match:{...b.match,pattern:'OTHER'}});delete o.allowDowngrade;hazard('prior-explicit-consent-not-inherited',b,o,'BLOCK',base());} +{const b=overlay(base(),{description:'intermediate expanded policy',appliesTo:['Bash','Shell','Execute']});hazard('intermediate-base-retained',b,overlay(b,{appliesTo:['Shell','Execute']}),'BLOCK',base());} +function control(id:string,b:Rule,o:Rule,expected:Rule,action:Action='deny',warnings=0,explicit=false){scenarios.push({id,hazard:false,layers:[[b],[o]],preceding:[clone(b)],expected:[expected],warnings,action,command:'BLOCK',tool:'Bash',explicit});} +{const b=base();control('unchanged',b,clone(b),clone(b));} +{const b=base(),o=overlay(b,{description:'metadata revision'});control('description-only',b,o,clone(o));} +{const b=overlay(base(),{severity:'high'}),o=overlay(b,{severity:'critical'});control('severity-tighten',b,o,clone(o));} +{const b=base(),o=overlay(b,{appliesTo:['Bash','Shell','Execute']});control('tools-expand',b,o,clone(o));} +{const b=base(),o=overlay(b,{appliesTo:['*']});control('tools-wildcard',b,o,clone(o));} +{const b=base(),o=overlay(b,{appliesTo:['Shell','Bash','Shell']});control('tools-reorder-duplicate',b,o,clone(o));} +{const b=base();b.match.flags='im';const o=overlay(b,{match:{...b.match,flags:'mi'}});control('regex-flags-reorder',b,o,clone(o));} +{const b=base();delete b.match.flags;const o=overlay(b,{match:{...b.match,flags:''}});control('empty-flags-equivalent',b,o,clone(o));} +{const b=base(),o=overlay(b,{match:{...b.match,pattern:'OTHER'},allowDowngrade:true});control('explicit-pattern-consent',b,o,clone(o),'allow',0,true);} +{const b=base(),o=overlay(b,{appliesTo:['Shell'],allowDowngrade:true});control('explicit-scope-consent',b,o,clone(o),'allow',0,true);} +{const b=overlay(base(),{id:'coverage.other',match:{...base().match,pattern:'OTHER'}}),o=base();scenarios.push({id:'new-rule-addition',hazard:false,layers:[[b],[o]],preceding:[clone(b)],expected:[clone(b),clone(o)],warnings:0,action:'deny',command:'BLOCK',tool:'Bash'});} +{const b=overlay(base(),{enabled:false}),o=overlay(b,{enabled:true,match:{...b.match,pattern:'OTHER'}});control('disabled-base-retune',b,o,clone(o),'allow');} +{const b=base(),o=overlay(b,{severity:'low',allowDowngrade:true});control('explicit-severity-consent',b,o,clone(o),'allow',0,true);} +{const b=base(),o=overlay(b,{severity:'low'});control('silent-severity-downgrade',b,o,clone(b),'deny',1);} +{const b=base(),o=overlay(b,{match:{...b.match,pattern:'BLOCK\\b|OTHER'}});control('opaque-regex-broadening-without-proof',b,o,clone(b),'deny',1);} +if(scenarios.length!==25||scenarios.filter(s=>s.hazard).length!==10)throw new Error('frozen scenario counts incorrect'); +const dir=join(import.meta.dirname,'..','runs');mkdirSync(dir,{recursive:true}); +const runId=`occ-${Date.now().toString(36)}`;const tracePath=join(dir,`${runId}.jsonl`); +const trace=new TraceWriter(tracePath,{runId,experiment:EXP});const bus=new MessageBus({trace}); +const files=execFileSync('find',[join(REPO,'packages/aegis/src'),join(REPO,'packages/aegis/dist'),'-type','f'],{encoding:'utf8'}).trim().split('\n').sort(); +const packageInfo={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:files.map(file=>({file:file.slice(REPO.length+1),sha256:hash(readFileSync(file))})),mode:'real-built-public-api',config:'package defaults; no override'}; +const harnessSha256=hash(readFileSync(join(import.meta.dirname,'..','src/main.ts'))); +bus.publish({from:'moderator',to:'*',topic:'meta',body:{evidenceVersion:1,experiment:EXP,seed:SEED,holdout:'reserved-unused-no-tuning',runId,scenarios,harnessSha256,aegis:packageInfo}}); +function evaluate(rules:Rule[],s:Scenario){return runtime.evaluate({tool:s.tool,command:s.command},runtime.loadPack({packId:'coverage-consent',version:'1',rules})).action;} +const rows=[]; +for(const s of scenarios){ + const before=JSON.stringify(s.layers); + const priorAction=evaluate(s.preceding,s); + const result=runtime.mergeLayers(s.layers); + const action=evaluate(result.rules,s); + const checks={effectiveRules:isDeepStrictEqual(result.rules,s.expected),warnings:result.warnings.length===s.warnings&&result.warnings.every(w=>w.ruleId===s.layers.at(-1)![0]!.id&&typeof w.message==='string'&&w.message.includes('allowDowngrade')),action:action===s.action,inputOwnership:before===JSON.stringify(s.layers)}; + const row={id:s.id,hazard:s.hazard,explicit:s.explicit===true,priorAction,action,warnings:result.warnings,effectiveRules:result.rules,expected:s.expected,checks,correct:Object.values(checks).every(Boolean)}; + rows.push(row);bus.publish({from:'real-current-cascade',to:'moderator',topic:'scenario',body:row}); + if(s.hazard){const pinnedAction=evaluate(s.expected,s);bus.publish({from:'pinned-effective-base',to:'moderator',topic:'scenario',body:{id:s.id,action:pinnedAction,correct:pinnedAction==='deny'}});if(pinnedAction!=='deny'||priorAction!=='deny')throw new Error(`broken fixture/control ${s.id}`);} +} +const hazards=rows.filter(r=>r.hazard),controls=rows.filter(r=>!r.hazard),explicit=rows.filter(r=>r.explicit); +const metrics={aegisUnsafeCoverageLossRate:hazards.filter(r=>r.action==='allow').length/10,aegisCoverageRejectionRate:hazards.filter(r=>r.checks.effectiveRules&&r.checks.warnings).length/10,aegisResolutionAccuracy:rows.filter(r=>r.correct).length/25,pinnedBaseControlAccuracy:1,aegisControlAccuracy:controls.filter(r=>r.correct).length/15,aegisInputOwnership:Number(rows.every(r=>r.checks.inputOwnership)),protectedBaseFixtureAccuracy:hazards.filter(r=>r.priorAction==='deny').length/10,explicitConsentAccuracy:explicit.filter(r=>r.correct&&r.action==='allow').length/3}; +const green=Object.entries(metrics).every(([k,v])=>v===(k==='aegisUnsafeCoverageLossRate'?0:1)); +trace.append({t:'score',ts:Date.now(),scores:metrics}); +const replay=await readRunRecord(tracePath);if(JSON.stringify(replay.events)!==JSON.stringify(trace.toRunRecord().events))throw new Error('full serialized replay mismatch'); +const receipt={runId,harnessSha256,package:packageInfo,seed:SEED,metrics,green,traceSha256:hash(readFileSync(tracePath)),events:replay.events.length};writeFileSync(join(dir,`${runId}.receipt.json`),JSON.stringify(receipt,null,2)+'\n'); +console.log(JSON.stringify(receipt,null,2));console.log(`policy verdict: ${green?'green':'red'}; trace: ${tracePath}`); diff --git a/experiments/63-rule-overlay-coverage-consent/tsconfig.json b/experiments/63-rule-overlay-coverage-consent/tsconfig.json new file mode 100644 index 0000000..15fbe20 --- /dev/null +++ b/experiments/63-rule-overlay-coverage-consent/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/package-lock.json b/package-lock.json index 41ca67e..08545d6 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/63-rule-overlay-coverage-consent": { + "name": "@swarmlab/experiment-63-rule-overlay-coverage-consent", + "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-63-rule-overlay-coverage-consent": { + "resolved": "experiments/63-rule-overlay-coverage-consent", + "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/tsconfig.json b/tsconfig.json index 63269c3..8a4f77f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -180,6 +180,9 @@ }, { "path": "experiments/59-evaluation-receipt-ownership" + }, + { + "path": "experiments/63-rule-overlay-coverage-consent" } ] } From 060e6b8407aba38ecff152697da68820d4a9feba Mon Sep 17 00:00:00 2001 From: heybeaux Date: Tue, 13 Oct 2026 23:36:37 -0700 Subject: [PATCH 3/7] spec(exp63): pin explicit high deny config before observations --- experiments/63-rule-overlay-coverage-consent/src/main.ts | 8 ++++---- specs/69-rule-overlay-coverage-consent.md | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/experiments/63-rule-overlay-coverage-consent/src/main.ts b/experiments/63-rule-overlay-coverage-consent/src/main.ts index b20df9c..205edc9 100644 --- a/experiments/63-rule-overlay-coverage-consent/src/main.ts +++ b/experiments/63-rule-overlay-coverage-consent/src/main.ts @@ -9,7 +9,7 @@ import { MessageBus, TraceWriter, readRunRecord } from '@swarmlab/core'; type Action = 'allow' | 'ask' | 'deny'; type Severity = 'critical' | 'high' | 'medium' | 'low'; type Rule = {id:string;category:'bash';severity:Severity;description:string;match:{kind:'regex'|'substring';pattern:string;flags?:string;target:'command'|'content'};appliesTo:string[];enabled?:boolean;allowDowngrade?:boolean}; -interface Runtime {mergeLayers(layers:Rule[][]):{rules:Rule[];warnings:{ruleId:string;message:string}[]}; loadPack(pack:{packId:string;version:string;rules:Rule[]}):unknown[];evaluate(call:{tool:string;command:string},rules:unknown[]):{action:Action;matches:unknown[]}} +interface Runtime {mergeLayers(layers:Rule[][]):{rules:Rule[];warnings:{ruleId:string;message:string}[]}; loadPack(pack:{packId:string;version:string;rules:Rule[]}):unknown[];evaluate(call:{tool:string;command:string},rules:unknown[],options?:{severityTable:{critical:Action;high:Action;medium:Action;low:Action}}):{action:Action;matches:unknown[]}} const EXP='63-rule-overlay-coverage-consent'; const SEED='overlay-coverage-consent-v1'; const REPO=process.env['AEGIS_REPO']; @@ -33,7 +33,7 @@ function hazard(id:string,b:Rule,o:Rule,command='BLOCK',prior?:Rule){ {const b=base();hazard('regex-to-substring',b,overlay(b,{match:{...b.match,kind:'substring'}}));} {const b=base();hazard('appliesTo-drop-Bash',b,overlay(b,{appliesTo:['Shell']}));} {const b=overlay(base(),{appliesTo:['*']});hazard('wildcard-to-finite',b,overlay(b,{appliesTo:['Shell']}));} -{const b=overlay(base(),{appliesTo:['Bash']});hazard('severity-escalation-plus-narrow',b,overlay(b,{severity:'critical',match:{...b.match,pattern:'OTHER'}}));} +{const b=overlay(base(),{appliesTo:['Bash'],severity:'high'});hazard('severity-escalation-plus-narrow',b,overlay(b,{severity:'critical',match:{...b.match,pattern:'OTHER'}}));} {const b=overlay(base(),{description:'explicit previous consent',allowDowngrade:true});const o=overlay(b,{match:{...b.match,pattern:'OTHER'}});delete o.allowDowngrade;hazard('prior-explicit-consent-not-inherited',b,o,'BLOCK',base());} {const b=overlay(base(),{description:'intermediate expanded policy',appliesTo:['Bash','Shell','Execute']});hazard('intermediate-base-retained',b,overlay(b,{appliesTo:['Shell','Execute']}),'BLOCK',base());} function control(id:string,b:Rule,o:Rule,expected:Rule,action:Action='deny',warnings=0,explicit=false){scenarios.push({id,hazard:false,layers:[[b],[o]],preceding:[clone(b)],expected:[expected],warnings,action,command:'BLOCK',tool:'Bash',explicit});} @@ -57,10 +57,10 @@ const dir=join(import.meta.dirname,'..','runs');mkdirSync(dir,{recursive:true}); const runId=`occ-${Date.now().toString(36)}`;const tracePath=join(dir,`${runId}.jsonl`); const trace=new TraceWriter(tracePath,{runId,experiment:EXP});const bus=new MessageBus({trace}); const files=execFileSync('find',[join(REPO,'packages/aegis/src'),join(REPO,'packages/aegis/dist'),'-type','f'],{encoding:'utf8'}).trim().split('\n').sort(); -const packageInfo={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:files.map(file=>({file:file.slice(REPO.length+1),sha256:hash(readFileSync(file))})),mode:'real-built-public-api',config:'package defaults; no override'}; +const packageInfo={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:files.map(file=>({file:file.slice(REPO.length+1),sha256:hash(readFileSync(file))})),mode:'real-built-public-api',config:'severityTable critical/high deny; medium ask; low allow; all other package defaults'}; const harnessSha256=hash(readFileSync(join(import.meta.dirname,'..','src/main.ts'))); bus.publish({from:'moderator',to:'*',topic:'meta',body:{evidenceVersion:1,experiment:EXP,seed:SEED,holdout:'reserved-unused-no-tuning',runId,scenarios,harnessSha256,aegis:packageInfo}}); -function evaluate(rules:Rule[],s:Scenario){return runtime.evaluate({tool:s.tool,command:s.command},runtime.loadPack({packId:'coverage-consent',version:'1',rules})).action;} +function evaluate(rules:Rule[],s:Scenario){return runtime.evaluate({tool:s.tool,command:s.command},runtime.loadPack({packId:'coverage-consent',version:'1',rules}),{severityTable:{critical:'deny',high:'deny',medium:'ask',low:'allow'}}).action;} const rows=[]; for(const s of scenarios){ const before=JSON.stringify(s.layers); diff --git a/specs/69-rule-overlay-coverage-consent.md b/specs/69-rule-overlay-coverage-consent.md index 0153c78..d646dd3 100644 --- a/specs/69-rule-overlay-coverage-consent.md +++ b/specs/69-rule-overlay-coverage-consent.md @@ -32,3 +32,5 @@ Repeat exact node invocation twice for baseline reproducibility, once post-patch ## Landing and uncertainty Full replay equality, content-addressed receipts and committed traces; preserve red. Small general Aegis policy fix only after reproducible red. No speculative inclusion algorithm or special fixture names. Changing formerly accepted matcher retunes is a deliberate authority tightening; hold for migration/owner review if necessary. No improvement claim without same real-package before/after. PR CI required before merge; no CI workflow in current SwarmLab main is NOT executable green. + +Pre-observation implementation correction: severity-escalation hazard uses high -> critical (not critical -> critical). Frozen host severityTable={critical:deny,high:deny,medium:ask,low:allow} for EVERY scenario/arm/run makes its preceding high classifier a deny floor. All assertions/thresholds/scenario counts unchanged; no experiment run observed. From 0c5a065a270cc84ecc0085580cbf6a462e6f1495 Mon Sep 17 00:00:00 2001 From: heybeaux Date: Tue, 13 Oct 2026 23:41:22 -0700 Subject: [PATCH 4/7] evidence(exp63): preserve real-Aegis red-green and executable receipt CI --- .github/workflows/exp63-evidence.yml | 36 ++++ CLAIMS.json | 161 ++++++++++++++++++ JOURNAL.md | 12 ++ SYNTHESIS.md | 8 + docs/EVIDENCE-LEDGER.md | 3 + .../README.md | 11 ++ .../runs/occ-mv7qlhb7.jsonl | 37 ++++ .../runs/occ-mv7qlhb7.receipt.json | 72 ++++++++ .../runs/occ-mv7qlhdk.jsonl | 37 ++++ .../runs/occ-mv7qlhdk.receipt.json | 72 ++++++++ .../runs/occ-mv7qn439.jsonl | 37 ++++ .../runs/occ-mv7qn439.receipt.json | 72 ++++++++ .../verify-receipts.mjs | 52 ++++++ 13 files changed, 610 insertions(+) create mode 100644 .github/workflows/exp63-evidence.yml create mode 100644 experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.jsonl create mode 100644 experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.receipt.json create mode 100644 experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.jsonl create mode 100644 experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.receipt.json create mode 100644 experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.jsonl create mode 100644 experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.receipt.json create mode 100644 experiments/63-rule-overlay-coverage-consent/verify-receipts.mjs diff --git a/.github/workflows/exp63-evidence.yml b/.github/workflows/exp63-evidence.yml new file mode 100644 index 0000000..5c4ecbb --- /dev/null +++ b/.github/workflows/exp63-evidence.yml @@ -0,0 +1,36 @@ +name: exp63-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 + - name: Install, build and type-check SwarmLab + run: npm ci && npm run build && npm run typecheck + - name: Verify committed corpus and exact exp63 receipts + run: npm run verify:evidence && node experiments/63-rule-overlay-coverage-consent/verify-receipts.mjs + - name: Checkout exact evidence-backed Aegis runtime (not moving main) + uses: actions/checkout@v4 + with: + repository: heybeaux/aegis + ref: bc879d6c7fd213b49ef355b64bd83196098ffa0e + path: .aegis-candidate + - name: Build real Aegis + working-directory: .aegis-candidate + run: pnpm install --frozen-lockfile && pnpm --filter @heybeaux/lattice-aegis build + - name: Rerun exact frozen exp63 and inspect metrics, not exit code + run: | + AEGIS_REPO="$GITHUB_WORKSPACE/.aegis-candidate" node experiments/63-rule-overlay-coverage-consent/dist/main.js > "$RUNNER_TEMP/exp63.log" + cat "$RUNNER_TEMP/exp63.log" + node experiments/63-rule-overlay-coverage-consent/verify-receipts.mjs --latest diff --git a/CLAIMS.json b/CLAIMS.json index d629bb8..0db13f9 100644 --- a/CLAIMS.json +++ b/CLAIMS.json @@ -6333,5 +6333,166 @@ "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-53", + "claim": "Unconsented matcher/scope replacement silently removes effective cascade coverage even at unchanged or higher severity; real Aegis conservative overlay-consent enforcement preserves preceding enabled classifiers without weakening explicit host retunes.", + "experiment": "experiments/63-rule-overlay-coverage-consent", + "spec": "specs/69-rule-overlay-coverage-consent.md", + "runIds": [ + "occ-mv7qlhb7", + "occ-mv7qlhdk", + "occ-mv7qn439" + ], + "tracePaths": [ + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.jsonl", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.jsonl", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.jsonl" + ], + "scoreFields": [ + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.jsonl#last.aegisUnsafeCoverageLossRate", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.jsonl#last.aegisCoverageRejectionRate", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.jsonl#last.aegisResolutionAccuracy", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.jsonl#last.pinnedBaseControlAccuracy", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.jsonl#last.aegisControlAccuracy", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.jsonl#last.aegisInputOwnership", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.jsonl#last.protectedBaseFixtureAccuracy", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.jsonl#last.explicitConsentAccuracy", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.jsonl#last.aegisUnsafeCoverageLossRate", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.jsonl#last.aegisCoverageRejectionRate", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.jsonl#last.aegisResolutionAccuracy", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.jsonl#last.pinnedBaseControlAccuracy", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.jsonl#last.aegisControlAccuracy", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.jsonl#last.aegisInputOwnership", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.jsonl#last.protectedBaseFixtureAccuracy", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.jsonl#last.explicitConsentAccuracy", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.jsonl#last.aegisUnsafeCoverageLossRate", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.jsonl#last.aegisCoverageRejectionRate", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.jsonl#last.aegisResolutionAccuracy", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.jsonl#last.pinnedBaseControlAccuracy", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.jsonl#last.aegisControlAccuracy", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.jsonl#last.aegisInputOwnership", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.jsonl#last.protectedBaseFixtureAccuracy", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.jsonl#last.explicitConsentAccuracy" + ], + "expectedValues": { + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.jsonl#last.aegisUnsafeCoverageLossRate": { + "equals": 1, + "tolerance": 0 + }, + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.jsonl#last.aegisCoverageRejectionRate": { + "equals": 0, + "tolerance": 0 + }, + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.jsonl#last.aegisResolutionAccuracy": { + "equals": 0.56, + "tolerance": 0 + }, + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.jsonl#last.pinnedBaseControlAccuracy": { + "equals": 1, + "tolerance": 0 + }, + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.jsonl#last.aegisControlAccuracy": { + "equals": 0.9333333333333333, + "tolerance": 0 + }, + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.jsonl#last.aegisInputOwnership": { + "equals": 1, + "tolerance": 0 + }, + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.jsonl#last.protectedBaseFixtureAccuracy": { + "equals": 1, + "tolerance": 0 + }, + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.jsonl#last.explicitConsentAccuracy": { + "equals": 1, + "tolerance": 0 + }, + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.jsonl#last.aegisUnsafeCoverageLossRate": { + "equals": 1, + "tolerance": 0 + }, + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.jsonl#last.aegisCoverageRejectionRate": { + "equals": 0, + "tolerance": 0 + }, + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.jsonl#last.aegisResolutionAccuracy": { + "equals": 0.56, + "tolerance": 0 + }, + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.jsonl#last.pinnedBaseControlAccuracy": { + "equals": 1, + "tolerance": 0 + }, + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.jsonl#last.aegisControlAccuracy": { + "equals": 0.9333333333333333, + "tolerance": 0 + }, + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.jsonl#last.aegisInputOwnership": { + "equals": 1, + "tolerance": 0 + }, + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.jsonl#last.protectedBaseFixtureAccuracy": { + "equals": 1, + "tolerance": 0 + }, + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.jsonl#last.explicitConsentAccuracy": { + "equals": 1, + "tolerance": 0 + }, + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.jsonl#last.aegisUnsafeCoverageLossRate": { + "equals": 0, + "tolerance": 0 + }, + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.jsonl#last.aegisCoverageRejectionRate": { + "equals": 1, + "tolerance": 0 + }, + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.jsonl#last.aegisResolutionAccuracy": { + "equals": 1, + "tolerance": 0 + }, + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.jsonl#last.pinnedBaseControlAccuracy": { + "equals": 1, + "tolerance": 0 + }, + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.jsonl#last.aegisControlAccuracy": { + "equals": 1, + "tolerance": 0 + }, + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.jsonl#last.aegisInputOwnership": { + "equals": 1, + "tolerance": 0 + }, + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.jsonl#last.protectedBaseFixtureAccuracy": { + "equals": 1, + "tolerance": 0 + }, + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.jsonl#last.explicitConsentAccuracy": { + "equals": 1, + "tolerance": 0 + } + }, + "reproductionCommand": "npm run build && AEGIS_REPO=/Users/beauxwalton/projects/worktrees/aegis-2026-10-13-exp63 node experiments/63-rule-overlay-coverage-consent/dist/main.js", + "stackRecommendation": "Require per-overlay allowDowngrade:true for opaque matcher replacement or contracted enabled tool scope; do not infer regex language inclusion. Hosts own review/provenance.", + "stackReposAndPRs": [ + { + "repo": "https://github.com/heybeaux/aegis", + "package": "@heybeaux/lattice-aegis", + "branch": "nightly/2026-10-13-exp63", + "commits": [ + "bc879d6c7fd213b49ef355b64bd83196098ffa0e" + ], + "prs": [], + "dirtyState": "clean on admitted runtime result" + } + ], + "evidenceStatus": "verified", + "notes": "Deterministic machine-owned frozen25 scenarios; 10 hazards baseline unsafe allow10/10, coverage rejection0/10; same-harness candidate25/25. 15 controls include conservative rejection of opaque broadening. No holdout tuning; reserved unused. Host explicit retunes require review after tightening. No predictive calibration, regex inclusion or post-merge alias claim. Candidate not remotely merged; CI tracked separately. Prior RT50/51/52 remain separate unmerged experiments, not silently certified.", + "artifactReceipts": [ + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.receipt.json", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.receipt.json", + "experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.receipt.json" + ] } ] diff --git a/JOURNAL.md b/JOURNAL.md index fe16936..0664079 100644 --- a/JOURNAL.md +++ b/JOURNAL.md @@ -307,3 +307,15 @@ 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. + +## 2026-10-13 — Novel exp63; authority is about coverage, not just severity + +## RT53 — Rule-overlay coverage consent (exp63 / Spec69) + +Pre-registration `c8bc120` preceded implementation and observations; pre-observation configuration correction `060e6b8` pins high/critical deny for every arm. Real fetched-main Aegis `4be84ed4aab018bee1b9a77b6012b9b97c966d1c` (`occ-mv7qlhb7`, repeat `occ-mv7qlhdk`) allowed **10/10** unconsented matcher/scope losses: rejection **0/10**, resolution **14/25**. Preceding base fixture and pinned-host control **10/10**; explicit reviewed allowances **3/3**. Scenario rows and complete package manifests identical across baseline runs. + +Aegis runtime `bc879d6c7fd213b49ef355b64bd83196098ffa0e` compares enabled classifier kind/pattern/target/effective flags and case-sensitive tool-set containment at mergeLayers. Opaque matcher replacements and tool contractions require consent on THIS overlay; warning retains entire preceding effective rule. Flag order/empty equivalence, set-equivalent/expanded tools, metadata, disabled-base re-enable, explicit retunes and insertion order preserved. **Same unchanged harness/seed/scenarios** `occ-mv7qn439`: unsafe allow **0/10**, coverage rejection **10/10**, exact resolution **25/25**, all secondary metrics **1**. Three full replay-verified37-event traces plus source/dist manifests and SHA-256 receipts committed. Focused tests **13 red/6 pass ->19 green**; no thresholds moved. + +This tests cascade authority BEFORE compilation, distinct from RT48 in-flight config drift and RT52 declared/cache binding. No regex-language inclusion proof: even safe opaque broadening needs explicit review. No post-merge alias isolation, sandbox execution, learned predictor or production incident claim. Host owns trusted overlays, intentional consent and safe action execution. Prior exp60/61/62 candidates remain unmerged and separate. Explicit authority tightening needs migration review; local evidence green is not remote CI/merge confirmation. Stored old evidence is regression, not novel work. + +Setup: default pnpm8 rejected lockfile9 before install; used already available corepack pnpm10.9.0 matching CI, no lockfile recreation. Both primary dirty checkouts untouched; dated origin/main worktrees. No .acr edits; Territory refresh not required. diff --git a/SYNTHESIS.md b/SYNTHESIS.md index 78811cc..6229bc4 100644 --- a/SYNTHESIS.md +++ b/SYNTHESIS.md @@ -1505,3 +1505,11 @@ 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. + +## RT53 — Rule-overlay coverage consent (exp63 / Spec69) + +Pre-registration `c8bc120` preceded implementation and observations; pre-observation configuration correction `060e6b8` pins high/critical deny for every arm. Real fetched-main Aegis `4be84ed4aab018bee1b9a77b6012b9b97c966d1c` (`occ-mv7qlhb7`, repeat `occ-mv7qlhdk`) allowed **10/10** unconsented matcher/scope losses: rejection **0/10**, resolution **14/25**. Preceding base fixture and pinned-host control **10/10**; explicit reviewed allowances **3/3**. Scenario rows and complete package manifests identical across baseline runs. + +Aegis runtime `bc879d6c7fd213b49ef355b64bd83196098ffa0e` compares enabled classifier kind/pattern/target/effective flags and case-sensitive tool-set containment at mergeLayers. Opaque matcher replacements and tool contractions require consent on THIS overlay; warning retains entire preceding effective rule. Flag order/empty equivalence, set-equivalent/expanded tools, metadata, disabled-base re-enable, explicit retunes and insertion order preserved. **Same unchanged harness/seed/scenarios** `occ-mv7qn439`: unsafe allow **0/10**, coverage rejection **10/10**, exact resolution **25/25**, all secondary metrics **1**. Three full replay-verified37-event traces plus source/dist manifests and SHA-256 receipts committed. Focused tests **13 red/6 pass ->19 green**; no thresholds moved. + +This tests cascade authority BEFORE compilation, distinct from RT48 in-flight config drift and RT52 declared/cache binding. No regex-language inclusion proof: even safe opaque broadening needs explicit review. No post-merge alias isolation, sandbox execution, learned predictor or production incident claim. Host owns trusted overlays, intentional consent and safe action execution. Prior exp60/61/62 candidates remain unmerged and separate. Explicit authority tightening needs migration review; local evidence green is not remote CI/merge confirmation. Stored old evidence is regression, not novel work. diff --git a/docs/EVIDENCE-LEDGER.md b/docs/EVIDENCE-LEDGER.md index 5f10464..ad6cdb5 100644 --- a/docs/EVIDENCE-LEDGER.md +++ b/docs/EVIDENCE-LEDGER.md @@ -197,3 +197,6 @@ 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. + +### RT53 / exp63 +Pre-registration c8bc120; occ-mv7qlhb7 / occ-mv7qlhdk red -> occ-mv7qn439 green; exact source/dist/trace hashes in adjacent .receipt.json; frozen harness sha256:5acc408f7c473e0ee849f015fd4609c41c2275e10dcba15c5960a5e68cff660b. Real Aegis runtime bc879d6c7fd213b49ef355b64bd83196098ffa0e; candidate only, PR/CI state tracked in nightly ledger. diff --git a/experiments/63-rule-overlay-coverage-consent/README.md b/experiments/63-rule-overlay-coverage-consent/README.md index 3e71cbb..7053ef3 100644 --- a/experiments/63-rule-overlay-coverage-consent/README.md +++ b/experiments/63-rule-overlay-coverage-consent/README.md @@ -3,3 +3,14 @@ Pre-registration before observations: [Spec69](../../specs/69-rule-overlay-coverage-consent.md). New question: does unchanged severity hide classifier coverage loss through cascade overrides? Results pending; no green claim. + +## RT53 — Rule-overlay coverage consent (exp63 / Spec69) + +Pre-registration `c8bc120` preceded implementation and observations; pre-observation configuration correction `060e6b8` pins high/critical deny for every arm. Real fetched-main Aegis `4be84ed4aab018bee1b9a77b6012b9b97c966d1c` (`occ-mv7qlhb7`, repeat `occ-mv7qlhdk`) allowed **10/10** unconsented matcher/scope losses: rejection **0/10**, resolution **14/25**. Preceding base fixture and pinned-host control **10/10**; explicit reviewed allowances **3/3**. Scenario rows and complete package manifests identical across baseline runs. + +Aegis runtime `bc879d6c7fd213b49ef355b64bd83196098ffa0e` compares enabled classifier kind/pattern/target/effective flags and case-sensitive tool-set containment at mergeLayers. Opaque matcher replacements and tool contractions require consent on THIS overlay; warning retains entire preceding effective rule. Flag order/empty equivalence, set-equivalent/expanded tools, metadata, disabled-base re-enable, explicit retunes and insertion order preserved. **Same unchanged harness/seed/scenarios** `occ-mv7qn439`: unsafe allow **0/10**, coverage rejection **10/10**, exact resolution **25/25**, all secondary metrics **1**. Three full replay-verified37-event traces plus source/dist manifests and SHA-256 receipts committed. Focused tests **13 red/6 pass ->19 green**; no thresholds moved. + +This tests cascade authority BEFORE compilation, distinct from RT48 in-flight config drift and RT52 declared/cache binding. No regex-language inclusion proof: even safe opaque broadening needs explicit review. No post-merge alias isolation, sandbox execution, learned predictor or production incident claim. Host owns trusted overlays, intentional consent and safe action execution. Prior exp60/61/62 candidates remain unmerged and separate. Explicit authority tightening needs migration review; local evidence green is not remote CI/merge confirmation. Stored old evidence is regression, not novel work. + +## Run +`npm install && npm run build` then `AEGIS_REPO=/path/to/real/aegis node experiments/63-rule-overlay-coverage-consent/dist/main.js`. Aegis must be built with compatible pnpm10 (`corepack pnpm@10.9.0`). Inspect receipt.green and all metrics; a diagnostic red has exit0 intentionally. CI validates actual desired state, not command exit alone. New PR CI must run this fresh package integration plus corpus verification. diff --git a/experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.jsonl b/experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.jsonl new file mode 100644 index 0000000..4c151ec --- /dev/null +++ b/experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.jsonl @@ -0,0 +1,37 @@ +{"t":"message","ts":1791959798013,"from":"moderator","to":"*","topic":"meta","body":{"evidenceVersion":1,"experiment":"63-rule-overlay-coverage-consent","seed":"overlay-coverage-consent-v1","holdout":"reserved-unused-no-tuning","runId":"occ-mv7qlhb7","scenarios":[{"id":"regex-pattern-narrow","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"substring-pattern-narrow","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"substring","pattern":"BLOCK","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"substring","pattern":"OTHER","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"substring","pattern":"BLOCK","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"substring","pattern":"BLOCK","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"regex-remove-i","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"block","tool":"Bash"},{"id":"target-command-to-content","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"content"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"regex-to-substring","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"substring","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"appliesTo-drop-Bash","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"wildcard-to-finite","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"severity-escalation-plus-narrow","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"high","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"high","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"high","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"prior-explicit-consent-not-inherited","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"explicit previous consent","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"explicit previous consent","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"explicit previous consent","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"explicit previous consent","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"intermediate-base-retained","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"intermediate expanded policy","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"intermediate expanded policy","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell","Execute"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"intermediate expanded policy","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"intermediate expanded policy","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"unchanged","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"description-only","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"metadata revision","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"metadata revision","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"severity-tighten","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"high","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"high","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"tools-expand","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"tools-wildcard","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"tools-reorder-duplicate","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell","Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell","Bash","Shell"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"regex-flags-reorder","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"im","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"mi","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"im","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"mi","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"empty-flags-equivalent","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","target":"command","flags":""},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","target":"command","flags":""},"appliesTo":["Bash","Shell"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"explicit-pattern-consent","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"warnings":0,"action":"allow","command":"BLOCK","tool":"Bash","explicit":true},{"id":"explicit-scope-consent","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell"],"allowDowngrade":true}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell"],"allowDowngrade":true}],"warnings":0,"action":"allow","command":"BLOCK","tool":"Bash","explicit":true},{"id":"new-rule-addition","hazard":false,"layers":[[{"id":"coverage.other","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.other","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.other","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]},{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"disabled-base-retune","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"enabled":false}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"enabled":true}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"enabled":false}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"enabled":true}],"warnings":0,"action":"allow","command":"BLOCK","tool":"Bash","explicit":false},{"id":"explicit-severity-consent","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"low","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"low","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"warnings":0,"action":"allow","command":"BLOCK","tool":"Bash","explicit":true},{"id":"silent-severity-downgrade","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"low","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"opaque-regex-broadening-without-proof","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b|OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false}],"harnessSha256":"sha256:5acc408f7c473e0ee849f015fd4609c41c2275e10dcba15c5960a5e68cff660b","aegis":{"sha":"4be84ed4aab018bee1b9a77b6012b9b97c966d1c","dirty":"","repo":"/Users/beauxwalton/projects/worktrees/aegis-2026-10-13-exp63","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/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"}],"mode":"real-built-public-api","config":"severityTable critical/high deny; medium ask; low allow; all other package defaults"}}} +{"t":"message","ts":1791959798014,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"regex-pattern-narrow","hazard":true,"explicit":false,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":false,"warnings":false,"action":false,"inputOwnership":true},"correct":false}} +{"t":"message","ts":1791959798014,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"regex-pattern-narrow","action":"deny","correct":true}} +{"t":"message","ts":1791959798014,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"substring-pattern-narrow","hazard":true,"explicit":false,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"substring","pattern":"OTHER","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"substring","pattern":"BLOCK","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":false,"warnings":false,"action":false,"inputOwnership":true},"correct":false}} +{"t":"message","ts":1791959798014,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"substring-pattern-narrow","action":"deny","correct":true}} +{"t":"message","ts":1791959798014,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"regex-remove-i","hazard":true,"explicit":false,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":false,"warnings":false,"action":false,"inputOwnership":true},"correct":false}} +{"t":"message","ts":1791959798015,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"regex-remove-i","action":"deny","correct":true}} +{"t":"message","ts":1791959798015,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"target-command-to-content","hazard":true,"explicit":false,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"content"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":false,"warnings":false,"action":false,"inputOwnership":true},"correct":false}} +{"t":"message","ts":1791959798015,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"target-command-to-content","action":"deny","correct":true}} +{"t":"message","ts":1791959798015,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"regex-to-substring","hazard":true,"explicit":false,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"substring","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":false,"warnings":false,"action":false,"inputOwnership":true},"correct":false}} +{"t":"message","ts":1791959798015,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"regex-to-substring","action":"deny","correct":true}} +{"t":"message","ts":1791959798015,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"appliesTo-drop-Bash","hazard":true,"explicit":false,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":false,"warnings":false,"action":false,"inputOwnership":true},"correct":false}} +{"t":"message","ts":1791959798015,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"appliesTo-drop-Bash","action":"deny","correct":true}} +{"t":"message","ts":1791959798015,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"wildcard-to-finite","hazard":true,"explicit":false,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}],"checks":{"effectiveRules":false,"warnings":false,"action":false,"inputOwnership":true},"correct":false}} +{"t":"message","ts":1791959798015,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"wildcard-to-finite","action":"deny","correct":true}} +{"t":"message","ts":1791959798015,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"severity-escalation-plus-narrow","hazard":true,"explicit":false,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"high","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash"]}],"checks":{"effectiveRules":false,"warnings":false,"action":false,"inputOwnership":true},"correct":false}} +{"t":"message","ts":1791959798015,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"severity-escalation-plus-narrow","action":"deny","correct":true}} +{"t":"message","ts":1791959798015,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"prior-explicit-consent-not-inherited","hazard":true,"explicit":false,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"explicit previous consent","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"explicit previous consent","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"checks":{"effectiveRules":false,"warnings":false,"action":false,"inputOwnership":true},"correct":false}} +{"t":"message","ts":1791959798015,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"prior-explicit-consent-not-inherited","action":"deny","correct":true}} +{"t":"message","ts":1791959798015,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"intermediate-base-retained","hazard":true,"explicit":false,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"intermediate expanded policy","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell","Execute"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"intermediate expanded policy","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}],"checks":{"effectiveRules":false,"warnings":false,"action":false,"inputOwnership":true},"correct":false}} +{"t":"message","ts":1791959798015,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"intermediate-base-retained","action":"deny","correct":true}} +{"t":"message","ts":1791959798015,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"unchanged","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798016,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"description-only","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"metadata revision","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"metadata revision","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798016,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"severity-tighten","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798016,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"tools-expand","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798016,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"tools-wildcard","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798016,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"tools-reorder-duplicate","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell","Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell","Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798016,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"regex-flags-reorder","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"mi","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"mi","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798016,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"empty-flags-equivalent","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","target":"command","flags":""},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","target":"command","flags":""},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798016,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"explicit-pattern-consent","hazard":false,"explicit":true,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798016,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"explicit-scope-consent","hazard":false,"explicit":true,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell"],"allowDowngrade":true}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell"],"allowDowngrade":true}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798016,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"new-rule-addition","hazard":false,"explicit":false,"priorAction":"allow","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.other","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]},{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.other","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]},{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798016,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"disabled-base-retune","hazard":false,"explicit":false,"priorAction":"allow","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"enabled":true}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"enabled":true}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798016,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"explicit-severity-consent","hazard":false,"explicit":true,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"low","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"expected":[{"id":"coverage.block","category":"bash","severity":"low","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798016,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"silent-severity-downgrade","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[{"ruleId":"coverage.block","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798016,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"opaque-regex-broadening-without-proof","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b|OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":false,"warnings":false,"action":true,"inputOwnership":true},"correct":false}} +{"t":"score","ts":1791959798016,"scores":{"aegisUnsafeCoverageLossRate":1,"aegisCoverageRejectionRate":0,"aegisResolutionAccuracy":0.56,"pinnedBaseControlAccuracy":1,"aegisControlAccuracy":0.9333333333333333,"aegisInputOwnership":1,"protectedBaseFixtureAccuracy":1,"explicitConsentAccuracy":1}} diff --git a/experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.receipt.json b/experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.receipt.json new file mode 100644 index 0000000..bed2317 --- /dev/null +++ b/experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhb7.receipt.json @@ -0,0 +1,72 @@ +{ + "runId": "occ-mv7qlhb7", + "harnessSha256": "sha256:5acc408f7c473e0ee849f015fd4609c41c2275e10dcba15c5960a5e68cff660b", + "package": { + "sha": "4be84ed4aab018bee1b9a77b6012b9b97c966d1c", + "dirty": "", + "repo": "/Users/beauxwalton/projects/worktrees/aegis-2026-10-13-exp63", + "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/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" + } + ], + "mode": "real-built-public-api", + "config": "severityTable critical/high deny; medium ask; low allow; all other package defaults" + }, + "seed": "overlay-coverage-consent-v1", + "metrics": { + "aegisUnsafeCoverageLossRate": 1, + "aegisCoverageRejectionRate": 0, + "aegisResolutionAccuracy": 0.56, + "pinnedBaseControlAccuracy": 1, + "aegisControlAccuracy": 0.9333333333333333, + "aegisInputOwnership": 1, + "protectedBaseFixtureAccuracy": 1, + "explicitConsentAccuracy": 1 + }, + "green": false, + "traceSha256": "sha256:bd8b5d7dc8b9fabbb920f40229a910b50453039799e7e2b67aef25fa1fb9b1b0", + "events": 37 +} diff --git a/experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.jsonl b/experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.jsonl new file mode 100644 index 0000000..967a18e --- /dev/null +++ b/experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.jsonl @@ -0,0 +1,37 @@ +{"t":"message","ts":1791959798089,"from":"moderator","to":"*","topic":"meta","body":{"evidenceVersion":1,"experiment":"63-rule-overlay-coverage-consent","seed":"overlay-coverage-consent-v1","holdout":"reserved-unused-no-tuning","runId":"occ-mv7qlhdk","scenarios":[{"id":"regex-pattern-narrow","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"substring-pattern-narrow","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"substring","pattern":"BLOCK","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"substring","pattern":"OTHER","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"substring","pattern":"BLOCK","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"substring","pattern":"BLOCK","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"regex-remove-i","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"block","tool":"Bash"},{"id":"target-command-to-content","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"content"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"regex-to-substring","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"substring","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"appliesTo-drop-Bash","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"wildcard-to-finite","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"severity-escalation-plus-narrow","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"high","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"high","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"high","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"prior-explicit-consent-not-inherited","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"explicit previous consent","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"explicit previous consent","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"explicit previous consent","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"explicit previous consent","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"intermediate-base-retained","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"intermediate expanded policy","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"intermediate expanded policy","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell","Execute"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"intermediate expanded policy","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"intermediate expanded policy","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"unchanged","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"description-only","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"metadata revision","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"metadata revision","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"severity-tighten","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"high","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"high","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"tools-expand","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"tools-wildcard","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"tools-reorder-duplicate","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell","Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell","Bash","Shell"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"regex-flags-reorder","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"im","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"mi","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"im","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"mi","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"empty-flags-equivalent","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","target":"command","flags":""},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","target":"command","flags":""},"appliesTo":["Bash","Shell"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"explicit-pattern-consent","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"warnings":0,"action":"allow","command":"BLOCK","tool":"Bash","explicit":true},{"id":"explicit-scope-consent","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell"],"allowDowngrade":true}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell"],"allowDowngrade":true}],"warnings":0,"action":"allow","command":"BLOCK","tool":"Bash","explicit":true},{"id":"new-rule-addition","hazard":false,"layers":[[{"id":"coverage.other","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.other","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.other","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]},{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"disabled-base-retune","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"enabled":false}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"enabled":true}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"enabled":false}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"enabled":true}],"warnings":0,"action":"allow","command":"BLOCK","tool":"Bash","explicit":false},{"id":"explicit-severity-consent","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"low","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"low","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"warnings":0,"action":"allow","command":"BLOCK","tool":"Bash","explicit":true},{"id":"silent-severity-downgrade","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"low","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"opaque-regex-broadening-without-proof","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b|OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false}],"harnessSha256":"sha256:5acc408f7c473e0ee849f015fd4609c41c2275e10dcba15c5960a5e68cff660b","aegis":{"sha":"4be84ed4aab018bee1b9a77b6012b9b97c966d1c","dirty":"","repo":"/Users/beauxwalton/projects/worktrees/aegis-2026-10-13-exp63","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/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"}],"mode":"real-built-public-api","config":"severityTable critical/high deny; medium ask; low allow; all other package defaults"}}} +{"t":"message","ts":1791959798091,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"regex-pattern-narrow","hazard":true,"explicit":false,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":false,"warnings":false,"action":false,"inputOwnership":true},"correct":false}} +{"t":"message","ts":1791959798091,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"regex-pattern-narrow","action":"deny","correct":true}} +{"t":"message","ts":1791959798091,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"substring-pattern-narrow","hazard":true,"explicit":false,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"substring","pattern":"OTHER","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"substring","pattern":"BLOCK","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":false,"warnings":false,"action":false,"inputOwnership":true},"correct":false}} +{"t":"message","ts":1791959798091,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"substring-pattern-narrow","action":"deny","correct":true}} +{"t":"message","ts":1791959798091,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"regex-remove-i","hazard":true,"explicit":false,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":false,"warnings":false,"action":false,"inputOwnership":true},"correct":false}} +{"t":"message","ts":1791959798091,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"regex-remove-i","action":"deny","correct":true}} +{"t":"message","ts":1791959798091,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"target-command-to-content","hazard":true,"explicit":false,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"content"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":false,"warnings":false,"action":false,"inputOwnership":true},"correct":false}} +{"t":"message","ts":1791959798091,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"target-command-to-content","action":"deny","correct":true}} +{"t":"message","ts":1791959798092,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"regex-to-substring","hazard":true,"explicit":false,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"substring","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":false,"warnings":false,"action":false,"inputOwnership":true},"correct":false}} +{"t":"message","ts":1791959798092,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"regex-to-substring","action":"deny","correct":true}} +{"t":"message","ts":1791959798092,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"appliesTo-drop-Bash","hazard":true,"explicit":false,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":false,"warnings":false,"action":false,"inputOwnership":true},"correct":false}} +{"t":"message","ts":1791959798092,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"appliesTo-drop-Bash","action":"deny","correct":true}} +{"t":"message","ts":1791959798092,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"wildcard-to-finite","hazard":true,"explicit":false,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}],"checks":{"effectiveRules":false,"warnings":false,"action":false,"inputOwnership":true},"correct":false}} +{"t":"message","ts":1791959798092,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"wildcard-to-finite","action":"deny","correct":true}} +{"t":"message","ts":1791959798092,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"severity-escalation-plus-narrow","hazard":true,"explicit":false,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"high","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash"]}],"checks":{"effectiveRules":false,"warnings":false,"action":false,"inputOwnership":true},"correct":false}} +{"t":"message","ts":1791959798092,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"severity-escalation-plus-narrow","action":"deny","correct":true}} +{"t":"message","ts":1791959798092,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"prior-explicit-consent-not-inherited","hazard":true,"explicit":false,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"explicit previous consent","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"explicit previous consent","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"checks":{"effectiveRules":false,"warnings":false,"action":false,"inputOwnership":true},"correct":false}} +{"t":"message","ts":1791959798092,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"prior-explicit-consent-not-inherited","action":"deny","correct":true}} +{"t":"message","ts":1791959798092,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"intermediate-base-retained","hazard":true,"explicit":false,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"intermediate expanded policy","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell","Execute"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"intermediate expanded policy","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}],"checks":{"effectiveRules":false,"warnings":false,"action":false,"inputOwnership":true},"correct":false}} +{"t":"message","ts":1791959798092,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"intermediate-base-retained","action":"deny","correct":true}} +{"t":"message","ts":1791959798092,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"unchanged","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798092,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"description-only","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"metadata revision","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"metadata revision","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798092,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"severity-tighten","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798092,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"tools-expand","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798092,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"tools-wildcard","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798092,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"tools-reorder-duplicate","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell","Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell","Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798092,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"regex-flags-reorder","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"mi","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"mi","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798093,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"empty-flags-equivalent","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","target":"command","flags":""},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","target":"command","flags":""},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798093,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"explicit-pattern-consent","hazard":false,"explicit":true,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798093,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"explicit-scope-consent","hazard":false,"explicit":true,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell"],"allowDowngrade":true}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell"],"allowDowngrade":true}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798093,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"new-rule-addition","hazard":false,"explicit":false,"priorAction":"allow","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.other","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]},{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.other","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]},{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798093,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"disabled-base-retune","hazard":false,"explicit":false,"priorAction":"allow","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"enabled":true}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"enabled":true}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798093,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"explicit-severity-consent","hazard":false,"explicit":true,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"low","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"expected":[{"id":"coverage.block","category":"bash","severity":"low","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798093,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"silent-severity-downgrade","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[{"ruleId":"coverage.block","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter builtin"}],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959798093,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"opaque-regex-broadening-without-proof","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b|OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":false,"warnings":false,"action":true,"inputOwnership":true},"correct":false}} +{"t":"score","ts":1791959798093,"scores":{"aegisUnsafeCoverageLossRate":1,"aegisCoverageRejectionRate":0,"aegisResolutionAccuracy":0.56,"pinnedBaseControlAccuracy":1,"aegisControlAccuracy":0.9333333333333333,"aegisInputOwnership":1,"protectedBaseFixtureAccuracy":1,"explicitConsentAccuracy":1}} diff --git a/experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.receipt.json b/experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.receipt.json new file mode 100644 index 0000000..290687b --- /dev/null +++ b/experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qlhdk.receipt.json @@ -0,0 +1,72 @@ +{ + "runId": "occ-mv7qlhdk", + "harnessSha256": "sha256:5acc408f7c473e0ee849f015fd4609c41c2275e10dcba15c5960a5e68cff660b", + "package": { + "sha": "4be84ed4aab018bee1b9a77b6012b9b97c966d1c", + "dirty": "", + "repo": "/Users/beauxwalton/projects/worktrees/aegis-2026-10-13-exp63", + "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/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" + } + ], + "mode": "real-built-public-api", + "config": "severityTable critical/high deny; medium ask; low allow; all other package defaults" + }, + "seed": "overlay-coverage-consent-v1", + "metrics": { + "aegisUnsafeCoverageLossRate": 1, + "aegisCoverageRejectionRate": 0, + "aegisResolutionAccuracy": 0.56, + "pinnedBaseControlAccuracy": 1, + "aegisControlAccuracy": 0.9333333333333333, + "aegisInputOwnership": 1, + "protectedBaseFixtureAccuracy": 1, + "explicitConsentAccuracy": 1 + }, + "green": false, + "traceSha256": "sha256:ed752d9fcecc798cf122b866eb3062432ec1c91e69b436acceabbb687f6593eb", + "events": 37 +} diff --git a/experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.jsonl b/experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.jsonl new file mode 100644 index 0000000..9b9eb1b --- /dev/null +++ b/experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.jsonl @@ -0,0 +1,37 @@ +{"t":"message","ts":1791959874181,"from":"moderator","to":"*","topic":"meta","body":{"evidenceVersion":1,"experiment":"63-rule-overlay-coverage-consent","seed":"overlay-coverage-consent-v1","holdout":"reserved-unused-no-tuning","runId":"occ-mv7qn439","scenarios":[{"id":"regex-pattern-narrow","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"substring-pattern-narrow","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"substring","pattern":"BLOCK","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"substring","pattern":"OTHER","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"substring","pattern":"BLOCK","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"substring","pattern":"BLOCK","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"regex-remove-i","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"block","tool":"Bash"},{"id":"target-command-to-content","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"content"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"regex-to-substring","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"substring","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"appliesTo-drop-Bash","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"wildcard-to-finite","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"severity-escalation-plus-narrow","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"high","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"high","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"high","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"prior-explicit-consent-not-inherited","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"explicit previous consent","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"explicit previous consent","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"explicit previous consent","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"explicit previous consent","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"intermediate-base-retained","hazard":true,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"intermediate expanded policy","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"intermediate expanded policy","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell","Execute"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"intermediate expanded policy","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"intermediate expanded policy","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"unchanged","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"description-only","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"metadata revision","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"metadata revision","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"severity-tighten","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"high","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"high","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"tools-expand","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"tools-wildcard","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"tools-reorder-duplicate","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell","Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell","Bash","Shell"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"regex-flags-reorder","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"im","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"mi","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"im","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"mi","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"empty-flags-equivalent","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","target":"command","flags":""},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","target":"command","flags":""},"appliesTo":["Bash","Shell"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"explicit-pattern-consent","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"warnings":0,"action":"allow","command":"BLOCK","tool":"Bash","explicit":true},{"id":"explicit-scope-consent","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell"],"allowDowngrade":true}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell"],"allowDowngrade":true}],"warnings":0,"action":"allow","command":"BLOCK","tool":"Bash","explicit":true},{"id":"new-rule-addition","hazard":false,"layers":[[{"id":"coverage.other","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.other","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.other","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]},{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":0,"action":"deny","command":"BLOCK","tool":"Bash"},{"id":"disabled-base-retune","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"enabled":false}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"enabled":true}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"enabled":false}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"enabled":true}],"warnings":0,"action":"allow","command":"BLOCK","tool":"Bash","explicit":false},{"id":"explicit-severity-consent","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"low","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"low","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"warnings":0,"action":"allow","command":"BLOCK","tool":"Bash","explicit":true},{"id":"silent-severity-downgrade","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"low","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false},{"id":"opaque-regex-broadening-without-proof","hazard":false,"layers":[[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b|OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}]],"preceding":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"warnings":1,"action":"deny","command":"BLOCK","tool":"Bash","explicit":false}],"harnessSha256":"sha256:5acc408f7c473e0ee849f015fd4609c41c2275e10dcba15c5960a5e68cff660b","aegis":{"sha":"bc879d6c7fd213b49ef355b64bd83196098ffa0e","dirty":"","repo":"/Users/beauxwalton/projects/worktrees/aegis-2026-10-13-exp63","distSha256":"sha256:8f49d562746c16986d8331ad4ecd5c1e428e4a09788cd16ec9775cc135070597","manifest":[{"file":"packages/aegis/dist/index.d.ts","sha256":"sha256:20a97822abaff94c58926dc9c84c478d2342dff458d3af7a044e65a88f614859"},{"file":"packages/aegis/dist/index.js","sha256":"sha256:8f49d562746c16986d8331ad4ecd5c1e428e4a09788cd16ec9775cc135070597"},{"file":"packages/aegis/dist/index.js.map","sha256":"sha256:2aa275cb3cedf526c945b287162d9912017f59c8c8ef7d95e555f86aa9ec5164"},{"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:0956e256aeb26a36a2c316ec89d02f8f02ed3ad0cee955ef90fde41ac9ba8b7a"},{"file":"packages/aegis/src/types.ts","sha256":"sha256:9faced4043810fe8ae3980944db5f52484650262a6c06825776d3faf5e412b7a"}],"mode":"real-built-public-api","config":"severityTable critical/high deny; medium ask; low allow; all other package defaults"}}} +{"t":"message","ts":1791959874182,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"regex-pattern-narrow","hazard":true,"explicit":false,"priorAction":"deny","action":"deny","warnings":[{"ruleId":"coverage.block","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter effective rule"}],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874182,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"regex-pattern-narrow","action":"deny","correct":true}} +{"t":"message","ts":1791959874182,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"substring-pattern-narrow","hazard":true,"explicit":false,"priorAction":"deny","action":"deny","warnings":[{"ruleId":"coverage.block","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter effective rule"}],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"substring","pattern":"BLOCK","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"substring","pattern":"BLOCK","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874182,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"substring-pattern-narrow","action":"deny","correct":true}} +{"t":"message","ts":1791959874182,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"regex-remove-i","hazard":true,"explicit":false,"priorAction":"deny","action":"deny","warnings":[{"ruleId":"coverage.block","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter effective rule"}],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874183,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"regex-remove-i","action":"deny","correct":true}} +{"t":"message","ts":1791959874183,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"target-command-to-content","hazard":true,"explicit":false,"priorAction":"deny","action":"deny","warnings":[{"ruleId":"coverage.block","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter effective rule"}],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874183,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"target-command-to-content","action":"deny","correct":true}} +{"t":"message","ts":1791959874183,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"regex-to-substring","hazard":true,"explicit":false,"priorAction":"deny","action":"deny","warnings":[{"ruleId":"coverage.block","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter effective rule"}],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874183,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"regex-to-substring","action":"deny","correct":true}} +{"t":"message","ts":1791959874183,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"appliesTo-drop-Bash","hazard":true,"explicit":false,"priorAction":"deny","action":"deny","warnings":[{"ruleId":"coverage.block","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter effective rule"}],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874183,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"appliesTo-drop-Bash","action":"deny","correct":true}} +{"t":"message","ts":1791959874183,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"wildcard-to-finite","hazard":true,"explicit":false,"priorAction":"deny","action":"deny","warnings":[{"ruleId":"coverage.block","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter effective rule"}],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874183,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"wildcard-to-finite","action":"deny","correct":true}} +{"t":"message","ts":1791959874183,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"severity-escalation-plus-narrow","hazard":true,"explicit":false,"priorAction":"deny","action":"deny","warnings":[{"ruleId":"coverage.block","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter effective rule"}],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"high","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"high","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874183,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"severity-escalation-plus-narrow","action":"deny","correct":true}} +{"t":"message","ts":1791959874183,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"prior-explicit-consent-not-inherited","hazard":true,"explicit":false,"priorAction":"deny","action":"deny","warnings":[{"ruleId":"coverage.block","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter effective rule"}],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"explicit previous consent","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"explicit previous consent","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874183,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"prior-explicit-consent-not-inherited","action":"deny","correct":true}} +{"t":"message","ts":1791959874183,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"intermediate-base-retained","hazard":true,"explicit":false,"priorAction":"deny","action":"deny","warnings":[{"ruleId":"coverage.block","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter effective rule"}],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"intermediate expanded policy","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"intermediate expanded policy","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874183,"from":"pinned-effective-base","to":"moderator","topic":"scenario","body":{"id":"intermediate-base-retained","action":"deny","correct":true}} +{"t":"message","ts":1791959874183,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"unchanged","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874183,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"description-only","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"metadata revision","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"metadata revision","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874183,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"severity-tighten","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874184,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"tools-expand","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell","Execute"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874184,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"tools-wildcard","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["*"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874184,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"tools-reorder-duplicate","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell","Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell","Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874184,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"regex-flags-reorder","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"mi","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"mi","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874184,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"empty-flags-equivalent","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","target":"command","flags":""},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","target":"command","flags":""},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874184,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"explicit-pattern-consent","hazard":false,"explicit":true,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874184,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"explicit-scope-consent","hazard":false,"explicit":true,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell"],"allowDowngrade":true}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Shell"],"allowDowngrade":true}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874184,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"new-rule-addition","hazard":false,"explicit":false,"priorAction":"allow","action":"deny","warnings":[],"effectiveRules":[{"id":"coverage.other","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]},{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.other","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]},{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874184,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"disabled-base-retune","hazard":false,"explicit":false,"priorAction":"allow","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"enabled":true}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"OTHER","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"enabled":true}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874184,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"explicit-severity-consent","hazard":false,"explicit":true,"priorAction":"deny","action":"allow","warnings":[],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"low","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"expected":[{"id":"coverage.block","category":"bash","severity":"low","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"],"allowDowngrade":true}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874184,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"silent-severity-downgrade","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[{"ruleId":"coverage.block","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter effective rule"}],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"message","ts":1791959874184,"from":"real-current-cascade","to":"moderator","topic":"scenario","body":{"id":"opaque-regex-broadening-without-proof","hazard":false,"explicit":false,"priorAction":"deny","action":"deny","warnings":[{"ruleId":"coverage.block","message":"overlay tried to weaken rule without allowDowngrade:true — keeping stricter effective rule"}],"effectiveRules":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"expected":[{"id":"coverage.block","category":"bash","severity":"critical","description":"protected classifier","match":{"kind":"regex","pattern":"BLOCK\\b","flags":"i","target":"command"},"appliesTo":["Bash","Shell"]}],"checks":{"effectiveRules":true,"warnings":true,"action":true,"inputOwnership":true},"correct":true}} +{"t":"score","ts":1791959874184,"scores":{"aegisUnsafeCoverageLossRate":0,"aegisCoverageRejectionRate":1,"aegisResolutionAccuracy":1,"pinnedBaseControlAccuracy":1,"aegisControlAccuracy":1,"aegisInputOwnership":1,"protectedBaseFixtureAccuracy":1,"explicitConsentAccuracy":1}} diff --git a/experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.receipt.json b/experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.receipt.json new file mode 100644 index 0000000..f2a0745 --- /dev/null +++ b/experiments/63-rule-overlay-coverage-consent/runs/occ-mv7qn439.receipt.json @@ -0,0 +1,72 @@ +{ + "runId": "occ-mv7qn439", + "harnessSha256": "sha256:5acc408f7c473e0ee849f015fd4609c41c2275e10dcba15c5960a5e68cff660b", + "package": { + "sha": "bc879d6c7fd213b49ef355b64bd83196098ffa0e", + "dirty": "", + "repo": "/Users/beauxwalton/projects/worktrees/aegis-2026-10-13-exp63", + "distSha256": "sha256:8f49d562746c16986d8331ad4ecd5c1e428e4a09788cd16ec9775cc135070597", + "manifest": [ + { + "file": "packages/aegis/dist/index.d.ts", + "sha256": "sha256:20a97822abaff94c58926dc9c84c478d2342dff458d3af7a044e65a88f614859" + }, + { + "file": "packages/aegis/dist/index.js", + "sha256": "sha256:8f49d562746c16986d8331ad4ecd5c1e428e4a09788cd16ec9775cc135070597" + }, + { + "file": "packages/aegis/dist/index.js.map", + "sha256": "sha256:2aa275cb3cedf526c945b287162d9912017f59c8c8ef7d95e555f86aa9ec5164" + }, + { + "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:0956e256aeb26a36a2c316ec89d02f8f02ed3ad0cee955ef90fde41ac9ba8b7a" + }, + { + "file": "packages/aegis/src/types.ts", + "sha256": "sha256:9faced4043810fe8ae3980944db5f52484650262a6c06825776d3faf5e412b7a" + } + ], + "mode": "real-built-public-api", + "config": "severityTable critical/high deny; medium ask; low allow; all other package defaults" + }, + "seed": "overlay-coverage-consent-v1", + "metrics": { + "aegisUnsafeCoverageLossRate": 0, + "aegisCoverageRejectionRate": 1, + "aegisResolutionAccuracy": 1, + "pinnedBaseControlAccuracy": 1, + "aegisControlAccuracy": 1, + "aegisInputOwnership": 1, + "protectedBaseFixtureAccuracy": 1, + "explicitConsentAccuracy": 1 + }, + "green": true, + "traceSha256": "sha256:d00ca47469183ac4f3e19f6662e631e343ce4523a1d95190449fd8d2946b2767", + "events": 37 +} diff --git a/experiments/63-rule-overlay-coverage-consent/verify-receipts.mjs b/experiments/63-rule-overlay-coverage-consent/verify-receipts.mjs new file mode 100644 index 0000000..d0d7d27 --- /dev/null +++ b/experiments/63-rule-overlay-coverage-consent/verify-receipts.mjs @@ -0,0 +1,52 @@ +import {readFileSync,readdirSync} from 'node:fs'; +import {createHash} from 'node:crypto'; +import {join} from 'node:path'; +import {isDeepStrictEqual} from 'node:util'; +import assert from 'node:assert/strict'; +const candidateRuntimeSha="bc879d6c7fd213b49ef355b64bd83196098ffa0e"; +const root=import.meta.dirname; +const hash=v=>`sha256:${createHash('sha256').update(v).digest('hex')}`; +const files=readdirSync(join(root,'runs')).filter(f=>f.endsWith('.receipt.json')).sort(); +const receipts=files.map(f=>JSON.parse(readFileSync(join(root,'runs',f),'utf8'))); +const baseline=receipts.filter(r=>r.package.sha==='4be84ed4aab018bee1b9a77b6012b9b97c966d1c'); +const candidate=receipts.filter(r=>r.package.sha===candidateRuntimeSha); +const target=process.argv.includes('--latest')?[receipts.at(-1)]:receipts; +for(const r of target){ + assert(r,'receipt required'); + const trace=readFileSync(join(root,'runs',`${r.runId}.jsonl`)); + assert.equal(hash(trace),r.traceSha256); + const events=trace.toString().trim().split('\n').map(JSON.parse); + assert.equal(events.length,r.events); + const meta=events.find(e=>e.t==='message'&&e.topic==='meta').body; + assert.deepEqual(meta.aegis,r.package); + assert.equal(meta.harnessSha256,r.harnessSha256); + assert.equal(hash(readFileSync(join(root,'src/main.ts'))),r.harnessSha256); + assert.equal(meta.seed,'overlay-coverage-consent-v1'); + assert.equal(meta.scenarios.length,25); + assert.equal(meta.scenarios.filter(s=>s.hazard).length,10); + assert.equal(meta.scenarios.filter(s=>s.explicit).length,3); + assert.equal(r.package.dirty,''); + assert(r.package.manifest.length>0); + const score=events.filter(e=>e.t==='score').at(-1).scores; + assert.deepEqual(score,r.metrics); + const verdict=Object.entries(score).every(([k,v])=>v===(k==='aegisUnsafeCoverageLossRate'?0:1)); + assert.equal(verdict,r.green); + const rows=events.filter(e=>e.t==='message'&&e.topic==='scenario'&&e.from==='real-current-cascade').map(e=>e.body); + const controls=events.filter(e=>e.t==='message'&&e.topic==='scenario'&&e.from==='pinned-effective-base').map(e=>e.body); + assert.equal(rows.length,25);assert.equal(controls.length,10);assert(controls.every(r=>r.correct&&r.action==='deny')); + assert.equal(rows.filter(r=>r.hazard&&r.action==='allow').length/10,score.aegisUnsafeCoverageLossRate); + assert.equal(rows.filter(r=>r.correct).length/25,score.aegisResolutionAccuracy); + assert.equal(rows.filter(r=>r.hazard&&r.checks.effectiveRules&&r.checks.warnings).length/10,score.aegisCoverageRejectionRate); + if(process.argv.includes('--latest')){assert(r.green,'latest rerun must actually be green');assert.equal(r.package.sha,candidateRuntimeSha);} +} +if(!process.argv.includes('--latest')){ + assert.equal(baseline.length,2);assert(candidate.length>=1); + const scenarioRows=r=>JSON.parse('['+readFileSync(join(root,'runs',`${r.runId}.jsonl`),'utf8').trim().split('\n').join(',')+']').filter(e=>e.t==='message'&&e.topic==='scenario').map(e=>e.body); + assert(isDeepStrictEqual(scenarioRows(baseline[0]),scenarioRows(baseline[1]))); + assert.deepEqual(baseline[0].package,baseline[1].package); + assert(baseline.every(r=>!r.green&&r.metrics.aegisUnsafeCoverageLossRate===1)); + assert(candidate.every(r=>r.green)); + const allMeta=r=>JSON.parse(readFileSync(join(root,'runs',`${r.runId}.jsonl`),'utf8').split('\n')[0]).body; + assert(receipts.every(r=>isDeepStrictEqual(allMeta(r).scenarios,allMeta(baseline[0]).scenarios))); +} +console.log(`exp63 exact receipts verified: ${target.length}; diagnostic baseline red preserved; ${process.argv.includes('--latest')?'fresh real-package rerun green':'committed before/after audited'}`); From b12a3b31dc62fda3cb4b8adb4926a15a53f7fb09 Mon Sep 17 00:00:00 2001 From: heybeaux Date: Tue, 13 Oct 2026 23:43:41 -0700 Subject: [PATCH 5/7] ci(exp63): isolate portable compiler from historical machine-local dependencies --- .github/workflows/exp63-evidence.yml | 14 +++++- .../README.md | 2 + .../ci/package-lock.json | 45 +++++++++++++++++++ .../ci/package.json | 8 ++++ 4 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 experiments/63-rule-overlay-coverage-consent/ci/package-lock.json create mode 100644 experiments/63-rule-overlay-coverage-consent/ci/package.json diff --git a/.github/workflows/exp63-evidence.yml b/.github/workflows/exp63-evidence.yml index 5c4ecbb..d9098b6 100644 --- a/.github/workflows/exp63-evidence.yml +++ b/.github/workflows/exp63-evidence.yml @@ -16,8 +16,18 @@ jobs: with: node-version: '22' cache: npm - - name: Install, build and type-check SwarmLab - run: npm ci && npm run build && npm run typecheck + cache-dependency-path: experiments/63-rule-overlay-coverage-consent/ci/package-lock.json + - name: Install portable experiment/core toolchain + # Older experiments retain machine-local file deps; do not rewrite unrelated packages. + run: | + npm ci --prefix experiments/63-rule-overlay-coverage-consent/ci --workspaces=false + ln -s experiments/63-rule-overlay-coverage-consent/ci/node_modules node_modules + mkdir -p node_modules/@swarmlab + ln -s "$GITHUB_WORKSPACE/core" node_modules/@swarmlab/core + - name: Build and type-check core plus new experiment + run: | + node_modules/.bin/tsc -b core experiments/63-rule-overlay-coverage-consent + node_modules/.bin/tsc -b --force core experiments/63-rule-overlay-coverage-consent - name: Verify committed corpus and exact exp63 receipts run: npm run verify:evidence && node experiments/63-rule-overlay-coverage-consent/verify-receipts.mjs - name: Checkout exact evidence-backed Aegis runtime (not moving main) diff --git a/experiments/63-rule-overlay-coverage-consent/README.md b/experiments/63-rule-overlay-coverage-consent/README.md index 7053ef3..9a00513 100644 --- a/experiments/63-rule-overlay-coverage-consent/README.md +++ b/experiments/63-rule-overlay-coverage-consent/README.md @@ -14,3 +14,5 @@ This tests cascade authority BEFORE compilation, distinct from RT48 in-flight co ## Run `npm install && npm run build` then `AEGIS_REPO=/path/to/real/aegis node experiments/63-rule-overlay-coverage-consent/dist/main.js`. Aegis must be built with compatible pnpm10 (`corepack pnpm@10.9.0`). Inspect receipt.green and all metrics; a diagnostic red has exit0 intentionally. CI validates actual desired state, not command exit alone. New PR CI must run this fresh package integration plus corpus verification. + +CI portability: root npm ci includes historical absolute file dependencies into unrelated stack checkouts. The new executable CI therefore uses a pinned isolated TypeScript/Node-types toolchain to build/typecheck core+exp63, replay-verifies the ENTIRE static evidence corpus and exp63 receipts, and freshly reruns exp63 against the exact committed real Aegis runtime. Full-repo build/typecheck are additionally verified locally; no unrelated stack dependencies are rewritten. diff --git a/experiments/63-rule-overlay-coverage-consent/ci/package-lock.json b/experiments/63-rule-overlay-coverage-consent/ci/package-lock.json new file mode 100644 index 0000000..f782658 --- /dev/null +++ b/experiments/63-rule-overlay-coverage-consent/ci/package-lock.json @@ -0,0 +1,45 @@ +{ + "name": "exp63-portable-ci-tools", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "exp63-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/63-rule-overlay-coverage-consent/ci/package.json b/experiments/63-rule-overlay-coverage-consent/ci/package.json new file mode 100644 index 0000000..a397acd --- /dev/null +++ b/experiments/63-rule-overlay-coverage-consent/ci/package.json @@ -0,0 +1,8 @@ +{ + "name": "exp63-portable-ci-tools", + "private": true, + "devDependencies": { + "typescript": "5.9.3", + "@types/node": "22.19.15" + } +} From d0ca6d9a98db3064b61125ac7952a236a4401eab Mon Sep 17 00:00:00 2001 From: heybeaux Date: Tue, 13 Oct 2026 23:45:12 -0700 Subject: [PATCH 6/7] docs(exp63): link paired candidates and exact verification scope --- CLAIMS.json | 5 ++++- JOURNAL.md | 2 ++ SYNTHESIS.md | 2 ++ docs/EVIDENCE-LEDGER.md | 2 ++ experiments/63-rule-overlay-coverage-consent/README.md | 2 ++ 5 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CLAIMS.json b/CLAIMS.json index 0db13f9..40467c6 100644 --- a/CLAIMS.json +++ b/CLAIMS.json @@ -6483,7 +6483,10 @@ "commits": [ "bc879d6c7fd213b49ef355b64bd83196098ffa0e" ], - "prs": [], + "prs": [ + "https://github.com/heybeaux/aegis/pull/69", + "https://github.com/heybeaux/swarmlab/pull/52" + ], "dirtyState": "clean on admitted runtime result" } ], diff --git a/JOURNAL.md b/JOURNAL.md index 0664079..f1a92be 100644 --- a/JOURNAL.md +++ b/JOURNAL.md @@ -319,3 +319,5 @@ Aegis runtime `bc879d6c7fd213b49ef355b64bd83196098ffa0e` compares enabled classi This tests cascade authority BEFORE compilation, distinct from RT48 in-flight config drift and RT52 declared/cache binding. No regex-language inclusion proof: even safe opaque broadening needs explicit review. No post-merge alias isolation, sandbox execution, learned predictor or production incident claim. Host owns trusted overlays, intentional consent and safe action execution. Prior exp60/61/62 candidates remain unmerged and separate. Explicit authority tightening needs migration review; local evidence green is not remote CI/merge confirmation. Stored old evidence is regression, not novel work. Setup: default pnpm8 rejected lockfile9 before install; used already available corepack pnpm10.9.0 matching CI, no lockfile recreation. Both primary dirty checkouts untouched; dated origin/main worktrees. No .acr edits; Territory refresh not required. + +RT53 linked candidates: [Aegis69](https://github.com/heybeaux/aegis/pull/69) / [SwarmLab52](https://github.com/heybeaux/swarmlab/pull/52). Local1144 tests + Aegis stored50/50; SwarmLab49 claims105 traces983 assertions; exact clean-worktree CI rehearsal green. Remote CI pending; NOT merged; migration review required. Stored gate range is50 cases throughRT53 with50–52 absent, not53/53 or certification of prior candidates. diff --git a/SYNTHESIS.md b/SYNTHESIS.md index 6229bc4..d817388 100644 --- a/SYNTHESIS.md +++ b/SYNTHESIS.md @@ -1513,3 +1513,5 @@ Pre-registration `c8bc120` preceded implementation and observations; pre-observa Aegis runtime `bc879d6c7fd213b49ef355b64bd83196098ffa0e` compares enabled classifier kind/pattern/target/effective flags and case-sensitive tool-set containment at mergeLayers. Opaque matcher replacements and tool contractions require consent on THIS overlay; warning retains entire preceding effective rule. Flag order/empty equivalence, set-equivalent/expanded tools, metadata, disabled-base re-enable, explicit retunes and insertion order preserved. **Same unchanged harness/seed/scenarios** `occ-mv7qn439`: unsafe allow **0/10**, coverage rejection **10/10**, exact resolution **25/25**, all secondary metrics **1**. Three full replay-verified37-event traces plus source/dist manifests and SHA-256 receipts committed. Focused tests **13 red/6 pass ->19 green**; no thresholds moved. This tests cascade authority BEFORE compilation, distinct from RT48 in-flight config drift and RT52 declared/cache binding. No regex-language inclusion proof: even safe opaque broadening needs explicit review. No post-merge alias isolation, sandbox execution, learned predictor or production incident claim. Host owns trusted overlays, intentional consent and safe action execution. Prior exp60/61/62 candidates remain unmerged and separate. Explicit authority tightening needs migration review; local evidence green is not remote CI/merge confirmation. Stored old evidence is regression, not novel work. + +RT53 linked candidates: [Aegis69](https://github.com/heybeaux/aegis/pull/69) / [SwarmLab52](https://github.com/heybeaux/swarmlab/pull/52). Local1144 tests + Aegis stored50/50; SwarmLab49 claims105 traces983 assertions; exact clean-worktree CI rehearsal green. Remote CI pending; NOT merged; migration review required. Stored gate range is50 cases throughRT53 with50–52 absent, not53/53 or certification of prior candidates. diff --git a/docs/EVIDENCE-LEDGER.md b/docs/EVIDENCE-LEDGER.md index ad6cdb5..0a142c9 100644 --- a/docs/EVIDENCE-LEDGER.md +++ b/docs/EVIDENCE-LEDGER.md @@ -200,3 +200,5 @@ checks do not expand the original experiment scope or certify post-return atomic ### RT53 / exp63 Pre-registration c8bc120; occ-mv7qlhb7 / occ-mv7qlhdk red -> occ-mv7qn439 green; exact source/dist/trace hashes in adjacent .receipt.json; frozen harness sha256:5acc408f7c473e0ee849f015fd4609c41c2275e10dcba15c5960a5e68cff660b. Real Aegis runtime bc879d6c7fd213b49ef355b64bd83196098ffa0e; candidate only, PR/CI state tracked in nightly ledger. + +RT53 linked candidates: [Aegis69](https://github.com/heybeaux/aegis/pull/69) / [SwarmLab52](https://github.com/heybeaux/swarmlab/pull/52). Local1144 tests + Aegis stored50/50; SwarmLab49 claims105 traces983 assertions; exact clean-worktree CI rehearsal green. Remote CI pending; NOT merged; migration review required. Stored gate range is50 cases throughRT53 with50–52 absent, not53/53 or certification of prior candidates. diff --git a/experiments/63-rule-overlay-coverage-consent/README.md b/experiments/63-rule-overlay-coverage-consent/README.md index 9a00513..e9f0ea2 100644 --- a/experiments/63-rule-overlay-coverage-consent/README.md +++ b/experiments/63-rule-overlay-coverage-consent/README.md @@ -16,3 +16,5 @@ This tests cascade authority BEFORE compilation, distinct from RT48 in-flight co `npm install && npm run build` then `AEGIS_REPO=/path/to/real/aegis node experiments/63-rule-overlay-coverage-consent/dist/main.js`. Aegis must be built with compatible pnpm10 (`corepack pnpm@10.9.0`). Inspect receipt.green and all metrics; a diagnostic red has exit0 intentionally. CI validates actual desired state, not command exit alone. New PR CI must run this fresh package integration plus corpus verification. CI portability: root npm ci includes historical absolute file dependencies into unrelated stack checkouts. The new executable CI therefore uses a pinned isolated TypeScript/Node-types toolchain to build/typecheck core+exp63, replay-verifies the ENTIRE static evidence corpus and exp63 receipts, and freshly reruns exp63 against the exact committed real Aegis runtime. Full-repo build/typecheck are additionally verified locally; no unrelated stack dependencies are rewritten. + +RT53 linked candidates: [Aegis69](https://github.com/heybeaux/aegis/pull/69) / [SwarmLab52](https://github.com/heybeaux/swarmlab/pull/52). Local1144 tests + Aegis stored50/50; SwarmLab49 claims105 traces983 assertions; exact clean-worktree CI rehearsal green. Remote CI pending; NOT merged; migration review required. Stored gate range is50 cases throughRT53 with50–52 absent, not53/53 or certification of prior candidates. From a0669508bc36c23b586e39025654bec115fbbc61 Mon Sep 17 00:00:00 2001 From: heybeaux Date: Tue, 13 Oct 2026 23:58:35 -0700 Subject: [PATCH 7/7] fix(exp63): verify fresh runs and recompute complete receipt evidence --- .github/workflows/exp63-evidence.yml | 6 +- JOURNAL.md | 6 + SYNTHESIS.md | 6 + docs/EVIDENCE-LEDGER.md | 6 + .../README.md | 6 + .../run-and-verify.mjs | 13 ++ .../verify-receipts.mjs | 152 ++++++++++++------ .../verify-receipts.test.mjs | 27 ++++ 8 files changed, 170 insertions(+), 52 deletions(-) create mode 100644 experiments/63-rule-overlay-coverage-consent/run-and-verify.mjs create mode 100644 experiments/63-rule-overlay-coverage-consent/verify-receipts.test.mjs diff --git a/.github/workflows/exp63-evidence.yml b/.github/workflows/exp63-evidence.yml index d9098b6..791f762 100644 --- a/.github/workflows/exp63-evidence.yml +++ b/.github/workflows/exp63-evidence.yml @@ -29,7 +29,7 @@ jobs: node_modules/.bin/tsc -b core experiments/63-rule-overlay-coverage-consent node_modules/.bin/tsc -b --force core experiments/63-rule-overlay-coverage-consent - name: Verify committed corpus and exact exp63 receipts - run: npm run verify:evidence && node experiments/63-rule-overlay-coverage-consent/verify-receipts.mjs + run: npm run verify:evidence && node --test experiments/63-rule-overlay-coverage-consent/verify-receipts.test.mjs && node experiments/63-rule-overlay-coverage-consent/verify-receipts.mjs - name: Checkout exact evidence-backed Aegis runtime (not moving main) uses: actions/checkout@v4 with: @@ -41,6 +41,6 @@ jobs: run: pnpm install --frozen-lockfile && pnpm --filter @heybeaux/lattice-aegis build - name: Rerun exact frozen exp63 and inspect metrics, not exit code run: | - AEGIS_REPO="$GITHUB_WORKSPACE/.aegis-candidate" node experiments/63-rule-overlay-coverage-consent/dist/main.js > "$RUNNER_TEMP/exp63.log" + AEGIS_REPO="$GITHUB_WORKSPACE/.aegis-candidate" node experiments/63-rule-overlay-coverage-consent/run-and-verify.mjs > "$RUNNER_TEMP/exp63.log" cat "$RUNNER_TEMP/exp63.log" - node experiments/63-rule-overlay-coverage-consent/verify-receipts.mjs --latest + AEGIS_REPO="$GITHUB_WORKSPACE/.aegis-candidate" node --test experiments/63-rule-overlay-coverage-consent/verify-receipts.test.mjs diff --git a/JOURNAL.md b/JOURNAL.md index f1a92be..b213199 100644 --- a/JOURNAL.md +++ b/JOURNAL.md @@ -321,3 +321,9 @@ This tests cascade authority BEFORE compilation, distinct from RT48 in-flight co Setup: default pnpm8 rejected lockfile9 before install; used already available corepack pnpm10.9.0 matching CI, no lockfile recreation. Both primary dirty checkouts untouched; dated origin/main worktrees. No .acr edits; Territory refresh not required. RT53 linked candidates: [Aegis69](https://github.com/heybeaux/aegis/pull/69) / [SwarmLab52](https://github.com/heybeaux/swarmlab/pull/52). Local1144 tests + Aegis stored50/50; SwarmLab49 claims105 traces983 assertions; exact clean-worktree CI rehearsal green. Remote CI pending; NOT merged; migration review required. Stored gate range is50 cases throughRT53 with50–52 absent, not53/53 or certification of prior candidates. + +### Same-experiment observable evidence-verifier audit + +Independent verification reproduced false acceptance: bare `--latest` certified the existing committed green as fresh; missing secondary metrics and altered action/effective-rule rows were accepted when stored self-check booleans stayed green. This is evidence tooling, NOT a new nightly experiment or an Aegis policy defect. The original three traces and all thresholds remain unchanged. + +Receipt verification now pins the frozen scenario/harness contract, requires the complete exact metric set, independently recomputes row field checks and all eight metrics, rejects duplicate/omitted or relabeled scenarios, and inspects every live source/dist hash. New `run-and-verify.mjs` requires exactly one newly produced receipt and checks its exact ID against prior IDs and invocation start; bare `--latest` fails closed. Fifteen verifier regressions cover stale-run acceptance, altered trace checks and live artifact mismatch. The exact unchanged experiment reran green in a clean real-Aegisbc879d6 worktree; audit trace remains non-admitted. Core/experiment build/typecheck, full evidence corpus, and all15 verifier tests green. Runtime still byte-identical to bc879d6; no thresholds tuned, no `.acr` changes, migration hold retained. diff --git a/SYNTHESIS.md b/SYNTHESIS.md index d817388..d14363e 100644 --- a/SYNTHESIS.md +++ b/SYNTHESIS.md @@ -1515,3 +1515,9 @@ Aegis runtime `bc879d6c7fd213b49ef355b64bd83196098ffa0e` compares enabled classi This tests cascade authority BEFORE compilation, distinct from RT48 in-flight config drift and RT52 declared/cache binding. No regex-language inclusion proof: even safe opaque broadening needs explicit review. No post-merge alias isolation, sandbox execution, learned predictor or production incident claim. Host owns trusted overlays, intentional consent and safe action execution. Prior exp60/61/62 candidates remain unmerged and separate. Explicit authority tightening needs migration review; local evidence green is not remote CI/merge confirmation. Stored old evidence is regression, not novel work. RT53 linked candidates: [Aegis69](https://github.com/heybeaux/aegis/pull/69) / [SwarmLab52](https://github.com/heybeaux/swarmlab/pull/52). Local1144 tests + Aegis stored50/50; SwarmLab49 claims105 traces983 assertions; exact clean-worktree CI rehearsal green. Remote CI pending; NOT merged; migration review required. Stored gate range is50 cases throughRT53 with50–52 absent, not53/53 or certification of prior candidates. + +### Same-experiment observable evidence-verifier audit + +Independent verification reproduced false acceptance: bare `--latest` certified the existing committed green as fresh; missing secondary metrics and altered action/effective-rule rows were accepted when stored self-check booleans stayed green. This is evidence tooling, NOT a new nightly experiment or an Aegis policy defect. The original three traces and all thresholds remain unchanged. + +Receipt verification now pins the frozen scenario/harness contract, requires the complete exact metric set, independently recomputes row field checks and all eight metrics, rejects duplicate/omitted or relabeled scenarios, and inspects every live source/dist hash. New `run-and-verify.mjs` requires exactly one newly produced receipt and checks its exact ID against prior IDs and invocation start; bare `--latest` fails closed. Fifteen verifier regressions cover stale-run acceptance, altered trace checks and live artifact mismatch. The exact unchanged experiment reran green in a clean real-Aegisbc879d6 worktree; audit trace remains non-admitted. Core/experiment build/typecheck, full evidence corpus, and all15 verifier tests green. Runtime still byte-identical to bc879d6; no thresholds tuned, no `.acr` changes, migration hold retained. diff --git a/docs/EVIDENCE-LEDGER.md b/docs/EVIDENCE-LEDGER.md index 0a142c9..aa0632b 100644 --- a/docs/EVIDENCE-LEDGER.md +++ b/docs/EVIDENCE-LEDGER.md @@ -202,3 +202,9 @@ checks do not expand the original experiment scope or certify post-return atomic Pre-registration c8bc120; occ-mv7qlhb7 / occ-mv7qlhdk red -> occ-mv7qn439 green; exact source/dist/trace hashes in adjacent .receipt.json; frozen harness sha256:5acc408f7c473e0ee849f015fd4609c41c2275e10dcba15c5960a5e68cff660b. Real Aegis runtime bc879d6c7fd213b49ef355b64bd83196098ffa0e; candidate only, PR/CI state tracked in nightly ledger. RT53 linked candidates: [Aegis69](https://github.com/heybeaux/aegis/pull/69) / [SwarmLab52](https://github.com/heybeaux/swarmlab/pull/52). Local1144 tests + Aegis stored50/50; SwarmLab49 claims105 traces983 assertions; exact clean-worktree CI rehearsal green. Remote CI pending; NOT merged; migration review required. Stored gate range is50 cases throughRT53 with50–52 absent, not53/53 or certification of prior candidates. + +### Same-experiment observable evidence-verifier audit + +Independent verification reproduced false acceptance: bare `--latest` certified the existing committed green as fresh; missing secondary metrics and altered action/effective-rule rows were accepted when stored self-check booleans stayed green. This is evidence tooling, NOT a new nightly experiment or an Aegis policy defect. The original three traces and all thresholds remain unchanged. + +Receipt verification now pins the frozen scenario/harness contract, requires the complete exact metric set, independently recomputes row field checks and all eight metrics, rejects duplicate/omitted or relabeled scenarios, and inspects every live source/dist hash. New `run-and-verify.mjs` requires exactly one newly produced receipt and checks its exact ID against prior IDs and invocation start; bare `--latest` fails closed. Fifteen verifier regressions cover stale-run acceptance, altered trace checks and live artifact mismatch. The exact unchanged experiment reran green in a clean real-Aegisbc879d6 worktree; audit trace remains non-admitted. Core/experiment build/typecheck, full evidence corpus, and all15 verifier tests green. Runtime still byte-identical to bc879d6; no thresholds tuned, no `.acr` changes, migration hold retained. diff --git a/experiments/63-rule-overlay-coverage-consent/README.md b/experiments/63-rule-overlay-coverage-consent/README.md index e9f0ea2..c925824 100644 --- a/experiments/63-rule-overlay-coverage-consent/README.md +++ b/experiments/63-rule-overlay-coverage-consent/README.md @@ -18,3 +18,9 @@ This tests cascade authority BEFORE compilation, distinct from RT48 in-flight co CI portability: root npm ci includes historical absolute file dependencies into unrelated stack checkouts. The new executable CI therefore uses a pinned isolated TypeScript/Node-types toolchain to build/typecheck core+exp63, replay-verifies the ENTIRE static evidence corpus and exp63 receipts, and freshly reruns exp63 against the exact committed real Aegis runtime. Full-repo build/typecheck are additionally verified locally; no unrelated stack dependencies are rewritten. RT53 linked candidates: [Aegis69](https://github.com/heybeaux/aegis/pull/69) / [SwarmLab52](https://github.com/heybeaux/swarmlab/pull/52). Local1144 tests + Aegis stored50/50; SwarmLab49 claims105 traces983 assertions; exact clean-worktree CI rehearsal green. Remote CI pending; NOT merged; migration review required. Stored gate range is50 cases throughRT53 with50–52 absent, not53/53 or certification of prior candidates. + +### Same-experiment observable evidence-verifier audit + +Independent verification reproduced false acceptance: bare `--latest` certified the existing committed green as fresh; missing secondary metrics and altered action/effective-rule rows were accepted when stored self-check booleans stayed green. This is evidence tooling, NOT a new nightly experiment or an Aegis policy defect. The original three traces and all thresholds remain unchanged. + +Receipt verification now pins the frozen scenario/harness contract, requires the complete exact metric set, independently recomputes row field checks and all eight metrics, rejects duplicate/omitted or relabeled scenarios, and inspects every live source/dist hash. New `run-and-verify.mjs` requires exactly one newly produced receipt and checks its exact ID against prior IDs and invocation start; bare `--latest` fails closed. Fifteen verifier regressions cover stale-run acceptance, altered trace checks and live artifact mismatch. The exact unchanged experiment reran green in a clean real-Aegisbc879d6 worktree; audit trace remains non-admitted. Core/experiment build/typecheck, full evidence corpus, and all15 verifier tests green. Runtime still byte-identical to bc879d6; no thresholds tuned, no `.acr` changes, migration hold retained. diff --git a/experiments/63-rule-overlay-coverage-consent/run-and-verify.mjs b/experiments/63-rule-overlay-coverage-consent/run-and-verify.mjs new file mode 100644 index 0000000..d37215f --- /dev/null +++ b/experiments/63-rule-overlay-coverage-consent/run-and-verify.mjs @@ -0,0 +1,13 @@ +import { readdirSync } from 'node:fs'; +import { join } from 'node:path'; +import { execFileSync } from 'node:child_process'; +import assert from 'node:assert/strict'; +const root=import.meta.dirname,dir=join(root,'runs'); +const before=readdirSync(dir).filter(f=>f.endsWith('.receipt.json')); +const startedAt=Date.now(); +// Preserve the complete runner output for the source/dist receipt and metric audit. +execFileSync(process.execPath,[join(root,'dist/main.js')],{stdio:'inherit',env:process.env}); +const fresh=readdirSync(dir).filter(f=>f.endsWith('.receipt.json')&&!before.includes(f)); +assert.equal(fresh.length,1,'runner must produce exactly one NEW receipt'); +const id=fresh[0].replace('.receipt.json',''); +execFileSync(process.execPath,[join(root,'verify-receipts.mjs'),'--latest'],{stdio:'inherit',env:{...process.env,EXP63_FRESH_RUN_ID:id,EXP63_PREVIOUS_RUN_IDS:JSON.stringify(before.map(f=>f.replace('.receipt.json',''))),EXP63_STARTED_AT_MS:String(startedAt)}}); diff --git a/experiments/63-rule-overlay-coverage-consent/verify-receipts.mjs b/experiments/63-rule-overlay-coverage-consent/verify-receipts.mjs index d0d7d27..dc732aa 100644 --- a/experiments/63-rule-overlay-coverage-consent/verify-receipts.mjs +++ b/experiments/63-rule-overlay-coverage-consent/verify-receipts.mjs @@ -1,52 +1,106 @@ -import {readFileSync,readdirSync} from 'node:fs'; -import {createHash} from 'node:crypto'; -import {join} from 'node:path'; -import {isDeepStrictEqual} from 'node:util'; import assert from 'node:assert/strict'; -const candidateRuntimeSha="bc879d6c7fd213b49ef355b64bd83196098ffa0e"; -const root=import.meta.dirname; -const hash=v=>`sha256:${createHash('sha256').update(v).digest('hex')}`; -const files=readdirSync(join(root,'runs')).filter(f=>f.endsWith('.receipt.json')).sort(); -const receipts=files.map(f=>JSON.parse(readFileSync(join(root,'runs',f),'utf8'))); -const baseline=receipts.filter(r=>r.package.sha==='4be84ed4aab018bee1b9a77b6012b9b97c966d1c'); -const candidate=receipts.filter(r=>r.package.sha===candidateRuntimeSha); -const target=process.argv.includes('--latest')?[receipts.at(-1)]:receipts; -for(const r of target){ - assert(r,'receipt required'); - const trace=readFileSync(join(root,'runs',`${r.runId}.jsonl`)); - assert.equal(hash(trace),r.traceSha256); - const events=trace.toString().trim().split('\n').map(JSON.parse); - assert.equal(events.length,r.events); - const meta=events.find(e=>e.t==='message'&&e.topic==='meta').body; - assert.deepEqual(meta.aegis,r.package); - assert.equal(meta.harnessSha256,r.harnessSha256); - assert.equal(hash(readFileSync(join(root,'src/main.ts'))),r.harnessSha256); - assert.equal(meta.seed,'overlay-coverage-consent-v1'); - assert.equal(meta.scenarios.length,25); - assert.equal(meta.scenarios.filter(s=>s.hazard).length,10); - assert.equal(meta.scenarios.filter(s=>s.explicit).length,3); - assert.equal(r.package.dirty,''); - assert(r.package.manifest.length>0); - const score=events.filter(e=>e.t==='score').at(-1).scores; - assert.deepEqual(score,r.metrics); - const verdict=Object.entries(score).every(([k,v])=>v===(k==='aegisUnsafeCoverageLossRate'?0:1)); - assert.equal(verdict,r.green); - const rows=events.filter(e=>e.t==='message'&&e.topic==='scenario'&&e.from==='real-current-cascade').map(e=>e.body); - const controls=events.filter(e=>e.t==='message'&&e.topic==='scenario'&&e.from==='pinned-effective-base').map(e=>e.body); - assert.equal(rows.length,25);assert.equal(controls.length,10);assert(controls.every(r=>r.correct&&r.action==='deny')); - assert.equal(rows.filter(r=>r.hazard&&r.action==='allow').length/10,score.aegisUnsafeCoverageLossRate); - assert.equal(rows.filter(r=>r.correct).length/25,score.aegisResolutionAccuracy); - assert.equal(rows.filter(r=>r.hazard&&r.checks.effectiveRules&&r.checks.warnings).length/10,score.aegisCoverageRejectionRate); - if(process.argv.includes('--latest')){assert(r.green,'latest rerun must actually be green');assert.equal(r.package.sha,candidateRuntimeSha);} +import { createHash } from 'node:crypto'; +import { execFileSync } from 'node:child_process'; +import { readFileSync, readdirSync } from 'node:fs'; +import { join, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { isDeepStrictEqual } from 'node:util'; + +export const candidateRuntimeSha = 'bc879d6c7fd213b49ef355b64bd83196098ffa0e'; +const baselineSha = '4be84ed4aab018bee1b9a77b6012b9b97c966d1c'; +const frozenHarness = 'sha256:5acc408f7c473e0ee849f015fd4609c41c2275e10dcba15c5960a5e68cff660b'; +const frozenPlan = 'sha256:11541dc2489bd3c73b204b908e09b256578bca6e029a95a653be3584fd7aa4b8'; +const keys = ['aegisUnsafeCoverageLossRate','aegisCoverageRejectionRate','aegisResolutionAccuracy','pinnedBaseControlAccuracy','aegisControlAccuracy','aegisInputOwnership','protectedBaseFixtureAccuracy','explicitConsentAccuracy']; +const sha = v => `sha256:${createHash('sha256').update(v).digest('hex')}`; +const hex = v => typeof v === 'string' && /^sha256:[a-f0-9]{64}$/.test(v); +const verdict = metrics => keys.every(k => metrics[k] === (k === 'aegisUnsafeCoverageLossRate' ? 0 : 1)); +const sameKeys = (value, expected) => assert.deepEqual(Object.keys(value).sort(), [...expected].sort()); + +/** Recompute facts from the complete serialized rows; no policy or LLM evaluator. */ +export function verifyReceipt(receipt, bytes, source) { + assert(receipt && typeof receipt === 'object', 'receipt required'); + assert.equal(sha(bytes), receipt.traceSha256); + const events = bytes.toString().trim().split('\n').map(line => JSON.parse(line)); + assert.equal(events.length, 37); assert.equal(receipt.events, 37); + assert(events.every(e => ['message','score'].includes(e.t) && Number.isFinite(e.ts))); + const metadata = events.filter(e => e.t === 'message' && e.topic === 'meta'); + assert.equal(metadata.length, 1); + const meta = metadata[0].body; + assert.equal(meta.experiment, '63-rule-overlay-coverage-consent'); + assert.equal(meta.runId, receipt.runId); + assert.equal(receipt.seed, 'overlay-coverage-consent-v1'); assert.equal(meta.seed, receipt.seed); + assert.equal(meta.holdout, 'reserved-unused-no-tuning'); + assert.equal(sha(source), frozenHarness); assert.equal(receipt.harnessSha256, frozenHarness); assert.equal(meta.harnessSha256, frozenHarness); + assert.equal(sha(JSON.stringify(meta.scenarios)), frozenPlan, 'scenario plan must be the pre-registered frozen plan'); + assert.deepEqual(meta.aegis, receipt.package); + assert([baselineSha,candidateRuntimeSha].includes(receipt.package.sha)); + assert.equal(receipt.package.dirty, ''); + assert.equal(receipt.package.mode, 'real-built-public-api'); + assert.equal(receipt.package.config, 'severityTable critical/high deny; medium ask; low allow; all other package defaults'); + const expectedFiles = ['packages/aegis/dist/index.d.ts','packages/aegis/dist/index.js','packages/aegis/dist/index.js.map','packages/aegis/src/eval/evaluate.ts','packages/aegis/src/eval/preprocess.ts','packages/aegis/src/eval/safe-command.ts','packages/aegis/src/eval/source-policy-checkpoint.ts','packages/aegis/src/index.ts','packages/aegis/src/rules/loader.ts','packages/aegis/src/rules/merge.ts','packages/aegis/src/types.ts']; + assert.deepEqual(receipt.package.manifest.map(m=>m.file).sort(), [...expectedFiles].sort()); + assert(receipt.package.manifest.every(m=>hex(m.sha256))); + assert.equal(receipt.package.distSha256, receipt.package.manifest.find(m=>m.file==='packages/aegis/dist/index.js').sha256); + const scores=events.filter(e=>e.t==='score'); assert.equal(scores.length, 1); + sameKeys(receipt.metrics,keys); assert.deepEqual(scores[0].scores,receipt.metrics); + const rows=events.filter(e=>e.t==='message'&&e.topic==='scenario'&&e.from==='real-current-cascade').map(e=>e.body); + const controls=events.filter(e=>e.t==='message'&&e.topic==='scenario'&&e.from==='pinned-effective-base').map(e=>e.body); + assert.equal(rows.length,25); assert.equal(controls.length,10); + const hazardRows=[],controlRows=[],explicitRows=[]; + for(let i=0;iw.ruleId===s.layers.at(-1)[0].id&&typeof w.message==='string'&&w.message.includes('allowDowngrade')),action:row.action===s.action,inputOwnership:row.checks.inputOwnership}; + assert.equal(typeof checks.inputOwnership,'boolean'); sameKeys(row.checks,Object.keys(checks)); + assert.deepEqual(row.checks,checks,'stored checks must agree with inspected fields'); + assert.equal(row.correct,Object.values(checks).every(Boolean)); + (s.hazard?hazardRows:controlRows).push(row); if(row.explicit)explicitRows.push(row); + } + assert.equal(hazardRows.length,10);assert.equal(explicitRows.length,3); + controls.forEach((c,i)=>{assert.equal(c.id,hazardRows[i].id);assert.equal(c.action,'deny');assert.equal(c.correct,true);}); + const metrics={aegisUnsafeCoverageLossRate:hazardRows.filter(r=>r.action==='allow').length/10,aegisCoverageRejectionRate:hazardRows.filter(r=>r.checks.effectiveRules&&r.checks.warnings).length/10,aegisResolutionAccuracy:rows.filter(r=>r.correct).length/25,pinnedBaseControlAccuracy:controls.filter(r=>r.correct&&r.action==='deny').length/10,aegisControlAccuracy:controlRows.filter(r=>r.correct).length/15,aegisInputOwnership:Number(rows.every(r=>r.checks.inputOwnership)),protectedBaseFixtureAccuracy:hazardRows.filter(r=>r.priorAction==='deny').length/10,explicitConsentAccuracy:explicitRows.filter(r=>r.correct&&r.action==='allow').length/3}; + assert.deepEqual(receipt.metrics,metrics);assert.equal(receipt.green,verdict(metrics)); + if(receipt.package.sha===baselineSha){assert.equal(receipt.green,false);assert.equal(metrics.aegisUnsafeCoverageLossRate,1);}else assert.equal(receipt.green,true); + return {events,meta,rows,controls}; } -if(!process.argv.includes('--latest')){ - assert.equal(baseline.length,2);assert(candidate.length>=1); - const scenarioRows=r=>JSON.parse('['+readFileSync(join(root,'runs',`${r.runId}.jsonl`),'utf8').trim().split('\n').join(',')+']').filter(e=>e.t==='message'&&e.topic==='scenario').map(e=>e.body); - assert(isDeepStrictEqual(scenarioRows(baseline[0]),scenarioRows(baseline[1]))); - assert.deepEqual(baseline[0].package,baseline[1].package); - assert(baseline.every(r=>!r.green&&r.metrics.aegisUnsafeCoverageLossRate===1)); - assert(candidate.every(r=>r.green)); - const allMeta=r=>JSON.parse(readFileSync(join(root,'runs',`${r.runId}.jsonl`),'utf8').split('\n')[0]).body; - assert(receipts.every(r=>isDeepStrictEqual(allMeta(r).scenarios,allMeta(baseline[0]).scenarios))); + +export function verifyLivePackage(receipt, repo) { + assert(repo,'AEGIS_REPO required for fresh verification'); + assert.equal(resolve(repo),resolve(receipt.package.repo)); + assert.equal(execFileSync('git',['-C',repo,'rev-parse','HEAD'],{encoding:'utf8'}).trim(),candidateRuntimeSha); + assert.equal(execFileSync('git',['-C',repo,'status','--porcelain'],{encoding:'utf8'}),''); + for(const m of receipt.package.manifest)assert.equal(sha(readFileSync(join(repo,m.file))),m.sha256,`live artifact mismatch: ${m.file}`); } -console.log(`exp63 exact receipts verified: ${target.length}; diagnostic baseline red preserved; ${process.argv.includes('--latest')?'fresh real-package rerun green':'committed before/after audited'}`); + +export function verifyFreshRun(receipt, excludedIds, startedAtMs) { + assert(Array.isArray(excludedIds)); assert(!excludedIds.includes(receipt.runId),'fresh verification cannot reuse an earlier receipt'); + assert(Number.isFinite(startedAtMs)); + const runMs=parseInt(receipt.runId.replace(/^occ-/,''),36); + assert(Number.isSafeInteger(runMs)&&runMs>=startedAtMs,'run must have started in this invocation'); + assert.equal(receipt.package.sha,candidateRuntimeSha);assert.equal(receipt.green,true); +} + +function main() { + const root=fileURLToPath(new URL('.',import.meta.url)); + const source=readFileSync(join(root,'src/main.ts')); + const files=readdirSync(join(root,'runs')).filter(f=>f.endsWith('.receipt.json')).sort(); + const receipts=files.map(f=>JSON.parse(readFileSync(join(root,'runs',f),'utf8'))); + const latest=process.argv.includes('--latest'); + if(latest){ + const id=process.env.EXP63_FRESH_RUN_ID,excluded=process.env.EXP63_PREVIOUS_RUN_IDS,started=process.env.EXP63_STARTED_AT_MS; + assert(id&&excluded&&started,'--latest requires exact fresh run ID, prior IDs, start time and AEGIS_REPO'); + const receipt=receipts.find(r=>r.runId===id);assert(receipt,'exact fresh run receipt missing'); + verifyReceipt(receipt,readFileSync(join(root,'runs',`${id}.jsonl`)),source); + verifyFreshRun(receipt,JSON.parse(excluded),Number(started));verifyLivePackage(receipt,process.env.AEGIS_REPO); + console.log(`exp63 fresh exact run verified: ${id}; complete metrics and live source/dist manifest green`); + }else{ + const parsed=receipts.map(r=>verifyReceipt(r,readFileSync(join(root,'runs',`${r.runId}.jsonl`)),source)); + const bases=receipts.map((r,i)=>({r,p:parsed[i]})).filter(v=>v.r.package.sha===baselineSha); + assert.equal(bases.length,2);assert(receipts.some(r=>r.package.sha===candidateRuntimeSha)); + assert.deepEqual(bases[0].p.rows,bases[1].p.rows);assert.deepEqual(bases[0].p.controls,bases[1].p.controls);assert.deepEqual(bases[0].r.package,bases[1].r.package); + console.log(`exp63 exact committed receipts verified: ${receipts.length}; frozen red preserved and all metrics recomputed`); + } +} +if(process.argv[1]&&resolve(process.argv[1])===fileURLToPath(import.meta.url))main(); diff --git a/experiments/63-rule-overlay-coverage-consent/verify-receipts.test.mjs b/experiments/63-rule-overlay-coverage-consent/verify-receipts.test.mjs new file mode 100644 index 0000000..47f2261 --- /dev/null +++ b/experiments/63-rule-overlay-coverage-consent/verify-receipts.test.mjs @@ -0,0 +1,27 @@ +import {test} from 'node:test'; +import assert from 'node:assert/strict'; +import {readFileSync} from 'node:fs'; +import {join} from 'node:path'; +import {createHash} from 'node:crypto'; +import {execFileSync} from 'node:child_process'; +import {verifyReceipt,verifyFreshRun,verifyLivePackage} from './verify-receipts.mjs'; +const root=import.meta.dirname,source=readFileSync(join(root,'src/main.ts')); +const hash=v=>`sha256:${createHash('sha256').update(v).digest('hex')}`; +function fixture(){const r=JSON.parse(readFileSync(join(root,'runs/occ-mv7qn439.receipt.json')));const e=readFileSync(join(root,'runs/occ-mv7qn439.jsonl'),'utf8').trim().split('\n').map(JSON.parse);return {r,e};} +function bytes(r,e){const b=Buffer.from(e.map(v=>JSON.stringify(v)).join('\n')+'\n');r.traceSha256=hash(b);return b;} +function row(e,id){return e.find(e=>e.t==='message'&&e.from==='real-current-cascade'&&e.body.id===id).body;} +test('legitimate red/red/green receipts still verify',()=>{for(const id of ['occ-mv7qlhb7','occ-mv7qlhdk','occ-mv7qn439']){const r=JSON.parse(readFileSync(join(root,`runs/${id}.receipt.json`)));verifyReceipt(r,readFileSync(join(root,`runs/${id}.jsonl`)),source);}}); +test('missing secondary metrics are not vacuous green',()=>{const {r,e}=fixture();for(const k of ['pinnedBaseControlAccuracy','aegisControlAccuracy','aegisInputOwnership','protectedBaseFixtureAccuracy','explicitConsentAccuracy']){delete r.metrics[k];delete e.at(-1).scores[k];}assert.throws(()=>verifyReceipt(r,bytes(r,e),source));}); +test('consumer allowance cannot be reported green when actual action is deny',()=>{const {r,e}=fixture();row(e,'explicit-pattern-consent').action='deny';assert.throws(()=>verifyReceipt(r,bytes(r,e),source));}); +test('self-check boolean cannot certify an unauthorized effective rule',()=>{const {r,e}=fixture();row(e,'regex-pattern-narrow').effectiveRules[0].match.pattern='OTHER';assert.throws(()=>verifyReceipt(r,bytes(r,e),source));}); +test('wrong warning attribution cannot keep green',()=>{const {r,e}=fixture();row(e,'regex-pattern-narrow').warnings[0].ruleId='unrelated';assert.throws(()=>verifyReceipt(r,bytes(r,e),source));}); +test('a duplicate/omitted scenario cannot retain exact count green',()=>{const {r,e}=fixture();row(e,'regex-remove-i').id='regex-pattern-narrow';assert.throws(()=>verifyReceipt(r,bytes(r,e),source));}); +test('input ownership false cannot be hidden behind original score',()=>{const {r,e}=fixture();row(e,'description-only').checks.inputOwnership=false;assert.throws(()=>verifyReceipt(r,bytes(r,e),source));}); +test('forged baseline fixture accuracy is recomputed',()=>{const {r,e}=fixture();row(e,'regex-pattern-narrow').priorAction='allow';assert.throws(()=>verifyReceipt(r,bytes(r,e),source));}); +test('unknown or NaN-like metric shape is not accepted',()=>{const {r,e}=fixture();r.metrics.extra=1;e.at(-1).scores.extra=1;assert.throws(()=>verifyReceipt(r,bytes(r,e),source));}); +test('changing the pre-registered scenario oracle is rejected',()=>{const {r,e}=fixture();e[0].body.scenarios[0].action='allow';assert.throws(()=>verifyReceipt(r,bytes(r,e),source));}); +test('an already present receipt is never a fresh run',()=>{const {r}=fixture();assert.throws(()=>verifyFreshRun(r,[r.runId],0));}); +test('even an unlisted old run is rejected by invocation start boundary',()=>{const {r}=fixture();assert.throws(()=>verifyFreshRun(r,[],parseInt(r.runId.slice(4),36)+1));}); +test('the exact new candidate ID and start boundary can verify',()=>{const {r}=fixture();verifyFreshRun(r,[],parseInt(r.runId.slice(4),36));}); +test('bare --latest refuses to masquerade committed evidence as fresh',()=>{assert.throws(()=>execFileSync(process.execPath,[join(root,'verify-receipts.mjs'),'--latest'],{stdio:'pipe',env:{...process.env,EXP63_FRESH_RUN_ID:'',EXP63_PREVIOUS_RUN_IDS:'',EXP63_STARTED_AT_MS:''}}));}); +test('live package manifest validation rejects forged hashes', {skip:!process.env.AEGIS_REPO},()=>{const {r}=fixture();r.package.repo=process.env.AEGIS_REPO;verifyLivePackage(r,process.env.AEGIS_REPO);r.package.manifest[0].sha256='sha256:'+'0'.repeat(64);assert.throws(()=>verifyLivePackage(r,process.env.AEGIS_REPO));});