PROJECT
A change intelligence platform
- Python
- PostgreSQL + pgvector
- Kafka
- Debezium
- Redis
- Kubernetes (k3s)
- Terraform
- React
Contents
Delta maintains a live, evidence-backed record of what is currently true about the things a person follows, and tells them when that record materially changes. The unit it delivers is a Change Event: the believed value moved from A to B, it matters, and here is the evidence behind it.
THE PROBLEM
Information about a technical ecosystem is abundant. The expensive work is not finding it. It is continuously deciding whether something a person cares about actually changed, whether that change matters, and what is different from before.
Release notes, documentation, advisories, repositories and feeds all produce overlapping coverage of the same underlying occurrence. A keyword alert fires on a mention, which is not the same as the thing itself having moved. An answer engine will tell you what is true now if you ask it now, but it keeps no record of what it told you last time, so it cannot tell you what changed in between. Either way the reader has to remember the previous state themselves in order to judge whether an update means anything.
Holding that state is also what makes the awkward cases survivable. A source can retract a story it published yesterday. An announcement can arrive days after the event it describes. A feed can quietly start returning nothing at all while still reporting success. Alerting that keeps no previous state cannot tell any of those apart from a genuinely quiet week.
The wedge is therefore stateful change detection: identify a material change in something specific, show the transition from the previous state, and carry the evidence.
WHAT DELTA TRACKS
A topic is a subscription to a canonical entity, and the state belongs to the entity rather than to each subscriber. This is the structural decision that makes the economics work: the expensive processing happens once per entity, however many people follow it.
An entity is defined by its coordinates — its identity in someone else's namespace, such as a GitHub repository, an OSV package or an endoflife.date product. Fetch URLs are composed from those coordinates against allowlisted host templates, so adding an entity is adding a row rather than authoring an integration. The same construction closes server-side request forgery as a class rather than filtering for it: no URL Delta fetches is ever supplied by a user.
Against each entity Delta holds a small set of typed facts — the current stable version, open advisories, an end-of-life date and a handful of others — and every entity declares which of them it supports. A fact type an entity does not declare cannot enter its state and cannot produce a Change Event. That bound is what makes material change something a rule can decide, rather than an open-ended comparison of two documents.
Absence is not removal. If a source stops mentioning an advisory, it has not said the advisory ended, so a fact leaves state only on positive evidence. An empty response from an advisory API means the query failed, not that there are no advisories — and treating the two as the same thing would turn one bad response into a burst of confident, wrong “resolved” events across every entity that source feeds.
THE PIPELINE
One observation travels a fixed path from a public source to a delivered Change Event, and the work is grouped by the service that performs it.
delta-ingest
- Picks a source that is due and fetches it with a conditional request, so a source that has not changed costs almost nothing to check.
- Validates that the response is healthy, applies the source's storage policy, normalizes it into an observation, and fingerprints it so a repeat is recognised.
- In a single transaction, stores that observation together with the intent to announce it.
delta-processing
- Parses structured sources deterministically, with no model involved. The model is used only for free text, and only where deterministic parsing found nothing.
- Resolves which entity the observation is about by exact match on an external identifier — never by similarity.
- Groups observations that describe the same real-world occurrence, then decides whether the change is material by looking it up in a rule table.
- Compares the result against what Delta currently believes about that entity.
- In a single transaction, updates the fact, writes the Change Event and its evidence, and writes the intent to announce it.
delta-delivery
- Scores the event against each subscriber's preferences, applies each channel's delivery policy, and sends it in-app and by email.
Steps one to eight run once per entity and read no user data at all. Per-user work begins only at step nine, after a Change Event already exists. That invariant is what keeps the cost of a popular topic flat as its audience grows.
Step seven has three outcomes rather than two, and the third is easy to miss. If the value differs, a new Change Event is created. If the value is unchanged but the observation belongs to a fact Delta already holds, it is recorded as corroboration — the evidence and confidence are strengthened and no event is raised. If it neither differs nor belongs to anything known, nothing is recorded. All three mark the observation as processed, because an observation that produced no claim may still have been handled perfectly. Plenty of legitimate observations contain nothing material.
WHERE THE MODEL IS ALLOWED TO ACT
The model is an uncertain parser, never an authority. Structured sources are parsed deterministically. AI extraction runs on free text only, and only when deterministic parsing has produced nothing.
Four constraints are enforced in code rather than in prompt wording:
- Output must satisfy a strict schema; a parse failure is retried once, then abandoned.
- The fact type must already be one the entity supports, so the model cannot widen the state schema by inventing a new kind of fact.
- A verbatim evidence quote must be present in the stored source content. A claim whose quote cannot be found in the source is dropped as ungrounded.
- Claims below the extraction-confidence threshold are kept as candidate evidence and are never promoted into state.
Model-reported confidence is treated as a rough ordering rather than a real probability, and it may only ever cause a claim to be rejected. High confidence never buys a claim past the schema, the fact-type check or the evidence quote.
Explanation generation runs after the Change Event has already been decided, and cannot alter materiality, state or the diff. If it fails, the event is created with a deterministic template summary instead. Prose is never on the correctness path. A user's preferences never enter a prompt at all — relevance is arithmetic over a small profile, so personalisation costs no inference and no user data ever reaches a model.
THE OUTBOX
Writing the new state to the database and announcing it on Kafka are two separate operations, and either can fail without the other. One order of failure is worse than the rest. The database commit succeeds, so the new value is now what Delta believes. The publish to Kafka then fails, so nothing downstream ever hears about it.
Retrying does not rescue it. Re-running the same observation compares it against the state, which already holds the new value, finds no difference, and correctly concludes there is nothing to report. The Change Event is now permanently invisible: it happened, the record of it is right, and no subscriber will ever be told. Sweeping for stragglers afterwards does not find it either, because an entity with no pending work looks identical to an entity whose observations genuinely produced nothing.
A transactional outbox removes the failure rather than compensating for it. The intent to publish is written inside the same transaction as the state change, so the two either both exist or neither does. If the process dies at any point afterwards, the outbox row survives and a publisher retries it. Publication becomes at-least-once with no possibility of loss, and consumers are idempotent, so a repeat is harmless.
It is also what makes a modest single-broker Kafka acceptable here: PostgreSQL holds both the authoritative record and the intent to publish, so Kafka's contents can always be re-derived.
GUARANTEES STATED AS THEY ARE
In-app delivery is effectively once. Delivery state is a database row and the feed is the source of truth, so a missed real-time frame is reconciled the next time the feed is read.
Email is at least once, because a database row can be idempotent while an external side effect cannot: the provider can accept a message and the process can die before the delivery row is updated. Delta narrows that window by recording the attempt before making it, and closes it entirely where the provider supports idempotency keys, using a key derived from the user, the event and the channel. Where it cannot be closed, a duplicate is preferred to a miss — a missed material change destroys trust, and a duplicate email is an annoyance.
Delivery failure never blocks state maintenance, because delivery sits downstream of truth.
FAILING CLOSED
Delta is a trust product, so uncertainty must never harden into an assertion. If the model is unavailable, semantic work waits and no state is invented. A low-confidence extraction is kept as candidate evidence rather than promoted. An observation about an entity that cannot be resolved is stored but produces no claim. Sources that contradict each other keep the contradiction and defer the transition rather than picking a winner. An event that is later disproven is marked disputed, then retracted with the evidence that overturned it, and the history shows that it happened.
If something breaks while Delta is working out what is true, it stops and records nothing. If something breaks while telling you about it, it keeps going and retries.
The most dangerous failure carries no error at all. A source can return HTTP 200 with a body that is stale, empty or malformed, and from the outside that is indistinguishable from a quiet week. So a fetch is validated rather than trusted: transport failures, bodies that do not parse, and a source that has gone quiet for longer than its expected cadence all mark it degraded.
The distinction that matters is between a healthy source with nothing to report and a source that has stopped reporting. The first is entirely normal — most sources are quiet most of the time, and that quiet is real information. The second only resembles it. A degraded source is surfaced to operators and to users, and is excluded from any conclusion that nothing changed, so the fact that it said nothing is never counted as evidence that nothing happened.
One alarm covers what no other signal can. If sources are healthy and yet no Change Event has been produced anywhere for twenty-four hours, something has quietly stopped working. Every other measurement confirms that the machinery ran; only this one asks whether the machinery found anything.
ARCHITECTURE
Five application services and one static bundle. delta-ingest schedules and fetches sources; delta-processing turns observations into state changes; delta-delivery applies per-user relevance and sends; delta-api serves every read, write and WebSocket frame; delta-cdc-consumer writes the reporting projection; and delta-web hands out the compiled client and nothing else.
Two decisions shape the deployment. Kubernetes runs compute, not state — application services, the model runtime and observability run in k3s, where independent scaling, rollout isolation and failure isolation are genuinely useful, while PostgreSQL, Kafka, Redis and Debezium run alongside on the same host under a container runtime. Running stateful systems in Kubernetes adds operator complexity, storage orchestration and failure modes that a single-node deployment gains nothing from. And in-app delivery is not a direct call: delivery publishes to a Redis channel per user, and whichever API replica happens to hold that socket forwards it, which is why Redis sits between them rather than beside the API.
KAFKA AND CDC BOUNDARIES
Kafka carries two things and no more: observations from ingestion to processing, and Change Events from processing to delivery. User feedback and delivery receipts stay in PostgreSQL, where nothing consumes them. Keeping the broker this narrow is deliberate — every additional topic is another ordering and replay problem to reason about.
An event and the retraction that later withdraws it travel the same topic, and both are keyed by the entity they concern. Kafka preserves order within a partition and routes one key to one partition, so the retraction is always queued behind the event it retracts and cannot overtake it. A subscriber can never be told that an event was withdrawn before being told it existed.
Consumers are idempotent, retries are bounded, and a message that keeps failing is moved to a dead-letter topic along with the error that stopped it. Replaying from there is a deliberate operator action and never automatic, because automatic replay simply recreates the loop that caused the failure in the first place.
Change data capture is kept as a separate, bounded path: Debezium watches only the state and Change Event tables and feeds an analytics-shaped consumer. The rule around it is absolute — CDC propagates database rows, domain events drive behaviour, and the two never trigger the same effect. The moment both could cause a notification, every effect in the system has two possible causes.
That capability has a real operational cost, and it is accepted knowingly. PostgreSQL will not recycle a write-ahead log segment newer than the oldest replication slot's bookmark, so a slot with nothing consuming it pins the log, accumulates without bound, and eventually stops the database accepting writes. Slot lag is monitored and bounded, and a slot left idle is dropped rather than parked.
OPERATING IT
Infrastructure is defined in Terraform, separated into layers by how often each one changes and how much damage destroying it would cause. OpenTelemetry instruments every service, with Prometheus for metrics, Loki for logs and Tempo for traces, so a single trace follows one observation from fetch through extraction, resolution, materiality and the state comparison all the way to delivery, crossing the message broker intact. The two questions that dominate debugging are why something reached a user and why an observation produced nothing, and both are answered by following one trace end to end.
Two of the measurements are product measurements rather than operational ones. The number of Change Events suppressed, and the number of state promotions blocked, measure the mechanisms the whole design exists to provide. If suppression sits near zero, the filtering is not filtering anything and the premise has not been demonstrated.
On the security side, identity is OIDC-compatible and no passwords are stored. Network policy is default-deny, and only ingestion, the model gateway and delivery are allowed outbound internet access — the processing service has none, so content arriving from a source has no route back out. The runtime database account cannot alter schema; migrations run under a separate account, so a compromise at the application layer cannot reshape the database. Source content is treated as data and never as instruction, and the defence against prompt injection is the structural validation described earlier rather than any wording in a prompt.
PROVING IT
The first thing built is the benchmark, not the infrastructure. The hardest claim Delta makes is that it can produce a correct before and after out of messy evidence, and everything else is engineering arranged around that claim.
Two questions are measured separately, because they fail for different reasons and a single score would hide one behind the other.
- Is the diff right? Frozen historical cases are replayed with their recorded source responses, and the output is checked against both the Change Events that should appear and the ones that should not.
- Can the fact taxonomy represent the change at all? This is asked against a list of genuinely material changes compiled before the extractor existed, by someone who was not building it — otherwise the taxonomy ends up graded by its own author.
A few bars are absolute, because for those the right answer is not a matter of degree: the before-state must be correct on every event produced, materiality must match the rule table exactly, one real-world occurrence must yield exactly one event, and a window in which nothing happened must produce nothing. Recall is deliberately not fixed in advance. A target chosen before anyone knows what the taxonomy actually covers is a number invented to be met, so it is calibrated from the first run instead.
The fixtures have to include the awkward cases or the exercise proves nothing: a retraction, a release that slipped and was re-dated, an advisory published before the event it describes, two entities that share an alias, one occurrence reported by five different sources, and a stretch of time where the correct output is silence.
Alongside all of it, a plain keyword-alerting baseline runs against exactly the same fixtures and its results are published next to Delta's. That comparison is the point of the whole exercise. If Delta cannot clearly beat a keyword alert on noise while matching it on recall, then the premise the product rests on has not been demonstrated — and it is better to learn that from a benchmark than from users.