Skip to content

Various improvements#42

Merged
donaldgray merged 7 commits into
mainfrom
feature/improvements
May 21, 2026
Merged

Various improvements#42
donaldgray merged 7 commits into
mainfrom
feature/improvements

Conversation

@donaldgray
Copy link
Copy Markdown
Member

@donaldgray donaldgray commented May 20, 2026

  • Move endpoint registration to feature folders
  • Remove .claude/settings.local.json
  • Refactor shared search handler logic
  • Use options patterns
  • Use TestContainers for tests, rather than InMemory db
  • Tidy program.cs by moving hangfire registration to extension method

donaldgray and others added 3 commits May 20, 2026 17:35
Move endpoint definitions out of Program.cs into dedicated feature
classes for both Builder and Search APIs, following a vertical slice
structure.
- Add generic base class with common IsEnabledAsync guard
- Move empty-query short-circuit and GetTextAsync + Search call to base
- SearchHandler and SearchV2Handler now only implement BuildResponse

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@donaldgray donaldgray changed the title Feature/improvements Various improvements May 20, 2026
donaldgray and others added 4 commits May 21, 2026 08:52
Replace UseInMemoryDatabase with a real postgres:16-alpine container
managed by Testcontainers. EF migrations are applied once at collection
fixture initialisation, giving tests a schema that matches production.
Hangfire remains on InMemory as it is not the subject of this change.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* No need to remove registered services when using ConfigureTestServices
* Fixed issue with captured local-var requiring hoop jumping to get
TestContainers working for tests
All three Program.cs files now use Configure<T>(section) instead of
resolving the options POCO eagerly and registering it as a singleton.
Handlers, services, and endpoint lambdas inject IOptions<T> and
access .Value. Tests wrap inline constructions with Options.Create().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Keeps Program.cs focused on composition; Hangfire-specific wiring
lives in HangfireServiceCollectionExtensions.AddHangfireServices.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@donaldgray donaldgray merged commit c263743 into main May 21, 2026
1 check passed
@donaldgray donaldgray deleted the feature/improvements branch May 21, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant