fix(api): TimelineQueryService Spring constructor ambiguity broke deployed API startup #1140
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/on-this-day-api-context"
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?
Problem
Post-merge run 4284 (
Deploy API) failed after #1137: the API container crashed on startup withNoSuchMethodException: TimelineQueryService.<init>(). Two public constructors (2-arg convenience + 3-arg with Clock) without an annotation made Spring's constructor resolution ambiguous; it fell back to a no-arg default that does not exist.Neither tests (construct the service directly) nor the smoke job (compile-only) could catch this class of failure.
Fix
@Autowiredon the 3-arg constructor (established pattern in the codebase); 2-arg constructor unchanged for tests.TimelineQueryServiceWiringTest: ApplicationContextRunner wiring guard, verified red without the annotation / green with it.Tests
:apps:api:test --tests dev.memories.api.timeline.*green incl. new wiring test; red/green proof of the regression guard in the PR branch history.