Skip to content

feat(math): degenerate-tick group-clusterings overwrite + <2-participants edge (legacy mode)#2642

Draft
jucor wants to merge 1 commit into
spr/edge/bc0518d7from
spr/edge/bbb74f71
Draft

feat(math): degenerate-tick group-clusterings overwrite + <2-participants edge (legacy mode)#2642
jucor wants to merge 1 commit into
spr/edge/bc0518d7from
spr/edge/bbb74f71

Conversation

@jucor

@jucor jucor commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Port of the approved 2026-07-21 Opus verdict (CLOJURE_QUIRKS Q4+Q5). Clojure
recomputes :group-clusterings EVERY tick unconditionally: max-k-fn >= 2 always
(conversation.clj:274-279), so a 1-base-cluster tick runs k=2 kmeans on one
point (clean-start caps at distinct-point count -> 1 cluster, lineage id),
OVERWRITES :group-clusterings with that degenerate value, and the recovery
tick warm-starts from it, minting split ids via (inc max-id)
(clusters.clj:267). Clojure also has no <2-in-conv-participants guard past the
truly-empty short-circuit.

clojure-legacy mode now skips both early returns and falls through to the
normal legacy path, which reproduces all of the above exactly: max_k
arithmetic yields k range [2]; calculate_silhouette_sklearn returns the 0.0
sentinel for singleton clusterings (= Clojure's singleton rule,
clusters.clj:350-353), so the P6a smoother advance is preserved with the same
{2: 0.0} input via the main path (the branch-local P6a advance block is
removed as dead). The 0-participant early return stays in both modes
(unreachable past the empty short-circuit given the PR-E greedy floor).
improved mode keeps both guards byte-for-byte.

TDD: tests/test_degenerate_tick_parity.py RED on the old code for the pinned
divergences (stale 2-cluster group_clusterings after a collapse tick; empty
structures on a single-participant tick), GREEN after; existing P6a smoother
tests unchanged and green (24 passed with test_group_k_smoother.py; 37 passed
with lineage/greedy-carry/pca-warm-start/engine-mode neighbors).

commit-id:bbb74f71


Stack:


⚠️ Part of a stack created by spr. Do not merge manually using the UI - doing so may have unexpected results.

…ants edge (legacy mode)

Port of the approved 2026-07-21 Opus verdict (CLOJURE_QUIRKS Q4+Q5). Clojure
recomputes :group-clusterings EVERY tick unconditionally: max-k-fn >= 2 always
(conversation.clj:274-279), so a 1-base-cluster tick runs k=2 kmeans on one
point (clean-start caps at distinct-point count -> 1 cluster, lineage id),
OVERWRITES :group-clusterings with that degenerate value, and the recovery
tick warm-starts from it, minting split ids via (inc max-id)
(clusters.clj:267). Clojure also has no <2-in-conv-participants guard past the
truly-empty short-circuit.

clojure-legacy mode now skips both early returns and falls through to the
normal legacy path, which reproduces all of the above exactly: max_k
arithmetic yields k range [2]; calculate_silhouette_sklearn returns the 0.0
sentinel for singleton clusterings (= Clojure's singleton rule,
clusters.clj:350-353), so the P6a smoother advance is preserved with the same
{2: 0.0} input via the main path (the branch-local P6a advance block is
removed as dead). The 0-participant early return stays in both modes
(unreachable past the empty short-circuit given the PR-E greedy floor).
improved mode keeps both guards byte-for-byte.

TDD: tests/test_degenerate_tick_parity.py RED on the old code for the pinned
divergences (stale 2-cluster group_clusterings after a collapse tick; empty
structures on a single-participant tick), GREEN after; existing P6a smoother
tests unchanged and green (24 passed with test_group_k_smoother.py; 37 passed
with lineage/greedy-carry/pca-warm-start/engine-mode neighbors).

