Mike's Checks/gpt-6-astra/16 mcp-file-upload
16 mcp-file-upload
gpt-6-astraCodex CLIhigh effortrun 22 Sep 20261,563,925 tokens
▸Instructions — what the model was asked
we need to add the ability to upload files via MCP otherwise we cant actually add new tasks or cases can we? we need to be able to give files that go into the input context. can you build that and give me the PR to send to my eng team
Start from input/start-code.zip (EveryInc/checks at commit 18df437). input/instructions.txt preserves the original request and input/START_HERE.md explains the archive. Work in the extracted code/ tree. Give me the PR link, or a reviewable patch if authenticated GitHub access is unavailable.
Answer
Implemented MCP input uploads in code/. GitHub credentials were inaccessible in this environment, so no PR was opened.
Send your engineering team mcp-input-uploads.patch and the prepared PR description.
The new upload_input tool accepts text or Base64 binary files after add_task or add_case. It preserves relative paths, replaces existing files at the same path, and makes inputs available through get_case, runner bundles, and benchmark exports. Uploads use the existing owner/editor permissions and benchmark scope.
Assumptions: one file per call, a 25 MiB decoded limit, and clients supply actual file contents. Larger or chunked uploads and fetching files from URLs are outside this patch. Client/proxy limits may be lower.
Apply from a clean checkout of EveryInc/checks:
git switch -c add-mcp-input-uploads 18df437ab76efbc91c4c7796959be20c489049e9
git apply --check /path/to/mcp-input-uploads.patch
git apply /path/to/mcp-input-uploads.patch
Verified: clean patch application against the supplied archive, syntax for all 12 changed Ruby files, and 6 isolated validation tests with 46 assertions. Rails integration/model tests and RuboCop remain unverified: dependencies were unavailable and the sandbox could not reach RubyGems. Thirteen regression tests are included. See VALIDATION.md for commands and evidence.
Checks
5/7No AI-tell wordingai-wordingevery task
deliverable text contains none of the shared AI-tell phrases in bench/ai-tells.txt. Task checks may add narrower contractual bans, but must not repeat this shared floor.
shared AI-tell phrases: a testament to; it is important to note; paradigm shift; seamlessly; when it comes to
Focused diff sizefocused-diff-sizethis case
Is the final patch at most 15 changed files and 220 added lines? Nitesh's PR #33 changed 14 files and added 171 lines; the larger agent PR #35 changed 31 files and added 402 lines.
13 changed files and 360 added lines (limits: 15 files, 220 lines)
Finished within 30 minutescompletion-within-30mthis case
Did the agent finish successfully within 30 minutes of the runner start, without a timeout?
agent run took 10.9 minutes
Q1Usable MCP upload paththis case
Judge's reasoning
New Mcp::UploadInputTool (registered in config/initializers/mcp.rb, 18 tools) lets an owner/editor call add_task/add_case then upload_input with text or encoding:"base64" binary content, attaching real Case#inputs — no app upload, not pasted into prompt; add_task/add_case next_step now point at upload_input.
▸Rubric
Can an authorized editor or owner create a task or case through MCP and immediately attach text and binary files as case inputs using a returned inputs_url or an equally direct MCP workflow? FAIL if a person still must upload through the app or files only get pasted into the prompt.
Q2Input round tripthis case
Judge's reasoning
Case::InputFiles#upload_input stores bytes via ActiveStorage blob with metadata:{path:} — the repo's existing convention (import/repo.rb + attachment_paths.rb `path`), so Bundle#folder writes files["#{root}/#{f.path}"] and Export picks them up; re-upload at the same path creates the new attachment then destroys prior same-path attachments inside a with_lock transaction, so no duplicate path.
▸Rubric
Do uploaded file bytes and relative workspace paths survive into the case bundle that a model runs with, including replacement of a second upload at the same path? FAIL if a successful call leaves no usable input or duplicates an existing path.
Q3Reject bad inputsthis case
Judge's reasoning
write_refusal blocks non-editors and unbound/unauthenticated tokens before call; validate_input_path! rejects empty/absolute/`..`/`.`/backslash/colon/control/oversized segments and reserved prompt.md, instruction_override, eval/, cases/, skill/, plus file-vs-directory collisions; non-string content is rejected by the dry-schema `value(:string)` and bad encoding/strict-Base64 by decode_input — all raise before any attachment (blob purged in the rescue).
▸Rubric
Do unauthorized uploads, paths outside the case workspace, paths that would shadow prompt.md or eval/, and non-file multipart values fail before attaching an input? FAIL if any such request reports success or writes bytes.
Q4Reviewable PR handoffthis case
Judge's reasoning
Reviewable artifact delivered: mcp-input-uploads.patch (verified by me to apply cleanly to base 18df437 and reproduce the tree) plus PR.md description and VALIDATION.md; tests test/integration/mcp_inputs_test.rb and test/models/case/input_files_test.rb cover upload, bundle/export round trip, binary fidelity, replacement, authorization and rejections — unrun Rails suite is disclosed honestly (gems unavailable), a blocker I reproduced.
▸Rubric
Did the agent hand over a reviewable PR link, or a patch when GitHub access is unavailable, with focused tests that prove upload, bundle round trip and rejection behavior? FAIL if the response is only a plan or no working artifact is ready.