Skip to content

fix: quieter tree-sitter notice, single readable errors, effective truncate mode (#21 B13/B17/B18) - #49

Merged
igorls merged 16 commits into
masterfrom
fix/21-diagnostics
Oct 11, 2026
Merged

igorls merged 16 commits into
masterfrom
fix/21-diagnostics

Conversation

@igorls

@igorls igorls commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Part of #21 (stacked on #44: retarget to master after #44 merges).

  • B13: the tree-sitter notice no longer prints on every default run; only for --signatures/--structure or --truncate smart with --max-tokens; suggests cargo install context-builder --features tree-sitter-all.
  • B17: errors print once as Error: <msg> (no Debug Custom{..}/Os{..}); output-path errors name the path. Exit code stays 1.
  • B18: without tree-sitter, truncation notices say mode: byte.
  • E2E tests (tests/test_diagnostics.rs) run the binary; all 5 fail without the src changes (verified).
  • B23 (install.sh verifying wrong binary) is fixed in docs: stop recommending curl|sh from master; pin install versions (#37) #48. Not done here: B19 (config parse errors/unknown keys: failing hard is a behavior change, see decision list), B21, --stats, --config/--no-config.

Copilot AI balanced review requested due to automatic review settings October 11, 2026 02:20

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

Auto-diff warnings, cancellation output, and post-create write errors do not yet satisfy the stated diagnostic behavior.

4 open findings
What changed in this PR

Improves CLI diagnostics for tree-sitter fallbacks, truncation modes, and I/O errors.

Changes:

  • Limits tree-sitter notices to relevant operations.
  • Centralizes readable error reporting and adds output-path context.
  • Adds end-to-end diagnostic regression tests.
File Description
src/​lib.rs Adjusts warnings, effective truncation mode, and path-aware errors.
src/​main.rs Centralizes CLI error formatting and exit codes.
src/​markdown.rs Adds path context to output creation failures.
tests/​test_diagnostics.rs Tests warnings, truncation notices, and errors.
CHANGELOG.md Documents diagnostic improvements.

🧠 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/lib.rs Outdated
Comment thread src/lib.rs Outdated
Comment thread src/main.rs
Comment thread src/markdown.rs
@igorls
igorls changed the base branch from fix/40-closed-stderr to master October 11, 2026 22:04
@igorls
igorls merged commit 524539f into master Oct 11, 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