Media Intake Service / Media production tooling / 2026
A media catalogue that can recover interrupted imports.
A local media catalogue that recognises the same bytes on a retry and keeps usage rights and review decisions attached to the right files.
Confidential work. Names and identifying business details have been changed.
- ROLE
- Software engineering
- STATE OF THE BUILD
- Prototype
- RECORD UPDATED
THE WORK
The project.
Media Intake Service brings original files into a local catalogue with content hashes, manifests and a recoverable import history. Repeated imports can reuse an asset's identity, while rights records and reviews are checked separately against the material they cover. Python CLI and MCP entry points share the same intake service.
ATTEMPTS & CORRECTIONS
What changed along the way.
Keeping usage conditions without treating them as a ban
- At first
- The toolkit kept all rights restrictions in one list. Its current-rights check rejected a record whenever that list contained any text.
- What needed to change
- A condition attached to an allowed use was treated the same as a restriction that prohibited it. The model needed an explicit distinction; guessing permission from a free-text sentence would only hide the ambiguity.
- The change
- The rights evaluator now classifies usage conditions separately from blockers, then checks the intended purpose, asset and supplied scope. Conditions and attribution requirements remain on the asset record. Explicit blockers, expired rights and older restrictions that haven't been classified still prevent use.
- The result
- The committed change can carry the conditions of an allowed use forward while leaving unresolved restrictions blocked. Test definitions follow both cases through intake status. They weren't rerun for this account, and the review made no decision about real usage rights.
IMPLEMENTATION
Design choices.
- Recovery needs two routes. A receipt can replay an import that finished; surviving manifests can recover assets from an import that stopped before its receipt was written. Treating both as a fresh import would lose that distinction.
- Content, not the filename, identifies a reusable asset. Two files with the same name can contain different material, and different content at an immutable destination raises a conflict instead of being overwritten.
- Paths resolve inside the configured media root. Traversal and escaping symlinks are rejected, and a rights reference must belong to the target product. Those checks happen before the service copies accepted files.
- File replacement is atomic, but the whole import spans several writes. Manifests give the derived indexes a recovery source; they don't make the operation a transaction that can roll every file back.
- Usage conditions stay with the asset, while explicit blockers and unresolved restrictions can still prevent use. The review policy also checks current manifest hashes, so an older decision doesn't automatically cover changed material.
HOW IT FITS TOGETHER
Architecture.
- An import starts with a scan, so the caller can see accepted files, duplicates and filename collisions before applying changes. Typer and FastMCP both call the same Python service; neither has a separate copying implementation.
- The service hashes the product, source classification, rights reference, paths and file contents into one request identity. A completed request returns its saved receipt. The lookup runs again after taking the product lock, covering an import that finished while another caller was waiting.
- If no receipt exists, saved manifests let the service reconstruct its asset indexes before copying anything new. Matching content keeps its asset ID. New files go through a temporary copy, flush, sync and hash comparison before an atomic replacement puts them in place.
- The import then records manifests, indexes, status and events before writing its final receipt. Review is a separate step: the approval policy compares required reviews and a human final decision with current manifest hashes. Copying the right bytes doesn't decide whether they're approved for use.
Explore the architecture map9 components · 10 connections
Media Intake Service local intake and review
Import identity, commercial rights and final approval are separate records and decisions.
Local entry points
Media intake
Evidence and review
Scroll or drag the background to move. Use the zoom buttons to resize.Arrow keys move between components. Enter selects.
Choose a component to explore
Select a numbered component on the map or use the component menu. Its details and connections will appear here.
No component selected.
All connections (10)
- 01 · CLI and MCP callers → 02 · Bounded root and request checksintake request · Direct call
- 02 · Bounded root and request checks → 03 · Import planvalidated inputs · Direct call
- 03 · Import plan → 01 · CLI and MCP callersplan only · Response / return
- 03 · Import plan → 04 · Apply and idempotency gateapply requested · Direct call
- 04 · Apply and idempotency gate → 05 · Locked verified importnew valid request · Direct call
- 05 · Locked verified import → 06 · Assets and manifestsverified local import · Direct call
- 07 · Rights evidence → 05 · Locked verified importrights context · Direct call
- 06 · Assets and manifests → 08 · Approval evaluationcurrent manifest hashes · Direct call
- 07 · Rights evidence → 08 · Approval evaluationrights review evidence · Direct call
- 09 · Human final decision → 08 · Approval evaluationfinal decision · Direct call
MADE WITH
Python · Typer · Pydantic · JSON Schema · MCP · Pillow
CHECKS & RESULTS
What was checked.
A source review shows what the code does. It is not a fresh test of the running app.
Code and development records reviewedReviewed
The code, tests and available development records were checked. Reported test results keep their original scope. No fresh app or live deployment check was run for this write-up.
- Scope of this check
- Code review, not a fresh run of the app
NEXT
Still to work through.
The implemented work is local intake and review. Recovery tests cover replay, surviving manifests and content conflicts, but they weren't rerun for this account. The provider adapter has no network implementation, so the catalogue isn't being presented as a finished media-generation service.