Skip to content

fix(discover): preserve pipelines when splitting chains - #3688

Open
k4its1t wants to merge 5 commits into
rtk-ai:developfrom
k4its1t:fix/discover-pipeline-counting
Open

k4its1t wants to merge 5 commits into
rtk-ai:developfrom
k4its1t:fix/discover-pipeline-counting

Conversation

@k4its1t

@k4its1t k4its1t commented Aug 24, 2026 •

Copy link
Copy Markdown

Summary

Count each complete pipeline as one discovery/session unit, while continuing to count clauses after &&, ||, ;, and the upstream case terminators. For example, cargo test | tail -50 && git status counts as two units rather than dropping the clause after the pipeline.

Permission and rewrite segmentation retain the upstream behavior. Pipeline, mixed-chain, quoted-operator, |&, and session-counting regressions are retained.

Closes #3683

Verification

Merged develop 5eb0509 normally, preserving its quote scanner, shell-wrapper handling, and case terminators. The PR remains limited to four discovery/session files.

  • Format, workspace Clippy, and diff checks passed on Rust 1.99.0.
  • Focused tests passed: discovery 680, permissions 101, session counting 18.
  • The first full run passed 4,313 unit tests with 8 ignored, but the unrelated upstream probe_rejects_a_stranger_on_the_port test hit a ureq stream-read panic. That test passed when rerun individually.
  • The remaining test run, skipping only that separately verified test, passed: 4,652 tests, 8 ignored. No test or timeout settings were changed.

OpenAI Codex assisted with the implementation, conflict resolution, and verification. The first full run was not green; the rerun results are reported separately above.

@CLAassistant

CLAassistant commented Aug 24, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@k4its1t

k4its1t commented Sep 7, 2026

Copy link
Copy Markdown
Author

Resolved conflicts by merging develop in d3e4c43; no rebase or force-push. Pipeline counting is retained alongside upstream parser helpers and conservative permission segmentation. The newly added upstream pipe_then_and characterization still expected truncation at the first pipe, so only its analytics expectation was updated; permission and rewrite assertions are unchanged. Format, Clippy, all 3,210 tests (8 ignored), and targeted permission/pipeline regressions passed. Final PR scope is three original code files plus the corresponding module README. Codex assisted with resolution and verification.

@k4its1t

k4its1t commented Sep 7, 2026

Copy link
Copy Markdown
Author

Post-push check: the branch is mergeable and license/cla is successful. GitHub CI for this update is action_required, awaiting maintainer approval to run; I have not bypassed or approved that gate. The local format, Clippy and full test results above are complete.

@k4its1t

k4its1t commented Sep 8, 2026

Copy link
Copy Markdown
Author

Merged current develop (f749546) with a normal merge, resolving the sole import conflict by retaining upstream redirect_has_file_target alongside split_on_chain_operators. Permission/rewrite behavior is unchanged; the PR remains scoped to the original four files. Rust 1.98: cargo fmt --all --check, cargo clippy --all-targets, and cargo test passed (3,330 unit tests plus 108 integration tests; 8 ignored). The PR diff against develop passes git diff --check. AI-assisted conflict resolution; no force push.

@k4its1t

k4its1t commented Sep 23, 2026

Copy link
Copy Markdown
Author

Merged latest develop (b748a5f) normally in e58b03d and resolved the import-only conflict. Pipeline counting remains separate from permission/rewrite segmentation; the PR still touches only its original four files. Format, Clippy, and 3,735 unit tests passed (8 ignored). The full run reproduced the two existing Git integration failures documented in the updated description; no unrelated fixes were added. AI-assisted conflict resolution and verification.

@k4its1t

k4its1t commented Oct 15, 2026

Copy link
Copy Markdown
Author

Merged develop 5eb0509 normally in f44a00e. Resolved the parser/import/documentation conflicts while retaining upstream quote, wrapper, permission, and case-terminator handling. The PR still touches only its original four files.

Format, workspace Clippy, and the focused discovery/permission/session tests passed. The first full run hit an unrelated upstream proxy-identity test; it passed individually, and the remaining run passed all 4,652 tests (8 ignored). Details are in the refreshed description. AI-assisted resolution; no force-push.

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.

discover: split_command_chain's stop-at-pipe truncation blinds classification to everything after |

2 participants