feat(adr-0123): pool-emission-quality gate — weak pool faces recognized+marked, never mint auto suggestions #1507

Merged
chris merged 1 commit from feat/v6-pool-emission-quality-gate into main 2026-11-14 16:48:48 +01:00
Owner

Implements ADR 0123 V1–V5 (merged as !1506): pool faces below pool_min_confidence (detector confidence) or pool_min_quality (V138 crop quality: 0.7·sharpness + 0.3·exposure) stay full partition members — they cluster, densify, stay marked and re-proposable — but are never claimed by a candidate card; a group whose members are all gated mints nothing. Emission-scoped only: no scoring/envelope/contract (v6@5 stays)/cache change; v1–v5 byte-identical.

Changes (7c470ae6)

  • V189: discovery_domains.pool_min_confidence + pool_min_quality (NUMERIC(3,2), NULL = off, fail-open)
  • Feed (OwnerFaceEmbeddingsController): qualityScore additive row key on both UNION branches (ADR 0119 detectionConfidence pattern)
  • Settings threading: settings.poolMinConfidence/poolMinQuality snapshotted v6-only (SemisupervisedMethod.snapshotsPoolQualityGate()), finite [0,1] validated, absent = off
  • Worker: _emit_group_candidates(emission_eligible=frozenset) — claimed_offsets drive refs, identity voting (wholeGroup), scoring n_source, and consumption; gated faces stay in available (re-proposable), never admitted/globally consumed, don't vote identity; empty claimed → early return. Both gates off → kwarg omitted (byte-identical; 4 existing call sites untouched)
  • Admin: GET/PATCH /pool-quality-gate + Admin Discovery UI fields (en/da/de)

Validation

  • Worker suite 650 → 669 passed (+19: eligible-predicate units, all-gated-no-consume, mixed-claim, no-identity-vote, fail-open, out-of-window disable, v1–v5 signature/grep pins, goldens green)
  • API: 13 new PoolQualityGatePostgresTest on the production Flyway chain, OwnerFaceEmbeddingsControllerTest/AnchorMinConfidencePostgresTest re-run green, compileJava clean
  • svelte-check 0 errors, message-key parity en/da/de

Operator use

After deploy: set the floors via Admin Discovery (or GET/PATCH /api/admin/people/pool-quality-gate), then trigger a recluster. Probe-recommended starting point: 0.60 / 0.25 (ADR 0123 context: demotion semantics — weak faces stay reviewable, manual similarity assignment untouched). UI note: one PATCH replaces both floors; blank field keeps the stored value (no accidental off-switch).

Implements ADR 0123 V1–V5 (merged as !1506): pool faces below `pool_min_confidence` (detector confidence) or `pool_min_quality` (V138 crop quality: 0.7·sharpness + 0.3·exposure) **stay full partition members** — they cluster, densify, stay marked and re-proposable — but are **never claimed by a candidate card**; a group whose members are all gated mints nothing. Emission-scoped only: no scoring/envelope/contract (v6@5 stays)/cache change; v1–v5 byte-identical. ## Changes (7c470ae6) - **V189**: `discovery_domains.pool_min_confidence` + `pool_min_quality` (NUMERIC(3,2), NULL = off, fail-open) - **Feed** (`OwnerFaceEmbeddingsController`): `qualityScore` additive row key on both UNION branches (ADR 0119 `detectionConfidence` pattern) - **Settings threading**: `settings.poolMinConfidence`/`poolMinQuality` snapshotted v6-only (`SemisupervisedMethod.snapshotsPoolQualityGate()`), finite [0,1] validated, absent = off - **Worker**: `_emit_group_candidates(emission_eligible=frozenset)` — `claimed_offsets` drive refs, identity voting (wholeGroup), scoring n_source, and consumption; gated faces stay in `available` (re-proposable), never admitted/globally consumed, don't vote identity; empty claimed → early return. Both gates off → kwarg omitted (byte-identical; 4 existing call sites untouched) - **Admin**: GET/PATCH `/pool-quality-gate` + Admin Discovery UI fields (en/da/de) ## Validation - Worker suite **650 → 669 passed** (+19: eligible-predicate units, all-gated-no-consume, mixed-claim, no-identity-vote, fail-open, out-of-window disable, v1–v5 signature/grep pins, goldens green) - API: 13 new `PoolQualityGatePostgresTest` on the production Flyway chain, `OwnerFaceEmbeddingsControllerTest`/`AnchorMinConfidencePostgresTest` re-run green, compileJava clean - svelte-check 0 errors, message-key parity en/da/de ## Operator use After deploy: set the floors via Admin Discovery (or GET/PATCH `/api/admin/people/pool-quality-gate`), then trigger a recluster. Probe-recommended starting point: **0.60 / 0.25** (ADR 0123 context: demotion semantics — weak faces stay reviewable, manual similarity assignment untouched). UI note: one PATCH replaces both floors; blank field keeps the stored value (no accidental off-switch).
feat(adr-0123): pool-emission-quality gate — weak pool faces recognized+marked, never mint auto suggestions
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 3s
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build Android CI image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Android unit tests and debug APK (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Deploy review instance (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 1m31s
7c470ae68d
V189 discovery_domains columns (pool_min_confidence, pool_min_quality,
NUMERIC(3,2), NULL = that gate off, no default), feed qualityScore
(dr.quality_score AS quality_score on both UNION branches, additive
optional row key beside the ADR 0119 detectionConfidence), settings
threading v6-only (snapshotsPoolQualityGate; poolMinConfidence /
poolMinQuality into the immutable job payload; v1-v5 payload shapes
byte-identical), emission-eligibility predicate in
_emit_group_candidates (emission_eligible pool-offset set: gated
members stay FULL partition members but are never claimed by a card,
never vote identity, are never consumed; all-gated group mints nothing
and consumes nothing; neighborhoodSize = claimed count; None = the
historical byte-identical path), admin UI (GET/PATCH
/api/admin/people/pool-quality-gate + two inputs beside the anchor gate
field, en/da/de), tests (19 worker units incl. the byte-identical
pinned golden + v1-v5 span grep-asserts, 13 API Postgres tests on the
production Flyway chain).

Fail-open: feed rows without detectionConfidence/qualityScore are never
gated. Defaults NULL = gate off. Emission-scoped only — no scoring,
envelope, contract (v6@5 stays), cache, or representative change.
chris merged commit 1af4d67f2e into main 2026-11-14 16:48:48 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
chris/memories!1507
No description provided.