Reject pseudo-binary Office writes and index extracted text #34

Merged
weichen merged 2 commits from feature/binary-doc-index into main 2026-10-01 05:25:12 +00:00
Owner

Summary

  • write_artifact and fs_write_file refuse .doc/.docx/.xls/.xlsx/.xlsm/.ppt/.pptx/.pdf and point at run_python plus register_artifact.
  • Binary document MIME types are indexed only after ingest.Parse extracts text. Unparseable bytes stay out of search.
  • Does not restore format=docx.

Test plan

  • go test ./... (19 packages), including the refusal and a docgen docx search hit
  • Dev make test
  • Merge after Dev #113 / Backend #33 so the refusal names tools that exist
## Summary - `write_artifact` and `fs_write_file` refuse `.doc/.docx/.xls/.xlsx/.xlsm/.ppt/.pptx/.pdf` and point at `run_python` plus `register_artifact`. - Binary document MIME types are indexed only after `ingest.Parse` extracts text. Unparseable bytes stay out of search. - Does not restore `format=docx`. ## Test plan - [x] `go test ./...` (19 packages), including the refusal and a docgen docx search hit - [x] Dev `make test` - [ ] Merge after Dev #113 / Backend #33 so the refusal names tools that exist
weichen added 1 commit 2026-10-01 04:29:11 +00:00
Why: string writes of .docx/.xlsx/.pdf produce files that will not open,
and generated binary artifacts were skipped by search entirely.

Evidence: go test ./... 19 packages ok. Office extensions are refused
with a pointer to run_python plus register_artifact. A docgen docx is
searchable after WriteArtifact; unparseable bytes are not indexed.

Impact: write_artifact and fs_write_file no longer accept those
extensions. Text artifacts index as before. Merge after the interpreter
PR so the error text names tools that exist.

Refs: task feature/binary-doc-index; supersedes Dev #99 / Backend #27
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 1 commit 2026-10-01 05:25:01 +00:00
weichen merged commit 42fe6196b1 into main 2026-10-01 05:25:12 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Backend#34