Atishay Kasliwal — Software Engineer, production AI and distributed systems.

PolicyFabric: make the contract graph visible

Data contracts usually fail far from the change that caused them. PolicyFabric came out of wanting the contract graph itself to be the product, not a hidden implementation detail.

Most data contract failures are obvious only after they are expensive.

A producer changes a field. Nothing breaks where the change happened. Hours later a downstream consumer fails in a different service, with a message that points nowhere near the real cause. By the time somebody traces it back, the team has already spent time debugging the wrong layer.

PolicyFabric started from wanting that failure mode to be visible earlier and in the right shape.

#Contract failures are topology problems

The usual tooling around schema changes tends to flatten the problem into logs, reports, or lists of violations. That is useful up to a point, but it loses the most important piece of context: who depends on whom.

Contract failures are inherently topological. The core question is never just "is this field change breaking." The real question is "which downstream edges does this break, and how far does the blast radius travel?"

Once I framed the problem that way, the product direction became clearer. The graph itself had to stop being a hidden implementation detail. It had to become the surface.

#Why I chose a graph over a report

PolicyFabric parses services, schemas, and producer-consumer relationships into a directed graph, then evaluates changes against that graph before they ship.

That sounds like an implementation choice, but it was really a UI choice too. I did not want the output to be a block of text somebody needed to interpret after the fact. I wanted the system to answer the downstream question visually:

  • what changed
  • what depends on it
  • where the violation sits
  • which path through the system is affected

The visual layer is the difference between "something somewhere might break" and "this edge here is the problem."

#The full graph is often the wrong view

One challenge showed up quickly: graph interfaces become unreadable faster than people expect.

Rendering every service and every contract at once sounds comprehensive and often produces a diagram nobody can parse. Past a certain size, the graph stops explaining the system and starts advertising its complexity.

That is why the more useful view is usually the affected subgraph, not the whole topology. When a change is evaluated, the interesting question is the local consequence set. Collapse everything else and let the reader focus on the edges that matter right now.

That sounds like a visual convenience. It is actually a correctness feature. A readable warning is more enforceable than a perfect but overwhelming one.

#Enforcement only works when it is cheap to obey

I keep coming back to this idea in developer tools: enforcement is only effective when the cost of compliance stays low.

If the system catches a breaking contract only after deployment, it is already too late. If it catches the issue earlier but explains it poorly, people work around it instead of trusting it. If it explains the problem clearly at change time, the right fix is usually the easiest fix.

That is the real value PolicyFabric aims for. Not just detecting breakage, but detecting it early enough and clearly enough that teams can act before the incident exists.

#What I would push next

If I kept extending this system, I would invest in richer rule authoring and deeper change previews: not just "this breaks," but "this breaks because this consumer expects this field contract, and here is the exact edge path."

I would also keep protecting the same product instinct that shaped the first version: make the architecture legible. Most systems already contain the information you need to reason about contract risk. The problem is that the information is scattered across definitions and repositories and logs.

PolicyFabric is my attempt to pull that structure into one place and make it visible enough to act on.

When a tool like this works, the best outcome is boring. The breaking change never ships, the incident never starts, and nobody has to figure out at 2 a.m. which service quietly depended on the field you just renamed.