Skip to content

Fix/git status emoji compat - #3982

Closed
aeppling wants to merge 3 commits into
developfrom
fix/git-status-emoji-compat
Closed

aeppling wants to merge 3 commits into
developfrom
fix/git-status-emoji-compat

Conversation

@aeppling

@aeppling aeppling commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • cargo fmt --all && cargo clippy --all-targets && cargo test
  • Manual testing: rtk <command> output inspected

Important: All PRs must target the develop branch (not master).
See CONTRIBUTING.md or details.

pszymkowiak and others added 3 commits March 16, 2026 14:58
* fix: P1 exit codes, grep regex perf, SQLite concurrency

Exit code propagation (same pattern as existing modules):
- wget_cmd: run() and run_stdout() now exit on failure
- container: docker_logs, kubectl_pods/services/logs now check
  status before parsing JSON (was showing "No pods found" on error)
- pnpm_cmd: replace bail!() with eprint + process::exit in
  run_list and run_install

Performance:
- grep_cmd: compile context regex once before loop instead of
  per-line in clean_line() (was N compilations per grep call)

Data integrity:
- tracking: add PRAGMA journal_mode=WAL and busy_timeout=5000
  to prevent SQLite corruption with concurrent Claude Code instances

Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick szymkowiak <[email protected]>

* fix: address review findings on P1 fixes

- tracking: WAL pragma non-fatal (NFS/read-only compat)
- wget: forward raw stderr on failure, track raw==raw (no fake savings)
- container: remove stderr shadow in docker_logs, add empty-stderr
  guard on all 4 new exit code paths for consistency with prisma pattern

Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick szymkowiak <[email protected]>

---------

Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick szymkowiak <[email protected]>
* fix: raise output caps for grep, git status, and parser fallback (#617, #618, #620)

- grep: per-file match cap 10 → 25, global max 50 → 200
- git status: file list caps 5/5/3 → 15/15/10
- parser fallback: truncate 500 → 2000 chars across all modules

These P0 bugs caused LLM retry loops when RTK returned less signal
than the raw command, making RTK worse than not using it.

Fixes #617, #618, #620

Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick szymkowiak <[email protected]>

* fix: update README example and add truncation tests for modified/untracked

- parser/README.md: update example from 500 → 2000 to match code
- git.rs: add test_format_status_modified_truncation (cap 15)
- git.rs: add test_format_status_untracked_truncation (cap 10)

Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick szymkowiak <[email protected]>

* refactor: extract output caps into [limits] config section

Move hardcoded caps into config.toml so users can tune them:

  [limits]
  grep_max_results = 200      # global grep match limit
  grep_max_per_file = 25      # per-file match limit
  status_max_files = 15       # staged/modified file list cap
  status_max_untracked = 10   # untracked file list cap
  passthrough_max_chars = 2000 # parser fallback truncation

All 8 modules now read from config::limits() instead of hardcoded
values. Defaults unchanged from previous commit.

Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick szymkowiak <[email protected]>

---------

Signed-off-by: Patrick <[email protected]>
Signed-off-by: Patrick szymkowiak <[email protected]>
Git status output used emojis (📌, 📝, ❓, ✅, ⚠️) that confuse
non-Claude LLMs (GPT, etc.) causing retry loops. Replace with plain
text labels (branch:, modified:, staged:, untracked:, conflicts:).

Also add "clean — nothing to commit" when working tree is clean,
so LLMs understand the repo state without ambiguity.

Before: 📌 master
After:  branch: master
        clean — nothing to commit

Fixes #603

Signed-off-by: Patrick szymkowiak <[email protected]>
@rtk-wshm-sync-bot rtk-wshm-sync-bot Bot added bug Something isn't working enhancement New feature or request breaking-change config labels Sep 11, 2026
@rtk-wshm-sync-bot

Copy link
Copy Markdown

wshm · Automated triage by AI

📊 Automated PR Analysis

🐛 Type bug-fix
🟡 Risk medium

Summary

Replaces emoji characters in git status output with plain-text labels for terminal/tool compatibility, adds a new configurable LimitsConfig (grep/status/passthrough truncation limits) to config.rs, and adds proper non-zero exit code handling with stderr passthrough for docker logs and kubectl pods/services/logs commands.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Analyzed automatically by wshm · This is an automated analysis, not a human review.

@KuSh

KuSh commented Oct 3, 2026

Copy link
Copy Markdown
Collaborator

Closing as superseded: #631 and #630 were merged on their own in March, and the git status emoji removal landed through #687 and was reworked further since (src/cmds/git/git_cmd.rs prints * <branch>, porcelain lines, and clean — nothing to commit, no emoji). The branch is on the pre-migration layout and conflicts with develop, so nothing left here needs carrying over.

@KuSh KuSh closed this Oct 3, 2026
@KuSh
KuSh deleted the fix/git-status-emoji-compat branch October 3, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change bug Something isn't working config enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants