agent-orchestrator/backend/internal
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
..
adapters refactor(tracker): address code-review findings 2026-05-30 22:32:45 +05:30
cdc refactor(backend): collapse duplicate PR row types into one domain definition 2026-06-01 03:40:33 +05:30
cli test(cli): port the E2E suite to cross-platform Go; slim the Docker harness 2026-06-01 03:14:08 +05:30
config docs(config): drop stale CDC-JSONL mention in resolveDataDir 2026-05-31 07:18:22 +05:30
daemon refactor(backend): collapse duplicate PR row types into one domain definition 2026-06-01 03:40:33 +05:30
daemonmeta fix(cli): verify daemon ownership before stop signal 2026-06-01 01:45:04 +05:30
domain refactor(backend): collapse duplicate PR row types into one domain definition 2026-06-01 03:40:33 +05:30
httpd fix(cli): harden daemon control surface and stop CLI from writing the store 2026-06-01 01:55:14 +05:30
integration refactor(backend): collapse duplicate PR row types into one domain definition 2026-06-01 03:40:33 +05:30
lifecycle refactor(backend): collapse duplicate PR row types into one domain definition 2026-06-01 03:40:33 +05:30
notification feat: add durable notification foundation 2026-06-01 00:07:55 +05:30
observe/reaper feat(backend): port lifecycle lane onto the new storage+CDC model 2026-05-31 07:16:06 +05:30
ports refactor(backend): collapse duplicate PR row types into one domain definition 2026-06-01 03:40:33 +05:30
project feat(api): implement project routes with mock manager/store (#47) 2026-05-31 20:31:22 +05:30
runfile feat(api): implement project routes with mock manager/store (#47) 2026-05-31 20:31:22 +05:30
session feat(backend): port lifecycle lane onto the new storage+CDC model 2026-05-31 07:16:06 +05:30
storage/sqlite refactor(backend): collapse duplicate PR row types into one domain definition 2026-06-01 03:40:33 +05:30
terminal fix(terminal): guard subscribe-to-assign window in openTerminal 2026-05-31 23:42:59 +05:30