Summary
Define a Kubernetes-style controller manager in gitstore-api that reconciles both core resources and CRD-defined kinds from unified API watch events while preserving strict ownership boundaries: .spec is Git-owned and .status is controller-owned.
This initiative establishes the runtime loop that consumes watch events, executes reconciliation handlers, and writes observed state back through the API contract.
Scope
In Scope
- Define the controller manager runtime model (worker lifecycle, queueing, retry/backoff, idempotency).
- Define reconcile contracts for core resources and CRD kinds with a shared handler interface.
- Define list-then-watch startup flow for controllers (
resourceVersion checkpointing and resume).
- Define ownership boundaries for writes:
.spec via Git pipeline, .status via API status mutation.
- Define optimistic concurrency requirements for status updates using
resourceVersion/preconditions.
- Add integration tests for controller startup, disconnect/reconnect resume, and status write conflict handling.
- Document operational runbooks (lagging controller, replay window exceeded, poisoned work item retries).
Out of Scope
- Buyer-facing AI UX and storefront personalization.
- Mutating admission controllers.
- Replacing GraphQL with REST endpoints.
- Public client-facing realtime subscriptions.
Acceptance Criteria
Dependencies
Implementation Plan
#180 — Controller manager runtime foundations
#181 — Shared reconcile handler contract for core and CRD kinds (blocked by #180)
#182 — Startup resume and resourceVersion checkpointing contract (blocked by #180)
#183 — Integration tests and operations runbook (blocked by #181 and #182)
Tracking
- Area:
infra
- Priority:
p2 - high
- Target Milestone / Release: TBD
Summary
Define a Kubernetes-style controller manager in
gitstore-apithat reconciles both core resources and CRD-defined kinds from unified API watch events while preserving strict ownership boundaries:.specis Git-owned and.statusis controller-owned.This initiative establishes the runtime loop that consumes watch events, executes reconciliation handlers, and writes observed state back through the API contract.
Scope
In Scope
resourceVersioncheckpointing and resume)..specvia Git pipeline,.statusvia API status mutation.resourceVersion/preconditions.Out of Scope
Acceptance Criteria
resourceVersioncheckpoints after disconnect.Dependencies
Implementation Plan
#180— Controller manager runtime foundations#181— Shared reconcile handler contract for core and CRD kinds (blocked by#180)#182— Startup resume andresourceVersioncheckpointing contract (blocked by#180)#183— Integration tests and operations runbook (blocked by#181and#182)Tracking
infrap2 - high