Commit Graph

828 Commits

Author SHA1 Message Date
can1357 b71841c4cc merge PR #5694 via eval/pr-5694: ci: retry flaky workspace tests 2026-07-17 04:39:14 +02:00
can1357 4d7e51413b merge PR #5671 via eval/pr-5671: fix(bash): drained piped output before timeout return 2026-07-17 04:37:11 +02:00
David Andrews (LexGenius.ai) 5cb9533436 fix(shell): parse uv run --extra values 2026-07-16 08:39:37 -04:00
roboomp 3e38a5b514 fix(bash): drained piped output before timeout return
- Delayed reader cancellation so pipeline consumers can flush after producers are terminated.
- Kept the JavaScript watchdog behind bounded native timeout cleanup.
- Added native and executor regressions for timeout-time output draining.

Fixes #5316
2026-07-16 07:22:58 +00:00
can1357 9fd19696e2 chore: bump version to 17.0.1 2026-07-16 04:56:03 +02:00
roboomp d12997278d fix(tail): stopped windows broken-pipe flush from killing omp
unbounded_tail emulated Unix SIGPIPE on Windows by calling
std::process::exit(13) when a broken-pipe flush failed. Inside the
long-lived host shell that terminated the entire omp process with code
13 and no output, breaking the run contract that pi-uutils builtins
never call std::process::exit.

