Skip to content

feat(RUN-282): entity CRUD, cached read models and cache invalidation - #3

Merged
vgmartinez merged 4 commits into
mainfrom
feat/run-282-b0-project-setup-scaffolding
May 29, 2026
Merged

vgmartinez merged 4 commits into
mainfrom
feat/run-282-b0-project-setup-scaffolding

Conversation

@edukmx

@edukmx edukmx commented May 29, 2026

Copy link
Copy Markdown
Collaborator
  • Complete CRUD for auth/backend/consumer/gateway/policy: app services, HTTP handlers, repositories and admin routes, plus functional tests.
  • Add consumer DataFinder and backend resolver read models backed by in-process TTL caches and Redis pub/sub invalidation events.
  • Fix LoadBalancer goroutine leak: add Close(), a TTLMap eviction callback that closes evicted balancers, and single-flight build in the backend resolver to avoid cache-stampede duplicates.
  • Drop package-name stutter: consumer.ConsumerDataFinder/ConsumerData -> consumer.DataFinder/Data (mock regenerated).
  • Scaffold proxy forwarder/provider data-plane path (WIP).

- Complete CRUD for auth/backend/consumer/gateway/policy: app services,
  HTTP handlers, repositories and admin routes, plus functional tests.
- Add consumer DataFinder and backend resolver read models backed by
  in-process TTL caches and Redis pub/sub invalidation events.
- Fix LoadBalancer goroutine leak: add Close(), a TTLMap eviction
  callback that closes evicted balancers, and single-flight build in
  the backend resolver to avoid cache-stampede duplicates.
- Drop package-name stutter: consumer.ConsumerDataFinder/ConsumerData
  -> consumer.DataFinder/Data (mock regenerated).
- Scaffold proxy forwarder/provider data-plane path (WIP).

Co-authored-by: Cursor <cursoragent@cursor.com>
@linear

linear Bot commented May 29, 2026 •

Copy link
Copy Markdown
RUN-282 B.0 Project setup & scaffolding

Context

Foundational scaffolding that must land before any other B.x work. Mirrors the shape TrustGate already has so contributors find a familiar layout and tooling. Everything in B.1–B.9 builds on top of this.

Scope (sub-issues)

  • main.go entrypoint with CLI flags (start-server, run-migrations, etc.) following the TrustGate cmd/ pattern
  • DB setup: connection config, migrations runner, transaction helpers (infra-level only — entity schemas live in B.2 / RUN-295)
  • Dependency container (uber/dig) bootstrap and module providers (RUN-300)
  • Admin server vs proxy server wiring (RUN-301)
  • Fiber HTTP servers + middleware skeleton + config loading
  • .agents/AGENT.md with project + Go conventions
  • Makefile with run, test, lint, build, migrate, docker targets
  • Dockerfile (multi-stage build) + docker-compose.yaml mirroring TrustGate's compose for Postgres / Redis / Kafka / ClickHouse
  • .github/workflows/ci.yml (lint, test, build)
  • pkg/ folder skeleton (empty packages following hexagonal layout: app/, domain/, handlers/, infra/, server/, common/, config/)
  • Test harness with container override (RUN-302)

Out of scope

  • Business logic for any entity (lives in B.1–B.9).
  • Helm charts and production deployment.

QA checklist

  • make test is green on an empty project
  • docker compose up boots Postgres + Redis + Kafka + ClickHouse and the gateway connects
  • CI runs lint + test + build on PR
  • Folder layout matches the documented hexagonal structure

Review in Linear

edukmx and others added 3 commits May 29, 2026 18:55
…n them in CI

- Relocate the PG_TEST_URL-gated repository_test.go suites from
  pkg/infra/repository/* to tests/functional/repositories/* so the
  ./pkg/... unit run stays fast and free of skipped integration tests.
- CI functional job now runs ./tests/functional/... with -p 1 against a
  dedicated agentgateway_repo_test database (created in a new step) via
  PG_TEST_URL, so the repository suites actually execute instead of skipping.
- Add a test-repositories make target for local parity.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vgmartinez
vgmartinez merged commit 32f5bf9 into main May 29, 2026
9 checks passed
@edukmx
edukmx deleted the feat/run-282-b0-project-setup-scaffolding branch May 29, 2026 17:13
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.

2 participants