Skip to content

Bug: binary symbols appear in code-slicer output #37

Description

@sobeaa

Bug: binary symbols appear in code-slicer output

code-slicer can sometimes output unreadable binary-looking symbols instead of clean source text.

Expected

Output should only contain readable source files.

If a file is binary, unreadable, or not valid text, code-slicer should skip it and show a warning with the file path.

Actual

The output can contain large blocks of corrupted/binary-looking characters, which makes the generated prompt context unusable.

Suggested fix

Add a guard before printing file contents:

  • detect obvious binary/non-text files
  • skip them
  • print a warning like:
Warning: skipped unreadable or binary file: path/to/file

Acceptance criteria

  • Binary/unreadable files are not printed
  • A warning identifies skipped files
  • Normal source files are still included
  • Add a regression test for this case

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions