Skip to content

fix: skip binary files with a Skipped entry; header names the directory, not its path (#21 P11) - #69

Merged
igorls merged 6 commits into
masterfrom
fix/21-binary-header
Oct 12, 2026
Merged

igorls merged 6 commits into
masterfrom
fix/21-binary-header

Conversation

@igorls

@igorls igorls commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Part of #21 (P11). content_filter::classify gains SkipReason::Binary (sniff via markdown::is_binary_content, same rule as the renderer); markdown::directory_display_name replaces the raw -d string in both headers and the --token-count estimate. Tests: tests/test_binary_and_header.rs (in-process classify + run_with_args + binary). One existing test (test_parallel_error_handling) expected the placeholder block; it now expects the Skipped entry.

Copilot AI balanced review requested due to automatic review settings October 11, 2026 15:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Directory aliases and root paths are still labeled incorrectly, and plural binary summaries are grammatically malformed.

2 open findings
What changed in this PR

Updates report generation to omit detected binary files and avoid exposing absolute input paths.

Changes:

  • Classifies binary content as skipped and reports binary counts.
  • Uses directory display names in headers and token estimates.
  • Adds integration coverage and changelog documentation.
File Description
src/​content_filter.rs Adds binary classification and reporting.
src/​markdown.rs Adds sanitized directory display names.
src/​lib.rs Uses display names in token estimates.
tests/​test_binary_and_header.rs Tests binary skipping and headers.
tests/​test_parallel_memory.rs Updates binary-handling expectations.
CHANGELOG.md Documents the behavior change.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/markdown.rs Outdated
Comment thread src/content_filter.rs Outdated
@igorls
igorls merged commit 93b3e90 into master Oct 12, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants