Require Bcyip-Agent and fileId on document create
Version: 1.2.0 Date: 2026-10-18
Goal: A deposit without an agent header must not create a document. Tower may still omit fileId. Every other agent must link a RemoteFile.
Solution: Reject POST /api/v2/documents with 400 when Bcyip-Agent is missing or blank. Any non-empty header value is accepted; it is not looked up in agent_codes. fileId stays optional only for iptower (case-insensitive) and required otherwise. Neo does not create RemoteFiles; upload stays on the legacy API.
Features:
- Missing or blank
Bcyip-Agent→ 400 Bcyip-Agent: iptower→fileIdoptional- Any other agent, including
ipmagicbox→fileIdrequired (400 if missing) - Provided
fileIdstill must exist, belong to the job, match the hash, and not already be linked
Files Modified:
src/domains/document/document.service.ts- Required header and fileId rulesrc/domains/document/document.controller.ts- OpenAPI ingest description
Release fragment: fix-missing-fileid