Skip to main content
T3 · SRE / platform: the deterministic-core pattern at its sharpest. Approved overrides merge into the baseline (RFC 7396), the live config diffs against THAT (RFC 6902), blake3 fingerprints the evidence, and the LLM’s only job is explaining the patch to a human at 3am.

The job

« Did anyone change prod config without telling us? » Pure-diff monitors page you for every sanctioned change too: alert fatigue. This sentinel knows what was approved: it reconstructs the EXPECTED state first, so the diff contains only the drift nobody signed off on.

The shape

The file

config-drift-sentinel.nika

How it works

1

RFC 7396 reconstructs the sanctioned state

nika:json_merge_patch applies the approved overrides to the baseline: null deletes a key, exactly per the RFC. This is the builtin jq’s recursive merge can’t replace.
2

RFC 6902 names what actually changed

nika:json_diff returns a standard JSON Patch: machine-readable operations, not a text diff. Empty patch = healthy prod = total silence.
3

Evidence lands in the journal

The blake3 fingerprint of the live bytes, taken before they are parsed, rides in the config.drift.scan event that record emits, next to the patch and its paging subset. The alert carries no detail and points to that event, so when you investigate later you know exactly which state fired.

Constructs you just used

Run it

What it needs: Nothing to rehearse: the default endpoint resolves nowhere, the fetch recovers, and the pipeline runs against the sample baseline. A real watch needs a local model (Ollama serving qwen3.5:4b) for the explanation.
1

Rehearse it

A mock model answers, the sample files come with it, and nothing is written in your folder. Before it runs, nika try names the hosts a step may reach: may reach: api.internal.example.com · hooks.slack.com — the mock replaces the model, not the network.
2

Get your own copy

Save the file above as config-drift-sentinel.nika in a new folder, then download the sample it reads:
3

Check it, then run it

The run writes no file: it emits a config.drift.scan event and pages only for paging-class drift.Any other model works: pass --model <provider>/<name> with its key, and cap a cloud model with --max-cost-usd.To watch a real service, pass --var config_url=https://…, add that host to permits.net.http, and set ONCALL_WEBHOOK_URL to a webhook on hooks.slack.com.

Make it yours

  • Run it every 15 minutes from your scheduler; the record event stream becomes your drift history.
  • Watch N services: lift the URL + baseline into a list and for_each the whole sentinel body.
  • Auto-remediate the SAFE class: a when: branch that opens a revert PR via your MCP git server.

Next · PR review fan-out

One read-only agent per changed file: the swarm pattern, with a deterministic grep sweep beside it.