Urgent.News

What's breaking now, across thousands of outlets.

Tech

A Media Asset Is a Stateful Object

A phone can upload a sharp photo and still leave the product with nothing usable. The bytes are there. A thumbnail may exist. A background cutout may even look clean. None of that answers the question the product actually has to answer: can this image be shown, retried, reviewed, or published? That is the failure I wanted to avoid. Vehicle listings are made out of media, yet accepting images is…

A media asset is a stateful object, not just a collection of bytes. The bytes may exist, but that does not guarantee the image can be shown, retried, reviewed, or published. Vehicle listings rely heavily on media, but accepting images is simple compared to ensuring the original work is preserved and the publish button remains attached. This post discusses the challenges of maintaining custody across storage, databases, vision workers, derived artifacts, human review, and publication.

The model treats a media asset as a stateful object moving through a bounded vision pipeline. Each expensive computer vision (CV) step must write back to the same asset story, or the product may display an image whose approval came from an earlier step. Intake is proven by an event, not a timestamp. The trigger is a durable row in project_events named capture.media_secured.

Its idempotency key includes the capture session identifier, and the payload contains the project identifier, source asset identifiers, required and missing roles, and a processingEnqueued flag.

Separate endpoints for image work are tempting, but they break when a partial retry occurs. Derived images may exist while quality verdicts are missing, and retries can produce better frames while the listing still points to the old image. A separate status endpoint can check progress by vehicle identifier, but readiness is ultimately determined by the persistent asset graph.

The design uses Postgres to manage six check-constrained stages and states for queued, running, succeeded, failed, cancelled, and declined work. Workers claim rows with a SQL path that uses FOR UPDATE SKIP LOCKED, and stale work can be reclaimed after fifteen minutes. The service role owns the claim path, and the drainer keeps the same shape.

Four lanes - storage, database, worker, and product - must agree for a listing to be ready. Storage proves the existence of signed source bytes and derived media bytes. The database records the capture media secured event and processing job rows. Workers perform matte preflight, studio render, listing generation, and marketing generation. The product displays owner visible readiness, human review queue, and publication gate. The binding between these lanes ensures the listing is only published when all conditions are met.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Govt Wheat Policy Has Failed Again

On 11th July 2026, the Federal Minister of National Food Security, Rana Tanveer Hussain, chaired the 9th Wheat Board meeting … Read More The post Govt Wheat Policy Has Failed Again appeared first on…

ssh-keygen -N Puts Your Passphrase in ps

I'm writing a small GUI that walks a person through creating an SSH key. The core of it is one call to ssh-keygen , and on paper that call is trivial: ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N…

  • Passing passphrase via -N argument is insecure as it resides in /proc
  • Pseudo-terminal approach depends on exact prompt text which changes over time
  • SSHASKPASS mechanism securely retrieves passphrase without exposing it in argv

Modelling Swedish intestate succession in TypeScript

When someone in Sweden dies without a will, the Inheritance Code ( ärvdabalken , SFS 1958:637) decides who gets what. The rules fit on two printed pages.

  • Sweden's intestate succession law is outlined in the Inheritance Code (ärvdabalken)
  • TypeScript calculator adapts this algorithm for Swedish users
  • Pure function vemArver(input) determines inheritance without DOM or I/O

More from Monday 12 October →