push_log_entry truncates over-long subject/body lines via
primitives::truncate_line, and bodies past the 3-line cap now end with
an explicit '[+N lines omitted]' marker instead of silently dropping
the remainder.
detect_status_state now distinguishes 'merge (ready to commit)' from an
unresolved merge conflict and recognizes interactive-rebase sub-states
(editing/splitting a commit, command progress) as rebasing. These
headers appear in git's default long-format status, so no flag
injection is needed.
Adds filters/jvm.rs porting rtk's Maven (Surefire/Failsafe state
machine, compile warning-dedup with continuation tracking, package
reactor-summary keeper, quiet mode) and Gradle (build/test/connected/
lint/dependencies, Spring Boot run) filters — cross-line state the TOML
DSL cannot express. Phase and task are decided by re-tokenizing the
command (last goal / last non-clean task), not the first-arg subcommand.
Deletes defs/maven.toml, defs/gradle.toml, defs/mvn-build.toml in the
same change: the engine re-applies builtin pipelines as overlays on
Rust output, so leaving them would strip the module banners and reactor
summaries jvm.rs preserves. mvn-build.toml was already dead config —
maven.toml sorts ahead of it and claimed every mvn invocation first.
The ported rtk Surefire/compile/reactor unit tests load their input via
include_str! from filters/fixtures/jvm/ (real paths scrubbed); those
fixtures ship with the module since they are compile-time inputs.
Op: compress
Two-hash ASCII-art body rows, bracket-INFO hash borders, the Open
Source edition banner, and the Java Home/Libraries/jar-list env dump
all survived the def, while the one meaningful line of --version
output — the version itself — was stripped. rtk keeps the version and
strips the rest; the def now matches.
Op: correct
Restores: spec:rtk/src/filters/liquibase.toml
Error terminations with no stats block collapsed to empty and the
ungated on_empty reported 'ping: ok' on nonzero exits. The overlay now
runs only on exit 0, keeps timeout/unreachable/error lines and the
Windows statistics block, and bounds lossy runs with a tail cap.
Op: correct
Restores: spec:rtk/src/filters/ping.toml
The capped def claimed every subcommand including run, where the
model response is the payload rtk deliberately left uncapped. The
general entry now gates to management subcommands; a separate run
entry strips braille spinner residue and applies no caps.
Op: correct
Restores: spec:rtk/src/filters/ollama.toml
Clean swift build output collapses to 'ok (build complete)'. The
unless guard adds Test Suite/failed beyond rtk's warning/error terms
because this def also matches swift test, which prints Build complete!
before test results. Linking phase lines are stripped in both plain
and bracketed progress forms.
Op: correct
Restores: spec:rtk/src/filters/swift-build.toml
A clean sync collapses to 'ok (synced)' via a guarded match_output on
'total size is'; the unless guard keeps error runs intact, where the
sent/received stats remain diagnostic. Blank separator lines are
stripped on the non-clean path.
Op: correct
Restores: spec:rtk/src/filters/rsync.toml
CodeSign/Validate/ProcessProductPackaging/GenerateDSYMFile and the
other archive-build phase banners plus indented absolute-path tool
invocation lines appear in every device build and leaked through;
rtk strips all of them. Test runner output and diagnostics survive.
Op: correct
Restores: spec:rtk/src/filters/xcodebuild.toml
Permanently-added warnings, connection-closed notices, Authenticated
to, debug1:, OpenSSH_ version banners, and pseudo-terminal warnings
are client chatter, not remote payload; rtk strips all six. Remote
output stays untouched per the def's passthrough stance.
Op: correct
Restores: spec:rtk/src/filters/ssh.toml
Em-dash separator rows, the cache-replay notice, and the 'Nx (powered
by Nx Cloud)' footer survived the def. rtk also matched pnpm-wrapped
invocations; a companion entry on (pnpm|npx|yarn) + subcommand nx now
covers them — pkg's whitelist does not claim nx, so dispatch falls
through to the def.
Op: correct
Restores: spec:rtk/src/filters/nx.toml
Download/extract progress and trust/install checkmark echo lines are
pure chrome; rtk strips all three. Install-result lines stay — the
'X installed' line is the meaningful summary of what changed.
Op: correct
Restores: spec:rtk/src/filters/mise.toml
The def stripped past-tense Downloaded/Uploaded lines but not the
in-flight 'Downloading ...' progress printed during theme pull, and
Shopify CLI indents progress under spinners so the Uploading anchor
needed loosening.
Op: correct
Restores: spec:rtk/src/filters/shopify-theme.toml
The def stripped only 'cache hit, replaying logs'; miss/bypass status
lines and the bullet-less 'N packages in scope' variant survived. The
Tasks:/Duration: summary stays — one line of high-signal counts.
Op: correct
Restores: spec:rtk/src/filters/turbo.toml
When diagnostics exist the clean-run short-circuit does not fire and
the 'ty 0.x.y' banner plus 'Checking N files' progress line leaked
through; rtk strips both.
Op: correct
Restores: spec:rtk/src/filters/ty.toml
jj prints advice lines such as 'Hint: use jj log ...' after most
commands; rtk strips them. Working-copy summary lines stay — they
carry the operative change-id.
Op: correct
Restores: spec:rtk/src/filters/jj.toml
On Docker hosts iptables -L is dominated by DOCKER/DOCKER-USER/BR-*
chain headers and blank chain separators; rtk strips both. Header-line
removal only — rule lines under those chains still pass through.
Op: correct
Restores: spec:rtk/src/filters/iptables.toml
rtk strips blank lines and gcloud routinely emits them between status
lines and tables; removing them composes with the on_empty sentinel.
Op: correct
Restores: spec:rtk/src/filters/gcloud.toml
Exact-allowlist normalization maps gradlew.bat -> gradlew and
mvnw.cmd -> mvnw so wrapper invocations dispatch to the same filters;
generic extension stripping would over-match unrelated scripts. glab
gains gh-style global-flag skipping for subcommand detection.
Op: extend
Ordered regex substitutions applied after strip/keep line filtering and
before per-line truncation. snip donors apply path compaction and
similar rewrites post-filter (~31 placements); the pre-filter replace
list cannot express that without re-matching stripped lines.
Op: extend
55 of 131 snip donor filters use remove_lines and keep_lines together;
the TOML DSL now applies both: a line survives iff it matches the keep
set (when present) and does not match the strip set (when present).
The CompiledLineFilter special-casing is gone — one general code path.
Op: extend
is_aws_stdout_pipe() used rfind over whitespace tokens, so a value-taking
option after the '-' destination (e.g. 'aws s3 cp s3://b/k - --request-payer
requester') made the check miss and the streamed object body was rewritten
by strip_transfer_progress/JSON compaction. Any bare '-' token now forces
passthrough; a false positive only skips minimization. Also moved the
changelog entries back under '## [Unreleased]' after they slid beneath
released headings during the rebase onto main.
Addresses review feedback on #2176.
- Ran the operand as an ordinary descendant so it is reaped with the host instead of leaking as an orphan.
- Propagated the command's exit status; reported missing operand and exit 125 with no operand.
- Updated the bash tool prompt's daemon guidance away from nohup/setsid/disown detachment.
- Switched shell renderer success icon/state to "done".
- Added process ID resolution and selectors for waited jobs.
- Implemented terminate-only waits and next-job polling.
- Recorded completed job IDs into the variable named by -p.
- Added shell integration tests covering the new wait paths.
- Added Job::abort_internal_tasks to abort internal async tasks and drop their join handles.
- Updated shell cancellation paths to call this abort logic and handle mutable shell job lists before signaling remaining process groups.
- Added Rust and TypeScript tests that verify cancellation prevents background shell jobs from completing after abort.
- Renamed non-terminal stdin pipeline tests and updated non-terminal expectations to DetachSession behavior.
- Updated child_session_action behavior so non-terminal, non-pipeline stdin now yields DetachSession instead of None.
- Updated execute_external_command to skip process_group for detached children and move take_foreground into its foreground arm.
- Added async regression coverage for detached pipeline stages and logged the fix in the natives CHANGELOG.
brush_core::interp::setup_open_file_with_contents wrote the entire heredoc/here-string body into an anonymous pipe synchronously before handing the reader to the downstream command. Bodies that exceed the OS pipe buffer (~4 KiB on Windows, 16-64 KiB on macOS) deadlocked the writer forever, and the bash tool tripped its 305 s hard timeout without ever launching the consumer. The Linux fast path still uses F_SETPIPE_SZ to grow the pipe inline; every other platform (and Linux bodies that overflow pipe-max-size) now decouples the write onto a fire-and-forget thread that terminates on drain or BrokenPipe.
Adds a 256 KiB regression test that exercises the worst-case shape (: builtin, which never drains stdin), guarded by tokio::time::timeout(10s) so a regression fails CI fast instead of hanging.
- Updated `terminate_new_descendants` to require the `Sync` marker on its hash-set hasher.
- This tightened async helper bounds without changing its termination-wave logic.
Stopped marking persistent bash sessions as permanently broken when the JavaScript abort or timeout race wins.
Stopped the Rust descendant kill-wave helper once no cancellation targets remain so later commands are not swept into old cancels.
Fixes#1347
Added Rust-side descendant termination on shell cancellation paths so aborts and timeouts escalate to SIGKILL even if brush cleanup stalls.
Covered SIGTERM-ignoring shell workloads in native tests.
Fixes#1347
- Exempted the `fmt:rs` task from the early-exit skip logic so formatting always runs.
- Reformatted `apply_command_env` signature in shell.rs to satisfy the formatter.
Brush-core applied POSIX parameter expansion to $env before dispatching a command, mangling PowerShell references like Write-Host $env:SystemRoot to :SystemRoot. Move the fix down to env-var application: every brush session now defines env=$env as an internal (non-exported) shell variable, so the bash expansion of $env yields the literal $env and PowerShell tokens reach the child intact. User assignments (env=prod; echo "$env:8080") still shadow the fallback in their command scope, so the POSIX bash contract is preserved.
Fixes#1079
- Converted several single-line guard-style `if let`/`let Some` exits in `fixup.rs` into multiline blocks for consistent style.
- Reformatted the safe-argument regex definition and normalized test case formatting in `fixup.rs` without altering assertions.
- Reordered `lib.rs` module exports by moving `fixup` ahead of `minimizer`.
- Added top-level parsing and segment splitting to apply bash fixups only on safe command chunks.
- Replaced `stripTrailingHeadTail` usage with `applyBashFixups` and array-based notice formatting.
- Fixed terminal `| head`/`| tail` and redundant `2>&1` stripping while preserving command semantics.
- Updated fixup tests for cross-command cases and removed superseded head-tail-only test coverage.
- Updated shell minimizer line truncation to append `...[+N]` with the count of dropped Unicode scalars when truncation occurs.
- Updated read summary rendering to track `elidedLines`, include them in tool details, and append a recovery footer for `:raw` or line-range access whenever elided spans are present.
- Updated read-tool prompts/docs/tests to cover the new elision-footers and recovery guidance.
Fixes#1046
- Added untracked worktree baseline capture via `untrackedPatch` and synthetic tree diffing.
- Added fallback-aware backend ordering by collecting host candidates and retrying alternates on unavailable PAL.
- Hardened overlay mount lifecycle by removing stale overlays and deleting upper/work dirs after unmount.
- Refined ZFS clone deletion to validate ownership and remove dataset+origin only when checks pass.
- Updated ProjFS integration to use extended-info callbacks and symlink metadata reads.
- Updated rcopy path handling to absolutize paths, and added `writeTree` plus combined shell timeout checks.
- Replaced macOS `Process::children` and `descendants` traversal with a one-shot `proc_listallpids` scan grouped by `pbi_ppid`, avoiding the broken self-query path in `proc_listchildpids`.
- Built `snapshot_all_pids` and `build_process_tree` helpers and updated descendant collection to walk that tree once, de-duplicating by PID in post-order.
- Added a Unix regression test that verified a freshly spawned child appears in `live_descendants`, preventing silent no-op cleanup on affected darwin kernels.
- Restricted pgid adoption in `select_termination_targets` to only descendants that are their own group leader, preventing inherited harness pgids from entering the kill set.
- Added `kill_process_group` guard to refuse signaling the harness's own process group as a last-line defense.
- Awaited the `bridge_chunks` drain handle after shell/execute completes to ensure all output chunks are flushed before the future resolves.