Skip to content

Latest commit

 

History

History
275 lines (251 loc) · 20 KB

TODO.md

File metadata and controls

275 lines (251 loc) · 20 KB

TODO

The open work, in one list. Each item is one or two lines with a code pointer or the design page that argues it. Ranked within each group, most urgent first. Before the next release marks what should land before the next tag is cut (the last release is v0.56.0). Checked against main at a13c23d9 on 2026-11-25.

Before the next release

Nothing open. Concurrent commit windows, the last gate, passed: stage 3 of concurrent-author-windows.md, outage e2e included, was green in CI on PR #476.

Applier claims and bi-directional editing

  • Restart recovery: persist the branch's history. Event history leads (decided 2026-11-30): the journal of commands, observations and decisions is the source of truth, and the state below is what a checkpoint of it must rebuild. A graceful stop pushes its windows and writes the outcomes of the saves they carried (CommitRequestsInFlight.Settle); everything else the branch worker keeps in memory is lost on any restart, and a crash, or a stop past its grace period, loses all of it. Nothing is persisted. What must survive: the open windows with absolute deadlines, author, attribution, message and membership; each attached save's attachDeadline, seq and window; save outcomes until their TTL; the pending writes; the withheld-field records (internal/git/withheld_fields.go: after a restart the next edit of such an object carries the apply's values into Git again, until the Repair lands). "Git took the push, then the process died" is made safe by writing a push intent {old, new, request→SHA} before every PushAtomic and comparing it with the remote tip on restart: commits carry no trailers, and SHAs are not reproducible. Two restore traps: the startup cold replay (no Redis) closes any restored window (resync_flush.go), and finalizeWindow drops a window while render fidelity is Unknown, which it is after a restart. The worker state root /tmp is an emptyDir a new pod loses. branch-worker-event-model.md.
  • Gaps in the withheld-field record (internal/git/withheld_fields.go): a field patch in the apply window forgets the object's accepted version, so a withhold over it records nothing; accepted versions held for render fidelity (recordUnpublishedEdits) and resyncs with Initial: false are untested; no counter shows how many fields are withheld.
  • Reopen the render-fidelity gate after a Git repair, automatically. Today a target on RenderMatchesLive=False clears only on an explicit recheck (the reconcile.configbutler.ai/requestedAt annotation, which restarts every scope; the render fidelity e2e spec proves it recovers a repaired folder), a re-declaration or a restart. Doing it on an incoming Git revision is more than calling Invalidate and RequestRecheckForGitTarget from a new place: it first needs the retained-intent ordering barrier, so the source refresh cannot discard or race an open commit window or pending live edits (render-fidelity.md §6b).
  • Watch the held applier, so a switch-on or a flux resume is undone at once instead of within the one-minute heldClaimSteadyInterval. Also makes apply_claimed_resource_reconciled_total (ask #31) count at the moment of the resume. applier-claim-held-applier-watch.md.
  • F3: a Flux fetch is made before the hold is checked, so a Kustomization resumed by hand applies the fetched artifact at once (internal/applier/flux.go, Request).
  • The apply window's remaining clock limits (internal/git/apply_window.go, file comment). A server clock ahead by more than the time between an earlier apply and the send dates an undo of an edit published before the send after it, so the undo is not mirrored and the next apply reverts it. With an edit carried from the window before, the check against the send still mixes the two clocks, and a server clock behind can withhold this attempt's own apply and ask for an unneeded Repair. Only comparing the event's content with Git separates them.
  • F-h: small leaks and races. The 5-minute hold can restart; the Initial flag races settlement; snapshotHeldSince, applierState.named and dropped collections in settledSnapshots leak.
  • Check Argo CD sync windows in Configured. The guide says a sync window must not block GitOps Reverser's syncs; nothing checks it.
  • Refuse or flag overrides that are not in Git (Argo spec.source.kustomize; Flux spec.images, patches, targetNamespace): they change what is applied where the fidelity check cannot see. applicationMismatch checks only repo and revision. Needs a decision; render-fidelity.md §8.
  • One holder per applier across KubeProviders (cluster identity or an object-local stamp). idea-applier-claim-ownership.md.
  • A targeted review of internal/applier/. CodeRabbit skipped #420 (over its 100-file limit), so the largest new package has had no bot review.
  • Later: claim an Argo CD ApplicationSet (idea-argocd-applicationset-claim.md); a webhook applier, a third claim kind (apply-trigger.md, "Where this goes next").

The gitops-api team's asks

Their argument for each is in gitops-api-open-asks.md.

  • Keyed writes and keyed saves (replaces #45): a change key in a write's Audit-ID (chg-<key>.<n>), windows keyed by it as well, CommitRequest.spec.changeKey, CommitWindow.status.changeKey, and a Change trailer. Saving one change of several.
  • #48: a key or reason on the write through an annotation a ValidatingAdmissionPolicy copies into the audit event, for clients that can't set headers. After keyed writes.
  • #34: an e2e with an in-cluster applier and a remote source cluster, provoking one apply window collision.
  • #10: consider the namespace when placement follows siblings. Cosmetic.
  • #28 (two instances sharing one cluster) is deferred, not open work: one instance serving many namespaces is the tenancy model, and the restart cost behind the ask is the durable queue's.

Attribution

  • Option F: stop waiting for a fact a (route, type) has never produced. A removal on a type the audit policy drops spends the full grace for nothing. attribution-removal-wait-options.md.
  • Release attribution per object, not per watch (head-of-line). One slow lookup delays every later event on its stream. Before relying on per-object order, check three places: the watch cursor may advance only to the oldest unreleased event; the producerGate handoff on retire and replace, and the snapshot-before-live boundary; and the apply window, which classifies an edit by when it reaches the worker. The ordering spec.
  • Two doc sentences: no condition detects an API server's 30s default --audit-webhook-batch-max-wait (say so in the KubeProvider docs), and a relist after a watch gap ships its changes as the configured author (say so in the operator docs).
  • Optional: capture CommitRequest authors without Redis in single-pod mode, with an in-memory CommandAuthorStore. The only thing that still forces Redis on one replica. Low priority, and only useful until HA.

Branch worker and CommitRequests

  • Measure the footprint index on realistic repositories and commit rates before widening the layouts it proves. It is rebuilt whenever its revision changes, every local commit included; a review measured a rebuild at about 3.5 ms and 3.9 MB allocated for 100 small manifests, and 33 ms and 37 MB for 1,000 (allocation, not retained heap), against 19 µs for a reuse. The retained-byte budget does not charge the indexes, the accepted versions or the withheld-field records, so a full budget does not bound the worker's memory.
  • What the window reference model (internal/git/window_model_test.go) does not cover: a resync waiting for its retry whose fetch finds a push from outside and discards it (the model makes no push from outside while a resync waits); objects of more than one field, so a withheld apply's record is only ever one value; an applier write after its apply window's grace (the window runs on the wall clock, so the model sends each late write inside it). Two guards no input reaches are pinned by unit tests instead: the outage ending when its writes settle with no push, and an attach that closes a later window in the same pass.
  • Parent observation, step 1: keep parent availability and its timestamp after the write branch exists, from existing advertisements, with no extra connections. gittarget-parent-observation.md.
  • Finish making a GitTarget turn red quickly and say why no commit was made: the broader reason and status contract table remains. gittarget-red-status-plan.md.
  • Transition boundary in the branch worker, the prerequisite for the durable queue. branch-worker-event-model.md.
  • Make the worker queue durable, and advance the watch cursor only after a durable worker acknowledgment. Today a crash after cursor advancement and before the write lands in Git can skip work on restart.
  • High availability: leader or ownership coordination so two replicas never write the same GitTarget, plus the durable queue, plus whether a replica warms its fact index before starting a watch it took over. Redis becomes required in this mode. ha-gittarget-distribution-plan.md.
  • Drop unbornHead once go-git reports an empty repository's unborn HEAD. Upstream main (d6fa0275) adds LsRefsOutput.UnbornHead but GetRemoteRefs still returns ErrEmptyRemoteRepository before building RemoteRefs. An upstream PR returning the name there, or on the error (an EmptyRemoteRepositoryError{Unborn} whose Is(ErrEmptyRemoteRepository) is true, from both GetRemoteRefs v2 paths), would let listRemoteRefs go back to Remote.List.
  • The branch claim is first-proven-wins (internal/git/branch_owner.go). Anyone who can create a GitProvider and a GitBranch with a credential that passes the push-session proof can claim a branch no older GitBranch holds; on Gitea and Forgejo a read-only credential passes it (AGit). An older GitBranch takes the branch from a live holder once it proves itself, and the claim is not persisted. Only a per-repository authority closes this (an object per repository URL, or a cluster rule naming the one provider a repository's branches may be claimed through).
  • Alias detection. repourl.Normalize cannot unify Gitea's SSH on :2222 beside HTTPS, a separate SSH hostname, a vanity domain or a renamed repository, so two spellings get two claims and two workers on one branch, undetected. Design: warn when a commit pushed under one key shows up under the other. Also the HA plan's HA-0 question.
  • Accepted for now: no rate bound on push deliveries. Folding bounds the queue, not the rate, so a GitReceiver token holder can keep a worker reading; a per-worker cooldown would bound it.
  • Re-assess unifying the pending-write kinds (grouped window, resync and empty commit, since #450 removed the atomic kind). Deferred.
  • Improve queue and worker observability, with more high-load tests.

Watch plane

  • Subscribe the watch plane to typeset.Registry lifecycle events. Registry.Subscribe has no production observer, so nothing sweeps the manifests of an uninstalled CRD, and since #419 the operator asks Flux or Argo CD to apply that folder. Its consumer is the stop classification in target-watch-plan.md, "What a collection leaving means".
  • Pin with a test that an unforced retention pass keeps a scope's revision, so only Invalidate re-issues one (internal/git/render_fidelity_gate.go), and close the retention revision-mismatch question in watch-plane-status-convergence-failures.md §3.
  • Filter more cluster-generated noise beyond kube-root-ca.crt (always left out, no opt-in: internal/watch/cluster_generated.go), such as OpenShift's openshift-service-ca.crt, once measured on such a cluster.
  • A manifest whose CRD is missing refuses the whole folder (IssueUnresolvedKRM, manifestanalyzer/acceptance.go): keep that, or defer only that document. The scan already records unresolved-mapping instead of failing.
  • Decide whether the settle window should be configurable (settleWindow 2s, maxSettleWait 10s in internal/watch/owner.go). Revisit only on a report that config changes feel slow.
  • Reduce duplication between the WatchRule and ClusterWatchRule code paths where it makes sense.
  • Later: a namespace selector in a KubeProvider grant's scope (idea-source-namespace-selector.md).

Support boundary and Git content

  • Scalar strategic-merge patch authoring: an env var or a limit edited in one overlay is still refused, and since #419 the user sees the edit reverted. Decide "we author patches", then about two weeks. patch-authoring.md.
  • Decide how SOPS rules cover sensitive custom resources that are not Secret-shaped (fields such as spec.credentials): an explicit field policy, or full-file encryption.
  • Should comments survive a SOPS re-encrypt? (e2e Test C in e2e-coverage-gaps-and-improvements-plan.md).
  • Decide the three open layout questions in layout/model.md: nested roots per directory, refusing rather than reporting when a governing root disappears, and a CRD default for placement.default. (The fourth, a shared GitProvider, is answered by GitBranch and grants.)
  • Preserve more user-facing file structure: comments, ordering and other low-noise formatting.
  • Values Move 2, the editable values projection (values-file-projection.md).
  • Least privilege: never mirror Secrets, permission-aware followability, an RBAC generator (least-privilege-remaining-work.md).
  • Support-boundary gaps: the Generated{path} claim, Argo directory.exclude, paths written by ImageUpdateAutomation, the provenance and ownerReference gate, a Helm chart skipped as a unit, the Overlay-Diverged trailer.

E2E and CI

  • Fix the recurring full-e2e flakes around WatchRule and snapshot convergence (SOPS bootstrap, signing snapshot messages). Notes in the e2e serial registry. Address before the next feature that widens commit-message, snapshot or write-window behavior.
  • Run image-refresh only when its inputs change, a path filter in ci.yml; it removes a 14–18 minute leg from most PRs. e2e-suite-trim.md.
  • The e2e detail gaps and redundancy tables in e2e-suite-trim.md: four specs that look tested and are not, then the moves and merges.
  • SetDefaultEventuallyTimeout is global and set in 17 e2e files, so the last Describe body built wins; use per-spec timeouts (Eventually(...).WithTimeout). Moving each call into a BeforeEach is not enough: Ginkgo runs top-level containers in random order, so a spec that sets none would inherit whichever container ran before it, and a BeforeAll runs before its own container's BeforeEach. Needs a full e2e run to verify.
  • e2e for the commit-window stack: E5 extended to the withheld-field carry; a restart of a source cluster's controller with a save in flight; catchUp: AfterPush at shutdown. (Two and three authors at once and a path_conflict are covered since #478.)
  • e2e Test A: a delete missed while the controller is scaled to 0; then Tests B and C. e2e-coverage-gaps-and-improvements-plan.md.
  • Enable goconst. It is not in the enable list of .golangci.yml (only a _test.go exclusion names it), so it never runs; enable it with a path-scoped exclusion (test/, internal/git/commit.go).
  • Release-image reuse PRs 2, 3 and 5 (release-image-reuse-plan.md).
  • Metrics Phase 5: dashboard JSON, recording and alert rules (metrics-observability-plan.md §7).
  • Use bestpractices.dev as a maturity checklist, and turn the useful items into concrete work.

Docs and vocabulary

  • Stale design-doc headers, one docs PR: open-asks-priority.md (#339 closed, #23 fixed), git-write-preflight.md (superseded by the red-status plan), gittarget-red-status-plan.md (steps 5 and 6 built), target-watch-plan.md (queue depth is 1000, not 100), and the go-git version in azure-devops-multi-ack.md.
  • Wrong claims in design bodies: acceptance-precision.md says everything is open; admission-consent.md says the preflight "fails closed" (it was decided fail-open, and is not built); multi-source-audit-ingress-hardening.md says the server checks the named provider exists.
  • (GVR, scope) is still in architecture.md (nine times); definitions.md says "resource collection" and retires the old spelling. A mechanical reword, as its own docs PR.
  • Write down API Priority and Fairness for the operator's load: the inflight ceiling, which built-in priority level our watches and audit webhook land in, whether a dedicated FlowSchema/PriorityLevelConfiguration helps, and what to observe. An earlier facts page was removed because it recommended distinguisherMethod: ByResource, which does not exist (ByUser and ByNamespace only). Measure before writing it.
  • Settle two words: "replay" in applier-echoes.md departure 11 (definitions.md says "initial events"), and "sweep" against "prune" for the act of removing.

Future directions

  • A Writable condition on GitProvider. A push session that sends nothing proves the server opens one for the credential, not that a write is accepted (branch protection and pre-receive hooks apply at ref update), so a green probe is necessary and not sufficient. False only on an explicit refusal; a failed probe never clears a proven denial. Gating Ready on it is a separate release. (GitBranch now opens a push session before it holds a branch, which covers part of this.)
  • Simpler setup flows, including more Git provider bootstrap automation.
  • Constrained reverse actions for simple, known Kustomize-style mutations.
  • Better branching and promotion strategies.

Research: