The Result Is Not Finished Until It Is Safely Published

FlyingMouse Format’s conversion pipeline does not end when an engine writes a file. This chapter follows the result from temporary output through registration, preview or download, attachment staging, and the user-selected desktop or CLI destination. The practical focus is artifact correctness: how the project prevents a valid intermediate result from becoming a missing, truncated, broken, or misleading file at the moment the user tries to keep it.

A temporary file is not yet a user result

During conversion, FlyingMouse Format works inside an isolated runtime area. Uploaded files and generated outputs have a lifecycle separate from the user’s ordinary documents. When a conversion succeeds, the server registers the output with a download name, MIME type, and access information. Preview and download routes resolve through that registration rather than exposing an arbitrary path in the runtime directory.

That distinction gives the application a way to answer a basic ownership question: which result belongs to which active conversion session? The download registry records the output and, when a Markdown conversion externalizes images, the associated asset directory. A preview can therefore use the same identity as a later save operation. A stale or unknown identifier is rejected instead of becoming a general file browser into the temporary directory.

The registry also affects cleanup. Orphaned uploads and abandoned temporary material can be removed, while registered products remain available during the running session. On shutdown, the runtime directories are purged because the in-memory registration that gave those files meaning disappears with the process. A result that was not saved before the session ends may need to be generated again. This is a practical boundary of local temporary processing: the application protects the current workflow, not an invisible permanent archive.

The lifecycle can be expressed as a sequence of ownership transitions:

stateDiagram-v2 [*] --> TemporaryOutput TemporaryOutput --> RegisteredResult: Conversion succeeds RegisteredResult --> PreviewOrDownload: User or CLI requests result PreviewOrDownload --> PartialFile: Save begins PartialFile --> Published: Complete non-Markdown output PartialFile --> AssetStaging: Markdown has assets AssetStaging --> Published: All assets and references pass PartialFile --> RetryCleanup: Stream or size failure AssetStaging --> RetryCleanup: Asset or rewrite failure RetryCleanup --> RegisteredResult: Retry while session is valid RegisteredResult --> InvalidAfterRestart: Process/session ends Published --> [*] InvalidAfterRestart --> [*]

The state names matter because they prevent a common mistake: treating “generated” as synonymous with “saved.” A generated result can still be lost to an interrupted download. A registered Markdown file can still lack a usable attachment bundle. A file in a runtime directory can still be inaccessible after the session that registered it ends.

The partial-file protocol protects the old destination

The most dangerous save failure is not merely that the new file is incomplete. It is that the failure damages a file the user already had.