feat(api): semisupervised-v3 contract matrix, allowlist + enqueue stamping (ADR 0113 V1/V5) #1258
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/semisupervised-v3-api"
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
Core-side of ADR 0113 (companion worker PR follows):
semisupervised-v3becomes a recognized clustering method with contract version 2, fail-closed on both directions.PeopleClusteringResetController):semisupervised-v3joinsALLOWED_CLUSTERING_METHODS; allowlist-sync javadoc updated; default + null→worker-default untouched.WorkerJobEnqueueService): v3 jobs stampclusteringContractVersion=2+maxDistance+representativeSplitDistance(v2-or-v3 condition, mirroring v2 exactly — the worker's graph node set is built at the job-snapshotted split distance, ADR 0113 V2).WorkerResultService): newrequiredContractVersion(method)— v1@1, v2@1, v3@2, anything else fail-closed; enforced on immutable job settings before envelope comparison. Envelope-vs-job method/version mismatches use the pre-existing checks (incl. v3-stamped envelope on v2 job → reject).isSemisupervisedmode routing + forged-marker + provenance guards cover v3.ClassInstanceDiscoveryService): v3 joins the semisupervised method guards (persist fail-closed stamp, bulk-confirm provenance).Intentional tightening: v1 job@2 (previously passable if envelope echoed 2) is now rejected — no production path could produce it (enqueue stamps per-method), covered by a test.
Test plan
rtk ./gradlew :apps:api:test --tests '*Clustering*' --tests '*Semisupervised*' --tests '*WorkerResult*'→ BUILD SUCCESSFUL; matrix coverage accepts (v1,1)/(v2,1)/(v3,2), rejects (v3,1)/(v3,3)/(v1,2)/(v2,2)/(v3,null) + envelope method/version mismatches (+16 new tests across 4 suites)*ClassInstanceDiscovery*334/0/0,*WorkerJobEnqueue*43/0/0,*PeopleRepresentativeSplitDistance*12/0/0,*MLResultAcceptance*30/0/0