commit-id:bbb74f71
This was referenced Jul 22, 2026
@jucor
jucor marked this pull request as draft July 22, 2026 00:51
@jucor jucor changed the title feat(math): degenerate-tick group-clusterings overwrite + <2-participants edge (legacy mode) feat(math): degenerate-tick group-clusterings overwrite + <2-particip… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/bc0518d7 to edge July 22, 2026 02:01
@jucor jucor changed the title feat(math): degenerate-tick group-clusterings overwrite + <2-particip… feat(math): degenerate-tick group-clusterings overwrite + <2-participants edge (legacy mode) Jul 22, 2026
@jucor
jucor changed the base branch from edge to spr/edge/bc0518d7 July 22, 2026 02:02
@jucor jucor changed the title feat(math): degenerate-tick group-clusterings overwrite + <2-participants edge (legacy mode) feat(math): degenerate-tick group-clusterings overwrite + <2-particip… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/bc0518d7 to edge July 22, 2026 02:10
@jucor jucor changed the title feat(math): degenerate-tick group-clusterings overwrite + <2-participants edge (legacy mode) feat(math): degenerate-tick group-clusterings overwrite + <2-particip… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/bc0518d7 to edge July 22, 2026 03:54
@jucor jucor changed the title feat(math): degenerate-tick group-clusterings overwrite + <2-particip… feat(math): degenerate-tick group-clusterings overwrite + <2-participants edge (legacy mode) Jul 22, 2026
@jucor
jucor changed the base branch from edge to spr/edge/bc0518d7 July 22, 2026 03:54
@jucor jucor changed the title feat(math): degenerate-tick group-clusterings overwrite + <2-participants edge (legacy mode) feat(math): degenerate-tick group-clusterings overwrite + <2-particip… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/bc0518d7 to edge July 22, 2026 06:16
@jucor jucor changed the title feat(math): degenerate-tick group-clusterings overwrite + <2-particip… feat(math): degenerate-tick group-clusterings overwrite + <2-participants edge (legacy mode) Jul 22, 2026
@jucor
jucor changed the base branch from edge to spr/edge/bc0518d7 July 22, 2026 06:16
@jucor jucor changed the title feat(math): degenerate-tick group-clusterings overwrite + <2-participants edge (legacy mode) feat(math): degenerate-tick group-clusterings overwrite + <2-particip… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/bc0518d7 to edge July 22, 2026 06:50
@jucor jucor changed the title feat(math): degenerate-tick group-clusterings overwrite + <2-particip… feat(math): degenerate-tick group-clusterings overwrite + <2-participants edge (legacy mode) Jul 22, 2026
@jucor
jucor changed the base branch from edge to spr/edge/bc0518d7 July 22, 2026 06:50
@jucor jucor changed the title feat(math): degenerate-tick group-clusterings overwrite + <2-participants edge (legacy mode) feat(math): degenerate-tick group-clusterings overwrite + <2-particip… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/bc0518d7 to edge July 22, 2026 08:11
@jucor jucor changed the title feat(math): degenerate-tick group-clusterings overwrite + <2-particip… feat(math): degenerate-tick group-clusterings overwrite + <2-participants edge (legacy mode) Jul 22, 2026
@jucor
jucor changed the base branch from edge to spr/edge/bc0518d7 July 22, 2026 08:11
@jucor jucor changed the title feat(math): degenerate-tick group-clusterings overwrite + <2-participants edge (legacy mode) feat(math): degenerate-tick group-clusterings overwrite + <2-particip… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/bc0518d7 to edge July 22, 2026 09:58
@jucor jucor changed the title feat(math): degenerate-tick group-clusterings overwrite + <2-particip… feat(math): degenerate-tick group-clusterings overwrite + <2-participants edge (legacy mode) Jul 22, 2026
@jucor
jucor changed the base branch from edge to spr/edge/bc0518d7 July 22, 2026 09:58
@jucor jucor changed the title feat(math): degenerate-tick group-clusterings overwrite + <2-participants edge (legacy mode) feat(math): degenerate-tick group-clusterings overwrite + <2-particip… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/bc0518d7 to edge July 22, 2026 11:20
@jucor jucor changed the title feat(math): degenerate-tick group-clusterings overwrite + <2-particip… feat(math): degenerate-tick group-clusterings overwrite + <2-participants edge (legacy mode) Jul 22, 2026
@jucor
jucor changed the base branch from edge to spr/edge/bc0518d7 July 22, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant