Skip to content

Conversation

@alexluong
Copy link
Collaborator

@alexluong alexluong commented Jan 29, 2026

Summary

The models package was mixing domain types, Redis serialization logic, and the EntityStore storage interface. This PR separates those concerns:

  • Extract tenantstore — Move tenant/destination storage into its own package with a driver interface, conformance test suite (drivertest), and mem/redis implementations. Follows the same pattern as logstore.
  • Simplify models — Strip down to pure data types, split into focused files (entities.go, tasks.go, serialization.go). Remove EntityStore references and Redis parsing logic.

@vercel
Copy link

vercel bot commented Jan 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
outpost-docs Ready Ready Preview, Comment Jan 30, 2026 6:16pm
outpost-website Ready Ready Preview, Comment Jan 30, 2026 6:16pm

Request Review

@alexluong alexluong changed the title refactor: extract tenantstore out of internal/models package Extract tenantstore and simplify models package Jan 29, 2026
Base automatically changed from model-delivery-event to main January 30, 2026 18:10
alexluong and others added 7 commits January 31, 2026 01:15
…antstore

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…tation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Separate RunConformanceTests (CRUD, destination listing, match, misc)
from RunListTenantTests (enrichment, excludes deleted, input validation,
keyset pagination, pagination suite). ListTenant tests now only run on
RediSearch backends (Redis Stack, Dragonfly Stack) instead of skipping
at runtime. Pagination suite moved from standalone redistenantstore test
into the drivertest framework.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add tenantstore/tenantstore.go facade following the logstore pattern
with type aliases, re-exported error sentinels, and a Config-based
constructor. Update all consumers from models.EntityStore to
tenantstore.TenantStore across services, apirouter, publishmq, and
deliverymq packages.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Delete moved code from models/ (entity.go, encryption.go and their
tests), remove parseRedisHash/parseTimestamp methods from tenant.go
and destination.go. Rename EntityStore to MockStore in
destinationmockserver, and rename entityStore to tenantStore across
apirouter, publishmq, deliverymq, telemetry, and config.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@alexluong alexluong merged commit d6e93ef into main Jan 30, 2026
3 of 4 checks passed
@alexluong alexluong deleted the refactor-models branch January 30, 2026 18: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.

3 participants