fix(workers): filter releasedTentativeFaces to canonical UUIDs (ADR 0102) #1265

Merged
chris merged 1 commit from fix/release-tentative-canonical-uuid into main 2026-10-16 20:28:37 +02:00
Owner

Summary

Second live-G4 failure fix (job 604def57, 2026-10-16). The envelope contract-version fix (PR #1263) worked — this run got past that validation — but Core then rejected the submission with:

400 releasedTentativeFaces entry must be a canonical UUID; got 2386fcfa-a3dc-4114-8f54-fa5a4a4cec56:0

Root cause: the enqueue exports cio.occurrence_key as faceAnnotationId, and 15 of the owner's 388 tentative rows carry a generic_evidence-style <uuid>:0 key. The worker passed them through the ADR 0102 release signal (releasedTentativeFaces), whose Core validator requires canonical UUIDs and rejects the whole submission otherwise.

Fix (worker-side, minimal blast radius):

  • main.py: _CANONICAL_FACE_ID regex; releasedTentativeFaces now only contains canonical UUIDs. Conservative semantics: non-canonical keys stay milestone'd to their person instead of being released under an invalid id.
  • Tests: regression covering :0-style and junk keys being dropped while canonical outcome-A tentatives still release; existing release tests updated to canonical payload ids (Core's contract shape — the fixture face ids stay short, only payload rows carry UUIDs).
  • KNOWN_ISSUES.md: ISSUE-165 (worker-fixed; the underlying data quirk — occurrence_key with index suffix in state=tentative — recorded for a data-side cleanup).

Test plan

  • PYTHONPATH=workers/people/src .venv/bin/python -m pytest workers/people/tests/ -q → 363 passed, 1 skipped (pre-existing heif), 99 subtests — including the new filter regression and the updated release tests.
  • After merge+deploy the G4 live measurement is re-triggered on the owner domain (semisupervised-v3).
## Summary Second live-G4 failure fix (job `604def57`, 2026-10-16). The envelope contract-version fix (PR #1263) worked — this run got past that validation — but Core then rejected the submission with: ``` 400 releasedTentativeFaces entry must be a canonical UUID; got 2386fcfa-a3dc-4114-8f54-fa5a4a4cec56:0 ``` **Root cause:** the enqueue exports `cio.occurrence_key` as `faceAnnotationId`, and 15 of the owner's 388 tentative rows carry a generic_evidence-style `<uuid>:0` key. The worker passed them through the ADR 0102 release signal (`releasedTentativeFaces`), whose Core validator requires canonical UUIDs and rejects the whole submission otherwise. **Fix (worker-side, minimal blast radius):** - `main.py`: `_CANONICAL_FACE_ID` regex; `releasedTentativeFaces` now only contains canonical UUIDs. Conservative semantics: non-canonical keys stay milestone'd to their person instead of being released under an invalid id. - Tests: regression covering `:0`-style and junk keys being dropped while canonical outcome-A tentatives still release; existing release tests updated to canonical payload ids (Core's contract shape — the fixture face ids stay short, only payload rows carry UUIDs). - `KNOWN_ISSUES.md`: ISSUE-165 (worker-fixed; the underlying data quirk — `occurrence_key` with index suffix in `state=tentative` — recorded for a data-side cleanup). ## Test plan - `PYTHONPATH=workers/people/src .venv/bin/python -m pytest workers/people/tests/ -q` → **363 passed, 1 skipped (pre-existing heif), 99 subtests** — including the new filter regression and the updated release tests. - After merge+deploy the G4 live measurement is re-triggered on the owner domain (`semisupervised-v3`).
fix(workers): filter releasedTentativeFaces to canonical UUIDs (ADR 0102)
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 / Run scoped PR tests (push) Has been skipped
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Build plants worker image (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 / Android unit tests and debug APK (push) Has been skipped
Build and Deploy / Build people worker image (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 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 / Clean Docker build artifacts (push) Has been skipped
9299f87684
The second live G4 run (job 604def57, 2026-10-16) got past the contract
version check (envelope fix works) but was again rejected by Core:
400 'releasedTentativeFaces entry must be a canonical UUID; got
2386fcfa-...:0'. Root cause: the enqueue exports cio.occurrence_key as
faceAnnotationId and 15 of the owner's 388 tentative rows carry a
generic_evidence-style '<uuid>:0' key; the worker passed them through
the ADR 0102 release signal, whose Core validator requires canonical
UUIDs and rejects the whole submission otherwise.

- main.py: _CANONICAL_FACE_ID regex; releasedTentativeFaces now only
  contains canonical UUIDs (conservative: non-canonical keys stay
  milestone'd instead of being released under an invalid id).
- tests: regression covering ':0'-style and junk keys being dropped
  while canonical outcome-A tentatives still release; existing release
  tests updated to canonical payload ids (Core's contract shape).
- KNOWN_ISSUES: ISSUE-165 (worker-fixed, data-side cleanup recorded).

Full worker suite: 363 passed, 1 skipped (pre-existing heif), 99 subtests.
chris merged commit 383e5648b6 into main 2026-10-16 20:28:37 +02: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!1265
No description provided.