Repository navigation
fix(skills): keep archive abort errors observed before reading - #26246
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughopenSkillTarGzip now registers an error listener on the gunzip stream before starting the archive pipeline. A regression test aborts a gzip tar archive with an EEXIST error before the reader’s first request. It verifies that readExact rejects with that error and removes the temporary directory. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The early-abort path retains error observation, and a focused Node reproduction confirms the reader receives the original error. No actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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. Comment |
ELI5
A rejected skill extraction could also raise an uncaught stream error. The caller now receives the original rejection without that extra unhandled error.
What Changed
Keep an error listener on the archive’s gunzip stream from construction through abort. A small archive can finish its pipeline before extraction rejects a conflicting staging directory; the reader has not started yet and has no error listener. The existing pipeline and reader still reject normally. Add a real gzip regression that waits for pipeline completion, aborts before the first read, and checks the reader rejects with the exact original error.
Why
This fixes stream error ownership at its source rather than suppressing test errors, delaying extraction, or changing validation. The failure appeared in full CI for #26237; the archive sources are unchanged by that import PR. The focused regression reproduces on both Bun and Node, so this is not claimed as a Bun-only defect.
Linked Issue
Internal maintainer correction discovered while validating #26237. The template’s maintainer exception applies; no needless separate issue was created.
Visual Proof
N/A — archive error handling has no visual or interaction change.
Testing
Before/after measurements below use the same 15 named cases and the same real gzip regression. These are correctness measurements, not a speed claim.
Broader archive, gzip, extraction, package identity and manifest checks: 7 files / 75 cases pass under both Bun and actual Node, shuffled with seed 104729, isolation retained and filesystem module cache disabled.
pnpm tc:node,pnpm run check:code-quality:changed, formatting and diff checks pass on macOS. Linux/Windows CI checks now pass; paths use existing Node platform-neutral APIs. Local and SSH extraction share the same archive reader.The first two diagnostic attempts encountered an existing custom reporter error while formatting the uncaught exception. Both remain recorded; the before/after table uses fresh stock default + JSON reporter runs. Stock JSON alone says success despite an uncaught exception; normal exit codes and default logs are included in the qualification.
Full PR CI run 37648372465 passed on tested source
0f29c3727360bbd5c6af5500ed68cf9a46a401ba(base76d1b7bf29932f6e1edfb6b0b34d65c5c88e5f55, exact head2dbda592eda87a28bf6e390a3d3f3d848a7d1f33). All 11,678 physical files were assigned and reported exactly once: 11,538 passed, 140 stock-skipped; 112,610 passed cases, one expected-failure case, 1,052 stock-skipped cases, zero failed files or unhandled errors. All five unit shards and 29 indexed checks passed, including Windows/Linux checks. The changed archive suite reported all 15 cases passed under the Bun project. Stock artifacts lack full named-case maps, so full CI establishes enrollment/counts rather than named-case identity parity; focused runs above supply that parity. All 18 stock configuration/routing/source guards and both changed files match the tested source. No assertion, timeout or unhandled-error guard is weakened.I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Independent source and focused evidence review passed against exact head
2dbda592eda87a28bf6e390a3d3f3d848a7d1f33: all focused and broader named-case maps match, source fingerprints remain stable and original reader rejection is preserved. CodeRabbit’s exact-head review generated zero actionable comments and no unresolved review threads. Its generic 80% docstring-coverage advisory was evaluated: the concise late-abort comment explains the non-obvious reason, and boilerplate documentation for the two touched functions would conflict with repository comment guidance. Its linked-issue advisory is covered by the internal maintainer exception above. Full CI and independent enrollment/source checks passed.Agent skill upstream boundary
Notes
Only the owned gunzip stream gets the listener. Compressed-size limits, archive identity, path checks, staging rules and cleanup remain in the existing extraction code. The regression uses an owned temporary directory and real stream completion rather than a guessed delay.
Checklist