CaseMark hardens the edges before going public

Pre-launch review pass on CaseMark's fork turns a handful of quiet failure modes into loud, controlled ones.

securityinfrastructure

Ahead of opening the doors, CaseMark swept the codebase for the kind of issues that only bite in production. AI endpoints now sit behind a rate limit on top of the existing login throttle, and download links have a configurable expiry instead of living forever. Server errors no longer spill raw internals back to the browser - only a small list of known-safe messages get through, with everything else collapsing to a generic failure with a stable code the frontend can act on. Mid-chat errors like hitting a demo budget or running out of quota now surface as specific, intelligible messages rather than "something went wrong."

The quieter wins matter too: a missing database column was silently dropping Matter chat history, and JSON columns were failing to write without anyone noticing. Both are now caught and surfaced. Authorization on tabular data got tighter and faster at the same time.

So what For anyone running a legal-AI product publicly, this is a tidy worked example of the unglamorous hardening that separates a demo from a launch.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

7 commits from CaseMark/mikeoss-casedotdev, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
3011eb79 Persist workflow metadata for chat messages kveton 2026-05-04 ↗ GitHub
d5539959 Harden document access and request limits kveton 2026-05-04 ↗ GitHub
4e770c9b Normalize document load errors kveton 2026-05-04 ↗ GitHub
a2842e05 Handle streamed chat errors kveton 2026-05-04 ↗ GitHub
e0f2d13d Optimize tabular document access checks kveton 2026-05-04 ↗ GitHub
3aadb6f8 Serialize jsonb values in Postgres compat writes kveton 2026-05-04 ↗ GitHub
8a72b816 Merge pull request #8 from CaseMark/codex/stream-error-review Scott Kveton 2026-05-04 ↗ GitHub
[codex] Handle streamed chat errors and harden document access

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-38.md from inside the repo you want the changes in.

⬇ Download capture-thread-38.md