Skip to content

UX, diagnostics, install and docs friction (incl. --stats) #21

Open

Description

@igorls

Part of #14. Source: v0.10.0 dogfood report (2026-10-07).

Tier: 2

Bugs

# Sev Issue Repro Expected
B13 M Tree-sitter warning prints on every default run of the crates.io build (because --truncate defaults to smart); suggested command is cargo build --features tree-sitter-all context-builder -d any Warn only for explicitly passed flags; suggest cargo install context-builder --features tree-sitter-all
B17 L Errors printed twice, in Debug format, without the path -d /nope; -o /readonly/x.md → Error: Os { code: 13, kind: PermissionDenied, … } Print once with {}, naming the path; distinct exit codes for cancelled vs IO error (P14)
B18 L --max-tokens notice says mode: smart in builds without tree-sitter, but the cut is mid-line default build, --max-tokens 50000 Report the effective mode
B19 L Malformed or typo'd config silently ignored filter = ["rs" → warning, exit 0, defaults used; filters = [...] → no warning Fail on parse error; warn on unknown keys
B21 L --token-count ignores --max-tokens --token-count --max-tokens 1000 → 924,288 Report the capped size and files omitted
B23 L install.sh verifies the wrong binary: runs context-builder --version from PATH, not $INSTALL_DIR (printed my cargo copy) CONTEXT_BUILDER_INSTALL_DIR=/tmp/x sh install.sh Run "$INSTALL_DIR/context-builder" --version; warn if not on PATH or shadowed

Enhancements

  • P7 --stats: per-file token breakdown (--stats / --top 20) that honors --max-tokens and shows what would be cut. Replace the bytes/4 post-run "~NK" estimate (off by −11% to −56%; requests ~1229K vs 2.8M actual) with the real count; the >128K warning should use it too.
  • P10 discoverability/install: make tree-sitter a default feature (+~10 s compile) or hide the tree-sitter flags when compiled out; add a musl/static Linux release (current binary needs GLIBC_2.34); README says | bash, script header says | sh.
  • --config <path> / --no-config to bypass a project's context-builder.toml (rest of P8).

Docs / friction (report §6)

  • Bare context-builder prints help (exit 0). README "Basic Usage" says it processes cwd. Make it process cwd or fix the README.
  • -o - (stdout) is in the README but not in --help.
  • Hidden files are skipped and symlinks aren't followed or listed; document it (--hidden is in the v0.11.0 issue; --follow is open).
  • Absolute paths leak into the header (from the \/tmp/my proj ü/` directory`); use relative paths (P11).
  • Binary files become <Binary file …> blocks in the body; omit from the body, keep marked in the tree (P11). Ripgrep without .git had 1,095 of these.
  • Skips and encoding fallbacks go through log::warn!, invisible without RUST_LOG=warn. Env vars (CB_SILENT, CB_DEBUG_CONFIG, CB_DEBUG_AUTODIFF, CB_DIFF_CONTEXT_LINES, RUST_LOG) are only in DEVELOPMENT.md/AGENTS.md.
  • Diff format (+ /- with a space, ... separator) can't be applied with patch/git apply; state that it's LLM-oriented.

Covers B13, B17, B18, B19, B21, B23 and proposals P7, P10, P14, plus the non-default parts of P8 and P11.

Activity

  1. added
    bugSomething isn't working
    enhancementNew feature or request
    tier-2Tier 2: UX and diagnostics
    on Oct 8, 2026
  2. igorls commented on Oct 11, 2026

    @igorls
    OwnerAuthor

    Progress: B13, B17, B18 in #49 (stacked on #44); B23 in #48. Not done: B19 (malformed config / unknown keys; hard-failing is a behavior change, needs a maintainer decision), B21 (--token-count ignoring --max-tokens), --stats/--top, real-tokenizer >128K warning, --config/--no-config, musl release, and the docs/friction checklist items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or requesttier-2Tier 2: UX and diagnostics

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions