Add execplan for ClusteringSession::refresh (11.2.1) - #185
Draft
lodyai[bot] wants to merge 5 commits into
Draft
Conversation
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Your free Security trial is over. An organization admin can activate billing to continue. Comment |
lodyai
Bot
force-pushed
the
11-2-1-implement-clustering-session-refresh
branch
from
August 6, 2026 23:41
fc8755f to
57ed1e1
Compare
Draft the execution plan for roadmap item 11.2.1: implement `ClusteringSession::refresh`, which merges the retained MST backbone, historical edges, and pending edges, reweights them with mutual reachability using current core distances, runs `parallel_kruskal`, and extracts a published flat-label snapshot. The plan was shaped by a Wyvern reconnaissance pass over the batch CPU pipeline and session state, validated against the FISHDBC prior art, and revised after a df12 Logisphere community-of-experts review. Key design decisions recorded: raw-backbone retention (to avoid cross-refresh weight drift), graceful degenerate handling, a lower-layer mutual-reachability helper, reuse of existing error variants, and the contiguous point-id invariant. Status: DRAFT — awaiting approval before implementation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The repository's `typos`/nixie spelling gate enforces -ize/-ization forms (Oxford-compatible). Replace formalises/optimisation/canonicalised. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
leynos
force-pushed
the
11-2-1-implement-clustering-session-refresh
branch
from
August 16, 2026 02:36
57ed1e1 to
d7edf4b
Compare
Fold in three findings from the user's gap review: - Adopt `googletest`, `pretty_assertions`, and `insta` as dev-dependencies with concrete usage assignments in the new refresh test suites. These are the approved assertion crates from the rust-unit-testing brief and are currently unused anywhere in the workspace; this milestone starts the practice. - Switch the pure rebuild from `EdgeHarvest::from_unsorted` + `parallel_kruskal` to the crate-internal `parallel_kruskal_from_edges` entry point, removing a redundant O(E log E) sort and an intermediate allocation. Recorded as a Decision Log deviation from the roadmap item's literal "construct a fresh EdgeHarvest" wording. - Document that dedup of the overlapping merged buffers happens in `mst::prepare_edge_list`, not `EdgeHarvest`, and add an overlap-tolerance unit test to the pure-function suite. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
AGENTS.md documented `make test` as `cargo test --workspace`, but the Makefile actually runs `cargo nextest run --profile <default|ci> --all-targets --all-features -E 'not kind(bench)'` with warnings denied. Describe the real invocation, including the profile selection and the benchmark exclusion. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The execplans skill now mandates two further living sections and a milestone-plateau structure. Restructure the plan accordingly, preserving every reviewed design decision: - Add `Conformance Basis` with stable upstream identifiers (RM-11.2.1, DES-12.x, DES-FIG3), trace links from requirements through milestones to named acceptance tests, and the three recorded deviations (raw-backbone Figure 3 refinement, `parallel_kruskal_from_edges` wording, degenerate-size behaviour). - Restructure verification into a `Verification Plan` with named obligations OBL-1..OBL-8, explicit axioms AXM-1..AXM-5, per-obligation method, domain, artefact, and evidence, and non-vacuity arguments including two planned seeded-fault mutation checks. - Replace the standalone red-tests milestone with red-green-refactor stages inside each milestone so every milestone ends in a validated plateau (EP-M1..EP-M5), each with a conformance check, recovery path, and an explicit no-compatibility-machinery decision. - Add `Artefacts and notes` as the destination for mutation and proof transcripts. No design or scope decisions changed; the plan still awaits approval. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
Adds the execution plan
docs/execplans/11-2-1-implement-clustering-session-refresh.mdfor roadmap item 11.2.1 — implement
ClusteringSession::refresh.refreshmerges the retained MST backbone, historical edges, and pendingedges; reweights them with the mutual-reachability formula using current core
distances; constructs a fresh
EdgeHarvest; runsparallel_kruskal; extractslabels via
extract_labels_from_mst; and publishes anArc<Vec<usize>>labelsnapshot while advancing
snapshot_version.This PR contains only the ExecPlan (Status: DRAFT). Per the execplans
workflow, implementation does not begin until the plan is approved.
How the plan was produced
(
parallel_kruskal,extract_labels_from_mst,EdgeHarvest,MstEdge,CandidateEdge), the existing session state and core-distance mechanics, andthe repo's test/BDD/Makefile conventions.
prior art (Dell'Amico, 2019, arXiv:1910.07283).
drove a substantial revision (see the plan's Decision Log and Revision Note).
Key design decisions
CandidateEdge(not weighted
MstEdge) and reweight from raw each refresh, so weights do notratchet upward across refreshes as core distances fall. Refines design
Figure 3; captured in ADR-005 (to be added during implementation).
rebuild_mst_labelsdomain function (merge →reweight → Kruskal → extract → recover backbone) separated from the impure
HNSW-backed core-distance recompute; the shared
mutual_reachability_weighthelper is homed in the lower
cpu_pipelinelayer.CpuMstFailureguard (no new errorvariant, no panic).
sessions make progress rather than erroring.
faithfulness + merge multiset preservation), a
proptestsuite including amulti-refresh differential property, and an optional bounded Kani harness.
Validation
make markdownlintpasses for the changed document.References
🤖 Generated with Claude Code
Summary by Sourcery
Add the draft ExecPlan for implementing
ClusteringSession::refreshand publishing incremental clustering labels.Enhancements:
CI:
Documentation: