diff --git a/.harness/bench-memory-eviction-2026-11-18.json b/.harness/bench-memory-eviction-2026-11-18.json new file mode 100644 index 0000000000..b316cf1b2e --- /dev/null +++ b/.harness/bench-memory-eviction-2026-11-18.json @@ -0,0 +1,17 @@ +{ + "corpus_path": ".harness/bench-memory-eviction-2026-11-18.json", + "created_by_date": "2026-11-18", + "created_by_hypothesis": "CacheManager frequency-aware eviction (HTM-EAR arXiv:2603.10032) -- frequencyWeight/evictionScanWindow tuning", + "task_count": 6, + "task_categories": ["mild-skew", "moderate-skew", "severe-skew"], + "gold_data_source": "synthetically generated by scripts/bench-cache-eviction.mjs from the seeds below; 'golden' keys = the true top-decile most-accessed keys in each generated access trace, computed independently of any cache eviction policy before the trace is replayed", + "notes": "Each task replays a deterministic Zipfian-skewed key-access trace (seeded PRNG, no external data) through a real CacheManager instance (not a simulation/reimplementation) with maxSize well below numKeys, forcing eviction. Metric: fraction of golden (truly highest-frequency) keys still resident at the end of the trace, plus ops/sec throughput. This benchmark was authored tonight specifically to evaluate tonight's own candidate -- see the periodic corpus-fairness caveat in the issue/PR (STEP 10): it has not yet been run against an unrelated weak candidate to prove it has teeth, which is disclosed as a limitation, not resolved.", + "tasks": [ + { "id": "mild-1", "seed": 1001, "numKeys": 40, "maxSize": 12, "numOps": 2000, "skewExponent": 0.6, "goldenTopFraction": 0.1 }, + { "id": "mild-2", "seed": 1002, "numKeys": 60, "maxSize": 15, "numOps": 3000, "skewExponent": 0.6, "goldenTopFraction": 0.1 }, + { "id": "moderate-1", "seed": 2001, "numKeys": 40, "maxSize": 12, "numOps": 2000, "skewExponent": 1.1, "goldenTopFraction": 0.1 }, + { "id": "moderate-2", "seed": 2002, "numKeys": 60, "maxSize": 15, "numOps": 3000, "skewExponent": 1.1, "goldenTopFraction": 0.1 }, + { "id": "severe-1", "seed": 3001, "numKeys": 40, "maxSize": 12, "numOps": 2000, "skewExponent": 1.8, "goldenTopFraction": 0.1 }, + { "id": "severe-2", "seed": 3002, "numKeys": 60, "maxSize": 15, "numOps": 3000, "skewExponent": 1.8, "goldenTopFraction": 0.1 } + ] +} diff --git a/.harness/darwin-lineage-2026-11-18.json b/.harness/darwin-lineage-2026-11-18.json new file mode 100644 index 0000000000..40198b55a1 --- /dev/null +++ b/.harness/darwin-lineage-2026-11-18.json @@ -0,0 +1,227 @@ +{ + "baselineEval": { + "candidate": { + "frequencyWeight": 0, + "evictionScanWindow": 32 + }, + "quality": 0.5, + "successRate": 1, + "latency": 1, + "costEfficiency": 1, + "reproducibility": 1, + "safety": 1, + "fitness": 0.825, + "meanRetentionDelta": 0, + "meanOpsRatio": 1.0189885574485578 + }, + "lineage": [ + { + "candidate": { + "frequencyWeight": 0.25, + "evictionScanWindow": 32 + }, + "quality": 0.5, + "successRate": 1, + "latency": 0.8459947209361269, + "costEfficiency": 1, + "reproducibility": 1, + "safety": 1, + "fitness": 0.8018992081404189, + "meanRetentionDelta": 0, + "meanOpsRatio": 0.8459947209361269, + "generation": 1 + }, + { + "candidate": { + "frequencyWeight": 0.5, + "evictionScanWindow": 32 + }, + "quality": 0.5138888888888888, + "successRate": 1, + "latency": 0.9679645154304543, + "costEfficiency": 1, + "reproducibility": 1, + "safety": 1, + "fitness": 0.8250557884256792, + "meanRetentionDelta": 0.027777777777777773, + "meanOpsRatio": 0.9679645154304543, + "generation": 1 + }, + { + "candidate": { + "frequencyWeight": 0.75, + "evictionScanWindow": 32 + }, + "quality": 0.5625, + "successRate": 1, + "latency": 0.99520369062745, + "costEfficiency": 1, + "reproducibility": 1, + "safety": 1, + "fitness": 0.8461555535941174, + "meanRetentionDelta": 0.125, + "meanOpsRatio": 0.99520369062745, + "generation": 1 + }, + { + "candidate": { + "frequencyWeight": 1, + "evictionScanWindow": 32 + }, + "quality": 0.5625, + "successRate": 0.8333333333333334, + "latency": 0.9839787268849135, + "costEfficiency": 1, + "reproducibility": 1, + "safety": 0.8333333333333334, + "fitness": 0.7944718090327371, + "meanRetentionDelta": 0.12499999999999999, + "meanOpsRatio": 0.9839787268849135, + "generation": 1 + }, + { + "candidate": { + "frequencyWeight": 0.75, + "evictionScanWindow": 8 + }, + "quality": 0.5763888888888888, + "successRate": 1, + "latency": 0.9542000513428158, + "costEfficiency": 1, + "reproducibility": 1, + "safety": 1, + "fitness": 0.8448661188125334, + "meanRetentionDelta": 0.15277777777777776, + "meanOpsRatio": 0.9542000513428158, + "generation": 2 + }, + { + "candidate": { + "frequencyWeight": 0.75, + "evictionScanWindow": 16 + }, + "quality": 0.5625, + "successRate": 1, + "latency": 0.9660947630936612, + "costEfficiency": 1, + "reproducibility": 1, + "safety": 1, + "fitness": 0.8417892144640491, + "meanRetentionDelta": 0.125, + "meanOpsRatio": 0.9660947630936612, + "generation": 2 + }, + { + "candidate": { + "frequencyWeight": 0.75, + "evictionScanWindow": 32 + }, + "quality": 0.5625, + "successRate": 1, + "latency": 0.9692733165184113, + "costEfficiency": 1, + "reproducibility": 1, + "safety": 1, + "fitness": 0.8422659974777617, + "meanRetentionDelta": 0.125, + "meanOpsRatio": 0.9692733165184113, + "generation": 2 + }, + { + "candidate": { + "frequencyWeight": 0.75, + "evictionScanWindow": 64 + }, + "quality": 0.5625, + "successRate": 1, + "latency": 0.994950328239898, + "costEfficiency": 1, + "reproducibility": 1, + "safety": 1, + "fitness": 0.8461175492359846, + "meanRetentionDelta": 0.125, + "meanOpsRatio": 0.994950328239898, + "generation": 2 + }, + { + "candidate": { + "frequencyWeight": 0.55, + "evictionScanWindow": 32 + }, + "quality": 0.5138888888888888, + "successRate": 1, + "latency": 0.9281190352575156, + "costEfficiency": 1, + "reproducibility": 1, + "safety": 1, + "fitness": 0.8190789663997383, + "meanRetentionDelta": 0.027777777777777773, + "meanOpsRatio": 0.9281190352575156, + "generation": 3 + }, + { + "candidate": { + "frequencyWeight": 0.65, + "evictionScanWindow": 32 + }, + "quality": 0.5347222222222222, + "successRate": 1, + "latency": 0.9476806019421461, + "costEfficiency": 1, + "reproducibility": 1, + "safety": 1, + "fitness": 0.8293048680690996, + "meanRetentionDelta": 0.06944444444444443, + "meanOpsRatio": 0.9476806019421461, + "generation": 3 + }, + { + "candidate": { + "frequencyWeight": 0.85, + "evictionScanWindow": 32 + }, + "quality": 0.5972222222222222, + "successRate": 1, + "latency": 0.9480068455034522, + "costEfficiency": 1, + "reproducibility": 1, + "safety": 1, + "fitness": 0.8512288046032955, + "meanRetentionDelta": 0.19444444444444442, + "meanOpsRatio": 0.9480068455034522, + "generation": 3 + }, + { + "candidate": { + "frequencyWeight": 0.95, + "evictionScanWindow": 32 + }, + "quality": 0.5625, + "successRate": 0.8333333333333334, + "latency": 0.9584037476969183, + "costEfficiency": 1, + "reproducibility": 1, + "safety": 0.8333333333333334, + "fitness": 0.7906355621545377, + "meanRetentionDelta": 0.12499999999999999, + "meanOpsRatio": 0.9584037476969183, + "generation": 3 + } + ], + "finalWinner": { + "candidate": { + "frequencyWeight": 0.85, + "evictionScanWindow": 32 + }, + "quality": 0.5972222222222222, + "successRate": 1, + "latency": 0.9480068455034522, + "costEfficiency": 1, + "reproducibility": 1, + "safety": 1, + "fitness": 0.8512288046032955, + "meanRetentionDelta": 0.19444444444444442, + "meanOpsRatio": 0.9480068455034522, + "generation": 3 + } +} diff --git a/docs/dream-cycle/LEDGER.md b/docs/dream-cycle/LEDGER.md index a194472616..8e50c9341c 100644 --- a/docs/dream-cycle/LEDGER.md +++ b/docs/dream-cycle/LEDGER.md @@ -267,6 +267,19 @@ as a first-class, high-priority candidate, not a background note. | 2026-11-13 | memory | `ControllerRegistry.initialize()`'s `INIT_LEVELS` never listed `causalRecall`, so `get('causalRecall')` always returned `null` despite a correct, already-written `createController()` case (same declared-but-unreachable-config shape as 10-28's `.set()` fix). Added `causalRecall` to Level 4 | #4982 | #4983 | yes | ACCEPT (evaluated) | 2 new discriminating tests, stash-isolated baseline fails as predicted → 94/94 candidate; full `@claude-flow/memory` suite 717/718 (1 pre-existing unrelated environmental failure, byte-identical); `tsc --noEmit` clean both ways; independent adversarial critique CONFIRMED-WITH-CAVEATS (1 non-blocking comment-accuracy nit, fixed forward) | 6d7d059d... | gist local-only (`dream-gist-2026-11-13.md`), `gh gist create` blocked by proxy policy (HTTP 403, not a GH-auth failure); not yet merged, 3 days old, not stale | | 2026-11-14 | swarm | `ByzantineConsensus`/`GossipConsensus` never called `setMaxListeners(0)` despite the identical per-proposal listener-growth pattern `RaftConsensus` already guards against (`raft.ts:60-64`) — real `MaxListenersExceededWarning` under >10 concurrent proposals. Mirrored Raft's existing guard in both constructors | #4988 | #4989 | yes | ACCEPT | 2 new discriminating tests, stash-isolated baseline captures the real warning → 6/6 candidate; full `@claude-flow/swarm` suite 382/382 (380+2), 0 regressions, `tsc --noEmit` clean; independent adversarial critique confirmed no evaluator gaming, re-ran baseline from scratch, 50-concurrent-proposal stress test clean | 0e31d2b1... | gist local-only (`dream-gist-2026-11-14.md`), `gh gist create` blocked by proxy policy (HTTP 403); not yet merged, 2 days old, not stale | | 2026-11-11 | security | `v3/@claude-flow/cli/src/init/settings-risk-scanner.ts`'s `scanAllowRuleForRisk()` (the heuristic `ruflo init --upgrade` runs against a target project's existing `.claude/settings.json`) flagged `permissions.allow` rules pre-approving `bash/sh/python/ruby/perl/curl/wget`+dangerous-words with no per-call confirmation, but had no entry for `node`/`deno`/`bun`/`php` — GTFOBins-documented shell-breakout interpreters in the same tier as the four already covered. This repo's own committed `.claude/settings.json` (lines 14/29) carries a live, unscoped `Bash(node:*)` allow-rule this exact scanner silently passed as clean before tonight; confirmed not a documented design tradeoff (`ruflo init`'s own `generateSettings()` never emits a node-related allow rule by default, so the gap wasn't forced by avoiding a false positive on Ruflo's own output). Fixed via a new `INTERPRETER_WORDS` list feeding only `RISKY_PREAPPROVE_WORDS`, deliberately kept out of `SHELL_EXEC_WORDS` so the separate `scanCommandStringForRisk` (hook command strings, where `node