Skip to main content

March 5th, 2026

The Accountability Contract Pipeline Today focused on establishing the core architecture for the Accountability Contract, specifically bridging the frontend draft state with Convex Storage and the backend service layer.

1. Penalty Architecture & Deferred Uploads

We implemented a robust, bandwidth-saving strategy for media uploads:
  • Deferred Asset Upload: Added middleware in the useCommitTask orchestrator. Photo assets are kept locally as file:// URIs during the configuration process to avoid wasting bandwidth. Upload to Convex Storage is triggered only upon the final “Commit” button press.
  • Stateless UI / Stateful Backend: Zustand now tracks a standard photoUrl. Upon submission, our interceptor swaps local URIs for permanent storageId references, allowing the backend to synchronously resolve HTTPS URLs.
  • Centralized File Registry: Integrated api.files.record into the pipeline so all penalty assets are registered with a penalty_photo tag, enabling safe garbage collection and ownership tracking.