Flush uniformly across platforms so a broken pipe surfaces as a normal
io::Error and propagates to the caller, matching every other builtin
(e.g. uu-cat's handle_broken_pipe). Added a regression test covering the
streaming unbounded_tail path the reported repro exercises.

Fixes #5609
2026-07-15 19:48:04 +00:00
can1357 1c9291b6e6 chore: bump version to 17.0.0 2026-07-15 19:17:34 +02:00
can1357 b51fd7f06d Merge remote-tracking branch 'origin/farm/58511219/fix-bash-process-substitution-hang' 2026-07-15 12:38:47 +02:00
can1357 f946d550ea fix(pi-uu-grep): normalized GNU basic alternation in default matching mode
- Added normalization that translated escaped `\|` alternation to `|` outside character classes before default-mode matching.
- Refactored default matcher construction into a helper that retries compilation with malformed patterns escaped as literals after an initial failure.
- Added a regression test confirming `tools.xdev\|tools.toolbox` now returns the expected two matches in default mode.
2026-07-15 12:35:59 +02:00
roboomp 8eb9b6d251 fix(shell): materialized process substitution fds for builtins
- Rewrote logical /dev/fd operands to live OS descriptors before invoking in-process uutils.
- Added regression coverage for diff reading two process substitutions.

Fixes #5557
2026-07-15 10:04:00 +00:00
can1357 e542f762ca fix(pi-shell): mapped BrokenPipe stdout errors to silent fd exit code 141
- Updated `run_fd_sync` to handle `io::ErrorKind::BrokenPipe` by returning exit code `141` without writing an error message.
- Added a regression test that verifies `fd` exits with `141` and empty stderr when stdout is closed early (e.g. `fd ... | head` scenario).
- Recorded the broken-pipe behavior fix in `packages/coding-agent/CHANGELOG.md`.
2026-07-15 10:09:41 +02:00
can1357 7d02778c60 chore: bump version to 16.5.2 2026-07-15 00:04:32 +02:00
roboomp 90c4726bae fix(launch): passed Windows PTY arguments directly
Added a direct-argv PTY entry point and used it for Windows launch sessions so portable-pty no longer re-quotes cmd.exe command text.

Rejected direct .bat and .cmd applications with guidance to use cmd.exe /c.

Fixes #5416
2026-07-14 20:17:03 +00:00
can1357 14b5da76a9 chore: bump version to 16.5.1 2026-07-14 19:21:54 +02:00
can1357 a3960bb4e1 chore: bump version to 16.5.0 2026-07-14 01:32:16 +02:00
can1357 198efb3e4e feat: enabled bsd compatibility for core utilities and command arguments
- Implemented bsd-to-gnu flag translation for `date`, `find`, `mktemp`, `sed`, and `tail` utilities to support native bsd command usage.
- Adjusted argument parsing logic in `ln` and `base32` to accommodate bsd-compatible short-flag aliases and behavior.
- Added comprehensive regression tests and bsd-specific compatibility suites across modified utilities to ensure consistent behavior.
- Updated project documentation to reflect the expanded cross-platform utility support.
2026-07-13 05:16:18 +02:00
can1357 6b2f4ad5de feat(vendor/uu-stat): enabled bsd-style stat syntax support
- Added `rewrite_bsd_invocation` to detect macOS-style `stat -f FORMAT` syntax, preventing misinterpretation as GNU filesystem mode.
- Implemented `translate_bsd_format` to map BSD-specific format directives to GNU equivalents, including support for time forms, user/group IDs, and file metadata.
- Enabled BSD flag cluster parsing (`-LnfqF`) to allow common macOS command patterns to function correctly within the in-process `stat` utility.
- Added comprehensive unit tests to validate BSD syntax translation, sub-field handling, and error reporting for unsupported directives.
2026-07-13 05:06:22 +02:00
can1357 01d3fc9b6b chore: bump version to 16.4.8 2026-07-12 20:48:09 +02:00
can1357 fc35e17cb9 fix(pi-ast): satisfied rustfmt and clippy const-fn lint in ops.rs
- Reflowed compile_pattern/wrapper_template comments and while-condition to rustfmt's preferred layout.
- Made wrapper_template a const fn to satisfy clippy::missing_const_for_fn under -D warnings.
2026-07-12 20:46:29 +02:00
can1357 bb35e79189 fix(ast): auto-wrap multi-node patterns instead of erroring
A pattern like `"@types/bun": $V` parses to multiple root AST nodes and was
rejected with "Multiple AST nodes are detected". When no explicit selector is
given, retry the fragment wrapped in a minimal single-node context (JSON: `{ <frag> }`
selecting `pair`), quoting bare metavars so JSON parses. Falls back to the
original error if the wrapped form still fails, so bad patterns are unchanged.
Applies to both ast_edit (compile_pattern) and ast_grep (compile_search_patterns).
2026-07-12 13:40:43 +02:00
can1357 f933f02fcf chore: bump version to 16.4.7 2026-07-12 13:06:27 +02:00
can1357 12466ecf40 chore: bump version to 16.4.6 2026-07-12 02:50:43 +02:00
can1357 a9adf20af2 fix: prevented false overlap errors by deduplicating identical edits
- Enabled deduplication of byte-identical edits in `apply_edits` to prevent false overlap errors.
- Added logic in `ast_edit_blocking` to filter out duplicate rewrite matches before staging.
- Updated `apply_edits` to collapse multiple identical replacements into a single deterministic operation.
- Added regression tests for both `apply_edits` and `ast_edit_blocking` to ensure identical matches resolve cleanly.
2026-07-12 00:16:09 +02:00
can1357 0ae8efd649 feat: integrated coreutils as in-process shell builtins
- Integrated 17 new coreutils-based shell builtins including `diff`, `date`, `ln`, `stat`, `seq`, `touch`, and others.
- Refactored vendored utilities to execute as in-process shell builtins by routing I/O, environment access, and path resolution through `pi_uutils_ctx`.
- Disabled process-level modifications (e.g., clock setting, hostname modification) to ensure safety and scope adherence within the shell environment.
- Implemented shell-specific features such as cancellation polling, custom exit code management, and efficient output streaming for all new builtins.
2026-07-11 20:37:52 +02:00
can1357 3d1f9a4a3c chore: bump version to 16.4.5 2026-07-11 19:50:41 +02:00
can1357 a643e94466 chore: remove redundant tests 2026-07-11 19:50:23 +02:00
can1357 d1317c303d feat: allocation-free grep 2026-07-11 19:24:07 +02:00
can1357 1b80a78876 Merge remote-tracking branch 'origin/farm/5b950f9a/native-grep-stable-snapshot' 2026-07-11 19:15:36 +02:00
can1357 e889572cf0 test(pi-shell): added integration tests for shell builtins
- Verify `sed` correctly streams stdin and performs in-place directory-relative edits.
- Validate `xargs` behavior regarding stdout piping, argument batching, and GNU-compatible exit codes.
- Ensure `jq` correctly filters JSON input, resolves relative file paths, and propagates exit status.
2026-07-11 19:10:55 +02:00
can1357 5a73d65b7a feat(shell): integrated additional coreutils into shell builtins
- Added base64, checksum utilities (md5, sha1, sha224, sha256, sha384, sha512, b2sum), path utilities (basename, dirname), and text processing tools (cut, tee, tr, paste, comm) to the shell.
- Registered new utility builtins in crates/pi-shell/src/coreutils.rs and crates/pi-shell/src/shell.rs.
- Updated Cargo.toml to include the necessary dependencies for the new core utilities.
2026-07-11 19:07:01 +02:00
roboomp f359a5f293 fix(native): right-size grep read buffers
Keep bounded reads capped at the classification limit while reserving only the expected file or prefix size up front.

Fixes #5205
2026-07-11 16:54:36 +00:00
can1357 991c166d85 feat(vendor): introduced vendored coreutils with in-process execution support
- Vendored multiple uutils coreutils packages with custom adaptations for in-process I/O and path redirection using `pi-uutils-ctx`.
- Implemented consistent `run` entry points across all utilities to replace process-global termination and allow execution within the embedding application.
- Developed a shared `uu-checksum-common` library to centralize CLI construction, checksum computation, and digest validation logic.
- Integrated thread-local command handling and resource management to support memory-bounded stream processing and localized error reporting.
2026-07-11 18:36:56 +02:00
roboomp b87cfc7e1d fix(native): read grep files into stable snapshots
Replace mmap-backed native grep reads with bounded owned reads so concurrently rewritten files cannot fault the process or mutate captured search bytes.

Add a regression for oversized prefix snapshots and remove the direct memmap2 dependency. Fix existing pi-natives doc-markdown warnings so the native clippy gate passes.

Fixes #5205
2026-07-11 16:30:08 +00:00
can1357 172691f6ec feat: removed redundant pre-execution bash command fixup logic
- Removed the bash command fixup system and associated logic from both the Rust and TypeScript components.
- Deleted the redundant fixup module and its exported implementations.
- Updated technical documentation and configuration settings to reflect the removal of pre-execution bash command rewriting.
2026-07-11 18:28:32 +02:00
can1357 cf1b3fc3fb chore: bump version to 16.4.4 2026-07-11 12:30:26 +02:00
can1357 3272b65742 feat(pi-natives): prioritized shallow paths for fuzzy search ties
- Implemented path_depth as a tie-break mechanism for fuzzy search results.
- Updated fuzzy_find_sync sorting logic to surface shallow matches before deeper ones during score ties.
- Added a regression test confirming that root-level directories rank above nested ones when scores are identical.
2026-07-11 10:57:25 +02:00
can1357 f7930048d5 chore: bump version to 16.4.3 2026-07-11 07:55:17 +02:00
can1357 ce10e5fff6 feat: introduced advanced grep functionality with pcre2 and file traversal
- Integrated PCRE2 regex engine with automatic fallback for patterns unsupported by the standard Rust engine.
- Implemented structured JSON output, byte offset reporting, and match replacement functionality.
- Added support for advanced file traversal including Gitignore integration, decompression of archives, and path filtering.
- Updated crate dependencies to include support for expanded grep CLI options and printer utilities.
2026-07-11 07:33:21 +02:00
can1357 8755c3879e feat(pi-uu-grep): implemented advanced regex and filtering capabilities
- Added support for advanced grep features including Perl-compatible regex, match limits, and byte offsets.
- Implemented robust file and directory filtering mechanisms using include/exclude patterns and custom path rules.
- Enhanced output formatting with control over group separators, null-terminated output, and binary file handling.
- Integrated `grep-pcre2` and expanded test coverage for the builtin ripgrep functionality.
2026-07-11 07:33:20 +02:00
can1357 5a4a6670b1 feat(pi-walker): ignored parent rules that cover explicitly rooted walks
- Updated gitignore loading to filter out ancestor ignore rules that match the current explicit walk root.
- Retained unrelated parent ignore rules and processed local ignore files within the root normally.
- Added a regression test to ensure ignored roots still respect nested ignore rules.
2026-07-11 07:33:18 +02:00
can1357 45143e8c75 feat(natives): restricted traversal depth for glob pattern matching
- Added `walk_depth_bound` to calculate the maximum file path depth based on glob pattern segments.
- Configured the glob walker to restrict traversal depth for non-recursive patterns, preventing unnecessary scanning of subtrees that cannot match.
- Improved response times for narrow globs over large directories by pruning the search space earlier.
- Added test cases to verify depth-bounded matching behavior and pattern edge cases.
2026-07-11 05:47:54 +02:00
can1357 fd2d4616a6 chore: bump version to 16.4.2 2026-07-11 00:17:35 +02:00
can1357 395e4a5fcf chore: bump version to 16.4.1 2026-07-10 20:50:59 +02:00
can1357 a0f7266fbc chore: bump version to 16.4.0 2026-07-10 14:11:05 +02:00
can1357 e8d0a93db6 chore: bump version to 16.3.15 2026-07-09 22:44:35 +02:00
can1357 5ddb0719ad chore: bump version to 16.3.14 2026-07-09 20:37:29 +02:00
can1357 dd67447a03 chore: bump version to 16.3.13 2026-07-09 19:39:55 +02:00
can1357 4ff9dfc124 style: rewrapped clipboard tool-name docs 2026-07-09 18:39:56 +02:00
can1357 f27596d287 style: satisfied clippy doc-markdown in clipboard docs 2026-07-09 18:37:46 +02:00
can1357 b04cb70592 style: applied rustfmt to integrated native fixes 2026-07-09 18:36:50 +02:00