Debugging issue with custom post type publishing as blank

After you publish the post, are you seeing a notice similar to this in the editor’s Discourse sidebar?

If the ‘success’ message is not displayed, but the post has been published, then the issue is with the custom post type’s configuration.

If the ‘success’ message is being displayed, the custom fields should be available as post metadata that can be returned with get_post_meta( $post_id, 'your_meta_key_name', true );. The easiest way to figure out what is going on would be to write to a debug.log file from your cosmos_custom_publish_format_html function.

I’m away from work for the week, so I might be slower at answering questions than I normally am.