Day 34 of building DocuPulse AI. Today's problem is the one that would actually get a company sue...Day 34 of building DocuPulse AI. Today's problem is the one that would actually get a company sue...
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
Day 34 of building DocuPulse AI. Today's problem is the one that would actually get a company sued.
DocuPulse analyzes confidential contracts. The moment two law firms use it, a hard rule kicks in: Firm A must never, ever see Firm B's data. Not their contracts, not their answers, not even a cached response.
That last one is the trap. Yesterday I built a cache that matches questions by meaning. So picture it: Firm A asks "what's our liability cap?" and the answer gets cached. Firm B asks the same question about their contract. A naive cache sees two near-identical questions and serves Firm A's confidential answer to Firm B. No error. No warning. Firm B just reads another company's private contract terms, presented as their own.
That's not a bug. That's a confidentiality breach between two clients — the kind that ends a legal-tech company.
The fix is old-fashioned backend discipline: every single query — every document search, every cache lookup, every stored result — is filtered by which customer is asking, before anything else runs. I made the customer ID a required parameter on the search functions, so there's no way to accidentally run an unscoped query. The safe path is the only path.
The AI made this trickier only because the dangerous queries — semantic search, meaning-based caching — don't look like normal database queries. So they're the easy ones to forget to protect. And a forgotten filter here doesn't crash. It quietly hands one client another's secrets.
The pattern of this whole month, at its highest stakes: the failures that matter most are the silent ones.
#AIEngineering #Laravel #BackendEngineering #BuildInPublic
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started