Repository navigation
test(session-store): ignore the checkout path in the secret-word check - #197
Merged
Merged
Conversation
"terminal window descriptors persist atomically without scrollback or environment" saves a descriptor whose cwd is process.cwd() and then checks the whole file against /buffer|environment|capability|token/. Run from a checkout whose path contains one of those words (for example a worktree named after an environments feature), the cwd alone matched and the test failed on every run. The check now leaves the descriptor's own cwd value out; everything else in the file is checked as before.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Owner
|
@coderabbitai full review |
Action performed
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Split out of #159 and rebased on current main (2367505): fix 12 of #159, unchanged in substance. Small and independent; it does not depend on the other parts of #159. Fix 11 of #159 (the engine-tabs click race) is not included: main already fixes it in 6e36e98 (
ready(tabId, afterRevision)).Problem
"terminal window descriptors persist atomically without scrollback or environment" in
tests/terminal-session-store.test.mjsfails on every run when the checkout path contains "environment", "token", "buffer" or "capability" (for example~/environment/CanvasTTY, or a worktree named after an environments feature).Cause
The saved descriptor's
cwdisprocess.cwd(), and the test scanned the whole saved file,cwdincluded, against/buffer|environment|capability|token/. The checkout path alone matched.Fix
The scan leaves the descriptor's own
cwdvalue out (it is replaced by""before matching). Everything else in the file is checked as before, so a leaked buffer, environment, capability or token field still fails the test. One test file changes (+2/-1); no product code changes.Test
environment-check: on 2367505 without the fix, 1 of 7 tests fails (this one,doesNotMatch); with the fix, 7 of 7 pass. From a normal checkout path both pass.Verification
npm run build(includes typecheck) andnpm run audit:secrets: pass.Summary by CodeRabbit