feat(workers): semisupervised-v3 — representative density graph clustering (ADR 0113 V1–V5) #1259
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/semisupervised-v3-worker"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Worker-side of ADR 0113 (companion Core PR above): the measured representative-density-graph optimization ships as the new single-pass method
semisupervised-v3, dark (registry addition only, default unchanged).clustering.py; prototype module kept as identity re-export so the G3 benchmark + its tests run on production code.partition_hac_components, unchanged) over the U-only filtered adjacency; representatives never form/extend/split groups; SCALABLE_MAX_HAC_NODES fail-closed propagates._emit_group_candidatesgeneralized, NOT forked: optionalrep_adjacencyview;None→ original labeled-graph loop untouched (v1/v2 byte-identity preserved by their suites). qualifying/wholeGroup read rep adjacency; ADR 0106/0108 pessimistic B-scoring, ADR 0103 qualityScore, ambiguity demotion, consumption semantics unchanged.SEMISUPERVISED_V3_CONTRACT_VERSION = 2; handler accepts v3 only at version 2 (per-method required-version set; v1/v2 still require 1; wrong version → existingunsupported_clustering_contractfail path)._stampedderives the version from the method.person_representativesnow computed for v2 AND v3.Test plan
test_semisupervised_v3_clustering.py: 20 tests covering the G2 fixture groups (edge invariants incl. the pinned anchor-no-edge behavior change, identity separation, gate-from-representative distortion + converse, U-only grouping, fail-closed cap, determinism, contract matrix)workers/people/tests/: 345 passed, 1 skipped (pre-existing heif), 99 subtests — v1/v2 suites byte-identical (one membership pin extended bysemisupervised-v3, the set's contract IS its membership, ADR 0104 precedent)cd .worktrees/v3-worker && PYTHONPATH=workers/people/src .venv/bin/python -m pytest workers/people/tests/ -q805b0d6167a2e55eaace