Repository navigation
fix(file-transfer): inline small YAML and source files from paired nodes - #128656
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 24, 2026, 7:19 AM ET / 11:19 UTC. ClawSweeper reviewWhat this changesThe PR replaces the file-transfer plugin’s fixed text MIME allowlist with a bounded textual MIME predicate so small YAML, source, and tabular files fetched from paired nodes are inlined for the agent. Merge readinessNo blocking correctness or security findings. This maintainer-owned, protected PR remains necessary because current main still omits canonical YAML and source MIME types; merge only after the exact-head checks finish green. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (partial) — step 2 Assertions:
How this fits togetherA paired node returns a MIME-tagged, checksummed file payload to the file-transfer plugin. The plugin verifies and saves the bytes, then selects protected inline text, an image block, or a saved-file reference for the agent. flowchart LR
A[Paired node] --> B[Checksummed file payload]
B --> C[File fetch tool]
C --> D{MIME and 8 KiB policy}
D --> E[Protected inline text]
D --> F[Image content block]
D --> G[Saved-file reference]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -11, Tests +117. Total +106 across 4 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one bounded textual-MIME decision at the private file-transfer result boundary, retaining checksum verification, untrusted-content isolation, the 8 KiB cap, and image/binary fallbacks. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main’s allowlist excludes application/yaml and text/javascript while the canonical MIME implementation emits those types. This read-only review did not execute the regression suite. Is this the best way to solve the issue? Yes. Replacing the incomplete private allowlist at the final result-format boundary is preferable to adding one-off extension entries, and it reuses the canonical Media Core MIME contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8fe2c1b83ca2. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Merged via squash.
|
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.
What Problem This Solves
Fixes an issue where users fetching small YAML configuration files, JavaScript source, CSS stylesheets, or tab-separated documents from paired nodes would receive only a saved-file path instead of the file contents promised by
file_fetch.Why This Change Was Made
Classify inline text at the private file-transfer tool boundary using the canonical
text/*MIME family plus the existing JSON/XML application types and the canonical YAML type. Remove the incomplete private MIME allowlist instead of adding more format-specific entries. The change deletes 11 net lines of production code and does not change node authorization, file policy, public configuration, storage, or plugin SDK contracts.User Impact
Agents immediately receive the contents of small
.yaml,.yml,.js,.css, and.tsvfiles after fetching them from a paired node, without an unnecessary follow-up file read. The existing 8 KiB limit, SHA-256 integrity verification, untrusted-content warnings and marker sanitization, image blocks, SVG restrictions, and binary-file fallback remain unchanged.Evidence
file_fetchtool, but six regressions failed:.yaml,.yml,.js,.css,.tsv, and an exactly 8,192-byte JavaScript file all omitted their contents.