agent-orchestrator/backend/internal/domain
prateek 28e1205d28 refactor(backend): collapse duplicate PR row types into one domain definition
Each PR-child table (pr / pr_checks / pr_comment) had three near-identical
structs — gen.* (generated), sqlite.*Row, and ports.* — with wiring.Adapter
copying field-by-field between them. Collapse to one shared definition per
table in domain (PRRow / PRCheckRow / PRComment), used by both the PRWriter
port and the sqlite store; gen.* stays sealed inside the storage layer.

- *sqlite.Store now satisfies ports.SessionStore + ports.PRWriter directly,
  so the entire wiring.Adapter package is deleted (lifecycle.New(store, store)).
- The bool PR state <-> single state column, int<->int64, and enum-default
  translation now lives only at the gen<->domain boundary in pr_store.go.
- WritePRObservation renamed WritePR to match the port; the integration test
  and composition root drop their adapter copies.

Net -280 lines, behaviour unchanged. go test -race ./... green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 03:40:33 +05:30
..
decide feat(storage,cdc): minimal 6-table schema + trigger-driven CDC (storage layer) 2026-05-31 05:42:59 +05:30
lifecycle.go feat(backend): port lifecycle lane onto the new storage+CDC model 2026-05-31 07:16:06 +05:30
notification.go feat: add durable notification foundation 2026-06-01 00:07:55 +05:30
pr.go refactor(backend): collapse duplicate PR row types into one domain definition 2026-06-01 03:40:33 +05:30
session.go feat(backend): port lifecycle lane onto the new storage+CDC model 2026-05-31 07:16:06 +05:30
status.go feat(backend): port lifecycle lane onto the new storage+CDC model 2026-05-31 07:16:06 +05:30
status_test.go feat(backend): port lifecycle lane onto the new storage+CDC model 2026-05-31 07:16:06 +05:30
tracker.go refactor(tracker): address code-review findings 2026-05-30 22:32:45 +05:30