fix(api): @Autowired on PeopleClusteringResetService primary ctor — restore API boot (ISSUE-089) #997

Merged
chris merged 1 commit from fix/api-boot-ctor into main 2026-10-03 08:25:07 +02:00
Owner

Summary

PR #996 broke API startup: PeopleClusteringResetService gained a second public constructor (legacy 4-arg delegating + new 5-arg with TenantClusteringLockService) with NO @Autowired on either → Spring cannot pick a constructor at context startup (No default constructor found) → memories-api crash-looped in production (10+ restarts, caught by the Deploy API smoke).

Unit/PG tests construct the service manually, so only the real context boot hits it.

Fix: @Autowired on the 5-arg primary constructor (same pattern as ClassInstanceDiscoveryService). ISSUE-089 recorded; follow-up will add an ApplicationContext boot smoke test so constructor ambiguity fails in PRs, not deploys.

Verification

  • rtk ./gradlew :apps:api:compileJava green
  • Version 1.21.63 → 1.21.64

Urgent: production API is down — merge as soon as CI is green.

## Summary PR #996 broke API startup: `PeopleClusteringResetService` gained a second public constructor (legacy 4-arg delegating + new 5-arg with TenantClusteringLockService) with NO `@Autowired` on either → Spring cannot pick a constructor at context startup (`No default constructor found`) → **memories-api crash-looped in production** (10+ restarts, caught by the Deploy API smoke). Unit/PG tests construct the service manually, so only the real context boot hits it. Fix: `@Autowired` on the 5-arg primary constructor (same pattern as `ClassInstanceDiscoveryService`). ISSUE-089 recorded; follow-up will add an ApplicationContext boot smoke test so constructor ambiguity fails in PRs, not deploys. ## Verification - `rtk ./gradlew :apps:api:compileJava` green - Version 1.21.63 → 1.21.64 **Urgent: production API is down — merge as soon as CI is green.**
fix(api): @Autowired on PeopleClusteringResetService primary ctor — restore API boot
Some checks failed
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 2s
Build and Deploy / Android unit tests and debug APK (push) Has been skipped
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 plants worker image (push) Has been skipped
Build and Deploy / Build converter 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 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 / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Failing after 1m34s
5bc9ef68f0
PR #996 added a second public constructor without @Autowired on either,
so Spring could not pick one at context startup ('No default constructor
found') and memories-api crash-looped in production (caught by the
Deploy API smoke; unit tests construct the service manually and missed
it). Primary 5-arg constructor now annotated, mirroring the
ClassInstanceDiscoveryService pattern.

ISSUE-089 recorded; follow-up: context-boot smoke test so constructor
ambiguity fails in PRs, not deploys. Version 1.21.63 -> 1.21.64.
chris merged commit 12b8a10db1 into main 2026-10-03 08:25:07 +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!997
No description provided.