research: mincut-partitioned agent-memory consolidation (nightly 2026-08-17) — hypothesis rejected, two ruvector-mincut defects found - #833
Draft
ruvnet wants to merge 2 commits into
Draft
Conversation
…oned memory consolidation) Implements and benchmarks a mincut-partitioned agent-memory retention policy against the existing global top-score CoherencePolicy baseline (ruvector-agent-memory, nightly 2026-06-14), reused directly as a dependency rather than re-implemented. Includes a from-scratch, tested weighted Stoer-Wagner min cut (mincut_exact.rs) used as the authoritative partition source, after ruvector_mincut::DynamicMinCut::partition() was found during development to return vertex splits inconsistent with its own min_cut_value() and nondeterministic across runs; ruvector_mincut's value is still queried as an independent cross-check. fixed_k_partition similarly guards GraphPartitioner's output against observed vertex loss/fabrication and is scale-gated after GraphPartitioner measured 8.4s at n=500 and did not finish in 5m42s at n=4000. Also wires the previously-orphaned ruvector-agent-memory crate into the workspace members list so it can be depended on. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01KrAfJLv2U99vvEvQqJ1Zoo
… memory consolidation Documents the rejected hypothesis (worst-cluster recall gain 0.00pp against a pre-declared 15pp threshold, at both n=4000 and n=500, and across a bounded floor_min sweep), the partial positive signal (4/6 clusters individually gained 15-23pp, overall recall +6.8pp), and the two independently reproducible ruvector-mincut defects discovered along the way (partition()/min_cut_value() inconsistency + nondeterminism; GraphPartitioner vertex loss/fabrication + severe latency). Raw benchmark output preserved under evidence/. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01KrAfJLv2U99vvEvQqJ1Zoo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Nightly research run testing whether partitioning the agent-memory similarity graph before applying a retention budget protects minority topics from being evicted in full by
ruvector-agent-memory's global top-scoreCoherencePolicy(nightly 2026-06-14).floor_minsweep). Worst-cluster recall gain never reached the pre-declared 15pp threshold — best result was 0.00pp at n=4000, 8.00pp at n=500.ruvector-mincut: (1)DynamicMinCut::partition()returns vertex splits inconsistent with its ownmin_cut_value(), nondeterministically; (2)GraphPartitioner/RuVectorGraphAnalyzerdrops vertices, fabricates vertex ids for non-contiguous id spaces, and is severely slow (8.4s at n=500, did not finish in 5m42s at n=4000). Both are worked around (not fixed upstream) with a from-scratch, tested weighted Stoer–Wagner implementation (mincut_exact.rs) used as the authoritative partition source;ruvector_mincut's min-cut value is still cross-checked and was never observed wrong, only its partition materialization.Architecture
crates/ruvector-partition-memory(experimental, not wired into any production path).ruvector-agent-memory(wired into the workspacememberslist — it predated workspace membership and was otherwise unbuildable) for the baselineCoherencePolicyscorer, reused directly rather than re-implemented.ruvector-mincutforGraphPartitioner(candidate A) and as a cross-check source formincut_exact.rs's own Stoer–Wagner (candidate B).witness.rs: SHA-256 hash-chain over partition split decisions, following the precedent set byruvector-retrieval-receipt(nightly 2026-08-13).Files changed
crates/ruvector-partition-memory/— new crate:corpus.rs,graph.rs,mincut_exact.rs,partition.rs,retention.rs,metrics.rs,witness.rs,search.rs,main.rs(benchmark binary),examples/calibrate.rs,examples/darwin_sweep.rs.Cargo.toml/Cargo.lock— addruvector-partition-memoryand (previously orphaned)ruvector-agent-memoryto workspace members.docs/adr/ADR-305-mincut-partitioned-memory-consolidation.mddocs/research/nightly/2026-08-17_mincut-partitioned-memory-consolidation/— README, gist, and rawevidence/*.txtbenchmark output.Benchmark command
Real benchmark results (n=4000, accepted run)
Full raw output for this run, the n=500 run, the
floor_minDarwin sweep, and the corpus-noise calibration pass are indocs/research/nightly/2026-08-17_mincut-partitioned-memory-consolidation/evidence/.Acceptance result
REJECT. See ADR-305 for the full rejection criteria, evidence, and a proposed follow-up hypothesis (a per-branch/size-weighted stopping criterion) — not implemented here, since changing the criterion after seeing this run's results would defeat the point of a pre-declared threshold.
Darwin result
Bounded sweep (generations=1, candidates=4) over
floor_min ∈ {1,3,8,15}, partition held fixed. Winnerfloor_min=15on a composite fitness metric (0.5·worst + 0.3·overall + 0.2·correctness), butworst_cluster_recallitself did not improve — confirming the primary hypothesis's shortfall is structural, not a retention-budget tuning problem. Not promoted to any default; parent retained.Flywheel result
No
ruvector harness flywheelCLI was found in this environment (verified vianpx ruvector harness doctor/flywheel --help, no output/executable resolved) — evidence is instead preserved as plain files underevidence/, referenced from the ADR and README, rather than fabricated through a nonexistent interface.Security review
No new attack surface — standalone research crate over synthetic data, not wired into any request-serving path.
witness.rsis a tamper-evidence mechanism for auditing a partition decision after the fact, not an access-control or correctness proof; this is stated explicitly in the ADR's Security section to avoid overclaiming.Main limitations
ruvector-mincutdefects are documented with minimal repros but not filed upstream from within this run — that needs the owning maintainer's independent verification.Production recommendation
Do not promote. Hypothesis rejected by direct measurement.
mincut_exact.rs's correct, tested Stoer–Wagner implementation is a reusable asset independent of this ADR's outcome for any future RuVector graph-partitioning work.Research documents
docs/adr/ADR-305-mincut-partitioned-memory-consolidation.mddocs/research/nightly/2026-08-17_mincut-partitioned-memory-consolidation/README.mddocs/research/nightly/2026-08-17_mincut-partitioned-memory-consolidation/gist.mdGenerated by Claude Code