Skip to content

15. Decisions made and open questions

Decided on 2026-11-01:

Topic Decision
Policy format Cluster-scoped RemediationPolicy CRD (ADR-0011)
Object to source mapping Flux labels plus plain manifests only, otherwise NeedsIntervention (ADR-0012)
External systems An interface and adapters for every one of them (ADR-0013)
Notifications GitHub issue in the fleet repo first; Teams through a Notifier adapter later (ADR-0014)
Analysis records Kept, redacted, in storage that outlives the lab (ADR-0015)
Lab region and models Sweden Central; the model is picked by benchmark from what Foundry offers there (ADR-0016)
Lab metrics Prometheus in the lab cluster, Grafana later if needed (ADR-0017)
Kill switch A field in a cluster-scoped config object, checked before every write
Evaluation Recorded contexts per scenario with the expected diagnosis or refusal; CI runs them against a fake model, the real model on demand
Agent observability controller-runtime Prometheus metrics and Shadewright's own shadewright_* metrics on the same endpoint (reference), plus OpenTelemetry traces per analysis (phases, model calls with tokens, tool calls, latency; off by default, OTLP gRPC, IDs, counts and fixed labels only: reference)
Packaging Scaffolded once with Kubebuilder's Helm plugin, then maintained by hand and guarded by test/chart. Details in the list "Packaging, in detail" below the table
Pluggability Three axes: platform services, cluster platforms, cluster integrations (ADR-0018); security integrations diagnose only; a module contributes hooks only when enabled and detected (2026-11-03)
Extension packaging Compiled in now, registered at start-up from an explicit list; signed declarative OCI packs later (ADR-0019)
Controller identities Separate analyzer, executor and verifier ServiceAccounts and roles (the verifier lists pods and gets ReplicaSets, Deployments and StatefulSets in the watched namespaces and writes only its own report, #682); incidents and requests reachable only in the operator namespace, the analyzer's namespaced reads only in the watched namespaces; cluster-wide it reads only the settings and a Node list (2.2, ADR-0024)
Detection report (2026-11-03) The analyzer writes detection to the RemediationSettings status; no component reads any field of it to decide (ADR-0024)
Scenario switch (2026-11-03) Flux on each cluster tracks its own cluster/<cluster> branch; the scenario harness moves it forward with one scenario or reset commit at a time and never writes main; the agent's pull requests target that branch, under rulesets that mirror main's protections for them; scenarios run on Kind and the lab (ADR-0022)
YAML patching (2026-11-04) One scalar replaced in place with go.yaml.in/yaml/v3, then a semantic check that only that value changed (ADR-0020)
Calling the model (2026-11-03) Prompts as code, context first with one structured call, escalation on deterministic signals with bounded tools, an evaluation gate keyed on model and prompt that the analyzer enforces at run time; a durable daily count of analyses that fails closed (ADR-0023)
Amending ADRs (2026-11-02) Accepted ADRs are amended with dated entries instead of being rewritten (ADR-0021)
Analysis claims (2026-11-05) Analysis claims, units and the evaluation manifest (ADR-0025)
Policy bounds for the model (2026-11-07, proposed) The context shows the model the bounds of the policy that decides its proposal, once and before it answers; no feedback after a denial, no clamping, the policy decides (ADR-0026)
Reviewer hints (2026-11-08) Hints from the code host's pull request are read by the executor through FeedbackSource; other integrations belong to a future coordinator; one pull request for the whole conversation, taken over by the replacement request with one fast-forward commit (ADR-0028)
Verification after the merge (2026-11-13, proposed) A merge receipt set once with Merged; rolled out, configured and cleared as separate conditions; cleared read from container status in v0.5.0; missing or stale data ends in a new phase Inconclusive; a revert is a new request (ADR-0030)

Packaging, in detail:

  • The chart and the images are signed keyless by digest, with SBOMs and provenance for the images (verify a release).
  • The Helm chart is in dist/chart. It is published to oci://ghcr.io/pkalin/charts/shadewright on release tags, pre-release tags included (#83, #82).
  • The GitHub release lists the image and chart digests with the verify commands (#84).
  • The published chart runs the release's signed images by digest. A chart from a source checkout needs the digests or the explicit image.allowTag opt-in.
  • It installs with no values as an idle Shadewright: no watched namespace, no Azure workload identity.
  • It passes ct lint, ct install and helm test in CI (#307).

Still open:

  1. Helm-rendered and patched objects. How to map and patch objects that come from Helm charts, Kustomize patches or generators. Revisit when a real case needs it.
  2. YAML patching. Decided on 2026-11-04: ADR-0020 is accepted.
  3. Replace the bytes of one scalar found with go.yaml.in/yaml/v3, then check that only that value changed.
  4. A spike showed that kyaml reformats the file and changes aliased values.
  5. Kept as an item so that the numbers do not change (row above).
  6. Model choice. Benchmark on the scenario set at stage 1: a small model for triage and a stronger one for escalation. Proposed in ADR-0027: triage gpt-5.4-mini-2026-03-17 provisional, no escalation default, both settled by epic #503 before v0.4.0.
  7. Teams. Whether the maintainer's Microsoft account can receive Teams Workflows webhooks. If not, GitHub issues stay the only notifier for now.
  8. Required checks in policy. Whether a policy should name verification checks a request cannot drop, beyond the ones each action always runs.
  9. Scenario switch. Decided on 2026-11-03: ADR-0022 is accepted (row above). Kept as an item so that the numbers below do not change.
  10. Calling the model. Decided on 2026-11-03: ADR-0023 is accepted (row above). Where the daily spend is counted is #208.
  11. Incident retention.
  12. Incidents are bounded by a count (3.2), not deleted: the analyzer has no delete on them.
  13. Decided on 2026-11-05 (#251): the cap keeps counting every Incident, Resolved ones included, so the number of objects stays bounded. Resolved marks the ones safe to delete, and an admin deletes them by hand, then restarts the analyzer (procedure). Automatic retention with an archive, which needs a delete grant (invariant 6), is a separate ADR task (#458, planned). Who moves an Incident to Resolved, and when, is the lifecycle in 3.2. Built: a symptom seen again on a Resolved Incident escalates it within 24 hours of resolvedTime (or without one) and opens the next occurrence after, each a new object under the cap. Built too (#466): the closure rules set Resolved with resolvedTime (an hour quiet with no active request, or a request Succeeded) and Escalated (a request that ended without success), and a Warning event IncidentCapNear with the gauge shadewright_incident_cap_near reports 80% of the cap. Decided on 2026-11-07 (#466): until the verifier exists (#92), a request in Merged counts as final for closure (interim rule), and an Incident resolved by quiet time before any analysis reopens as Open on a recurrence within 24 hours instead of escalating.
  14. Kustomizations that wait.
  15. A Kustomization with wait: true or healthChecks stays not Ready while its workload is unhealthy, so the mapper refuses it (ADR-0012, amendment of 2026-11-04).
  16. Open: whether, and how safely, to accept applied-but-unhealthy objects (#259).
  17. Consequence symptoms and their cause. Decided on 2026-11-14: ADR-0039 is accepted. Built: the collector's fields (#789), the count of a consequence on its cause's Incident when the cause comes first (#791), the hold of a consequence with no cause (#792), the hold of a consequence whose cause the Incident controller has not seen yet (#828), the fold of a consequence Incident that opened before its cause (#793) and the executor's cancel of a request whose Incident is folded or gone before its pull request (#794). Settled on 2026-11-15 (comment on #432):
  18. The first build does not show the model the tally of absorbed symptoms (point 18); the tally is a later task behind the evaluation gate. Built since with #796 (decided 2026-11-16: every cause Incident with a non-empty tally gets it), after the recorded scenario oom/absorbed.
  19. A folded Incident that had been analysed before its cause appeared is also exempt from the 24 hour recurrence escalation (point 24). Built: the reopen with #791, the fold with #793.