Skip to content

Extract handler store layer, fix N+1 test result inserts#232

Merged
MichielDean merged 11 commits into
mainfrom
feat/sc-ccb46
Apr 14, 2026
Merged

Extract handler store layer, fix N+1 test result inserts#232
MichielDean merged 11 commits into
mainfrom
feat/sc-ccb46

Conversation

@MichielDean
Copy link
Copy Markdown
Owner

Closes droplet sc-ccb46.

Cistern Agent added 11 commits April 13, 2026 23:51
…s.go, eliminate field-by-field adapter conversions, remove empty benchmark
…r, remove dead code, add handler unit tests

- Auth, executions, analytics, reports, admin, and quality-gates handlers now
  use store interfaces exclusively instead of raw *db.Pool SQL queries
- Removed adapter structs; assign concrete *store.XxxStore directly (following
  existing teams/webhooks pattern)
- Fixed LinkReport empty teamID bug (was passing empty string, now takes proper
  teamID parameter)
- Removed dead code: BulkInsertTestResults, AuthDBTX, nullString duplication
- TrendRow.PassRate now populated by SQL query (CASE expression) instead of
  being left as zero
- Added store-based unit tests for auth handler (12 tests with mockAuthStore)
  and executions handler (28 tests with mockExecutionsStore)
- Deduplicated nullString: moved to store.NullString shared helper
- All handler tests pass; no regressions
…face and DB() from OAuthStore, remove duplicate webhook check in test
…FromURL helper, remove IsNoRows wrapper, remove obvious comments
@MichielDean MichielDean merged commit b1a9607 into main Apr 14, 2026
15 of 17 checks passed
@MichielDean MichielDean deleted the feat/sc-ccb46 branch April 14, 2026 11: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