You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(terminal): preserve Bash prompt suffixes and array order - #34732
Keep real Bash coverage for the prompt-hook separators and ordering that previously broke shell integration. Current main already contains the production implementation; this branch changes tests only.
What Changed
Execute the production rcfile with a temporary HOME/profile, covering trailing separators, consecutive separators, escaped semicolons/spaces, and array member order. Assert that user hooks run before the epilogue and array members execute once.
This is the focused bash-prompt-regression contribution split from #14838 following the maintainer request. It is based on main ee09f979fac61fc5b1db4a528c9e3a20667b796f. No unrelated contribution from the original PR is included.
Why
Keeping this boundary separate gives the fix its own cause, verification scope and rollback boundary without adding dependencies or changing unrelated features.
N/A — coverage-only split, no production or visual behavior change.
Testing
I manually tested these changes locally — no human testing attestation is made.
Automated tests added/updated.
ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed --base=ee09f979fac61fc5b1db4a528c9e3a20667b796f --maxWorkers=2: 19/19 checks passed (47.7 seconds in the required wrapper).
Actual standalone production rcfile smoke: Bash exited 0; a trailing separator preserved the user hook before the epilogue, and array prompt hooks ran once in order. No full daemon/PTY/native-platform result is claimed.
Required check:changed passed all 19 checks. A separate actual Bash smoke passed trailing-separator and ordered-array behavior using the generated production rcfile.
Full repository regression/native packaging, real cross-platform/SSH/paired-host interaction and successful exact-head PR Checks remain separate gates; they are not claimed passing by this split.
Risk
Level: Low
This is tests-only. A flaky interactive Bash fixture could delay validation on a different shell or host; production prompt handling, saved data, agent selection, and SSH transport are unchanged. Revert the test change to remove the coverage; there is no data migration to undo.
AI Disclosure
OpenAI Codex GPT-6.1-Sol assisted with this maintenance split, integration, regression coverage and verification. Original contribution and review history is retained in #14838.
Review
Correctness: the focused behavior and failure boundaries are covered as described above; no full-suite claim.
Cross-platform and remote/local: shared behavior is preserved; only the stated macOS execution evidence is established. Real Windows/Linux/SSH/paired-host behavior remains unverified unless explicitly listed.
Agent/integration compatibility: no agent selection or integration configuration is changed by this split.
Performance and security: no new dependency, credential access or network authority is introduced; ownership checks fail closed and parser matching stays limited to known shapes where applicable.
UI quality: no styling/layout change; no native visual-quality claim.
Agent skill upstream boundary
Not applicable: no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments or documentation are copied or mechanically translated.
Checklist
This PR is small and focused.
The before/after, mechanism and rationale are explained.
Visual applicability and evidence boundaries are explicit.
Self-reviewed for correctness, security and performance.
Cross-platform, SSH/remote and path/shortcut impact considered.
Full lint/typecheck/test/build and exact-head CI are all green — only the specific checks above are established.
No actionable comments were generated in the recent review.
Walkthrough
Added Bash integration tests for the shell-ready rcfile. The tests run on non-Windows systems when Bash is available. They check separator and escape handling in PROMPT_COMMAND, and verify that array-form commands run once and in order before the epilogue.
Merge Risk: Minimal · up to bbd8f
This test-only change has no established merge-blocking risk.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title clearly and concisely describes the test-only change: preserving Bash prompt suffixes and array execution order.
Docstring Coverage
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The pull request description follows the required template and clearly states the scope, user-facing behavior, rationale, linked issue, testing evidence, risk, rollback method, AI disclosure, and plat…
Full details: Docstring Coverage
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files.
Full details: Description check
Explanation
The pull request description follows the required template and clearly states the scope, user-facing behavior, rationale, linked issue, testing evidence, risk, rollback method, AI disclosure, and platform limitations. It explicitly marks visual proof as not applicable and does not claim unverified full-suite or cross-platform results.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Tip
🎯 Customize your risk assessments
Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.
✅ Automatic approvals, with your rules
Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Yes. The array test checks counts and member order only. A regression that runs the epilogue first would pass it. Define the observable epilogue in this fixture and assert that ARRAY_SECOND precedes it.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Addressed the array-epilogue coverage gap in bbd8f55. The real Bash array fixture now installs an observable epilogue, checks that it ran, and requires ARRAY_SECOND to precede it while retaining exact-once and member-order assertions.
Current-head update: bbd8f553ff93379b8721881faf221d949182b2b0 now passed all 19 required check:changed --base=ee09f979fac61fc5b1db4a528c9e3a20667b796f --maxWorkers=2 checks (48.9 s), in addition to the two actual interactive Bash regression tests. One earlier wrapper attempt included the generated Vitest JSON report as an untracked input and failed formatting; that task-owned generated report was archived outside the worktree and removed before the clean 19/19 run. CI and maintainer review remain separate gates.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Keep real Bash coverage for the prompt-hook separators and ordering that previously broke shell integration. Current main already contains the production implementation; this branch changes tests only.
What Changed
Execute the production rcfile with a temporary HOME/profile, covering trailing separators, consecutive separators, escaped semicolons/spaces, and array member order. Assert that user hooks run before the epilogue and array members execute once.
This is the focused
bash-prompt-regressioncontribution split from #14838 following the maintainer request. It is based on mainee09f979fac61fc5b1db4a528c9e3a20667b796f. No unrelated contribution from the original PR is included.Why
Keeping this boundary separate gives the fix its own cause, verification scope and rollback boundary without adding dependencies or changing unrelated features.
Linked Issue
#14448
Visual Proof
N/A — coverage-only split, no production or visual behavior change.
Testing
ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed --base=ee09f979fac61fc5b1db4a528c9e3a20667b796f --maxWorkers=2: 19/19 checks passed (47.7 seconds in the required wrapper).Actual standalone production rcfile smoke: Bash exited 0; a trailing separator preserved the user hook before the epilogue, and array prompt hooks ran once in order. No full daemon/PTY/native-platform result is claimed.
Required check:changed passed all 19 checks. A separate actual Bash smoke passed trailing-separator and ordered-array behavior using the generated production rcfile.
Full repository regression/native packaging, real cross-platform/SSH/paired-host interaction and successful exact-head PR Checks remain separate gates; they are not claimed passing by this split.
Risk
Level: Low
This is tests-only. A flaky interactive Bash fixture could delay validation on a different shell or host; production prompt handling, saved data, agent selection, and SSH transport are unchanged. Revert the test change to remove the coverage; there is no data migration to undo.
AI Disclosure
OpenAI Codex GPT-6.1-Sol assisted with this maintenance split, integration, regression coverage and verification. Original contribution and review history is retained in #14838.
Review
Agent skill upstream boundary
Checklist
Author