Repository navigation
fix(jcode-transport): assert the kcode- pipe prefix production actually uses - #343
Conversation
`path_to_pipe_name` falls back to the stem "kcode" (both via
`unwrap_or("kcode")` and via the empty-after-filter branch), but
`pipe_name_falls_back_when_stem_is_empty` asserted a "jcode-" prefix.
Trace: `Path::new("...").file_stem()` == `Some("..")`; the character
filter keeps only ASCII alphanumerics, '-' and '_', so both dots are
dropped and the string is empty; the empty branch then yields "kcode".
The assertion therefore could never pass.
The defect was latent: `lib.rs` gates the module with `#[cfg(windows)]`,
so the test only compiles on Windows, and the `windows-build-test` job
in ci.yml is pinned `if: false` while `windows-smoke.yml` is
workflow_dispatch-only. It would have failed the moment either was
re-enabled.
`pipe_name_matches_the_typescript_sdk` is left untouched: Node's
`path.win32.parse(p).name` (basename minus extension) and Rust's
`file_stem()` agree on both pinned literals ("jcode-api" and "jcode"),
and both pinned hashes were independently reproduced. The user-visible
socket names stay "jcode"; only the fallback is "kcode".
tx-agent: jcode
tx-validated: none
tx-scope: crates/jcode-transport
tx-intent: fix a Windows-only test assertion that could never pass
tx-agent: jcode tx-validated: none tx-scope: transport-pipe-fallback-stem tx-lane: jcode:session_iwazaru_1795472450499_bcf77f2c366985f8
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 20 minutes. View limit details
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. |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge OverviewThe PR changes a single line in The change is correct: No inline comments required. The PR is a one-line test fix, Windows-only ( Files Reviewed (1 files)
Reviewed by free · Input: 49.1K · Output: 4.2K · Cached: 151.8K |
|



User description
Closes #162
What
crates/jcode-transport/src/windows.rshas one test,pipe_name_falls_back_when_stem_is_empty, that asserted the named-pipe prefix\\\\.\\pipe\\jcode-. Productionpath_to_pipe_namefalls back to the literal stemkcode(both theunwrap_orand the empty-stem branch), so the assertion could only ever fail on Windows. This is the single remaining line of the branch after syncing master.Evidence
Residual diff against current master is exactly:
Validation
git diff --name-only --diff-filter=Uafter merging master: 0 conflicts.git diff origin/master HEAD: 1 file, 1 insertion, 1 deletion.crates/jcode-transport/src/windows.rsis Windows-only (tokio::net::windows::named_pipe), and this repository'swindows-latestCI job is SKIPPED, so no runner exercises it. Linux CI can only prove the crate still builds. Stated rather than claimed as green.tx-agent: jcode
tx-validated: none
tx-scope: crates/jcode-transport, windows named-pipe test
tx-intent: land the one real line of the pipe-name fallback branch, closing #162
CodeAnt-AI Description
Correct the Windows pipe fallback test expectation
What Changed
kcode-prefix produced when a pipe name has an empty stem.Impact
✅ Accurate Windows pipe fallback validation💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.