Problem
A file object with no contents and no binary:true flag becomes contents:"" without an error. The caller cannot distinguish a genuinely empty source file from an upstream schema omission.
Evidence
assemblePadCodeFiles uses contents ?? "" and only adds an error when rawContents is present and non-null.
Acceptance criteria
- Mark missing contents on nonbinary files as a schema error/incomplete payload.
Discovered during a systematic audit of CoderPadMCP against its tool schemas and the current CoderPad API contracts.
Problem
A file object with no contents and no binary:true flag becomes contents:"" without an error. The caller cannot distinguish a genuinely empty source file from an upstream schema omission.
Evidence
assemblePadCodeFiles uses contents ?? "" and only adds an error when rawContents is present and non-null.
Acceptance criteria
Discovered during a systematic audit of CoderPadMCP against its tool schemas and the current CoderPad API contracts.