refactor: clean dead code, add high-value tests, streamline docs - #162
Conversation
|
Warning Review limit reached
Next review available in: 47 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (45)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Behavior-preserving refactor verified by typecheck + full unit suite + ncc build. Dead code (safe cleanup): - remove ~17 comment-only dead blocks (keep meaningful TODOs) - rename misnamed goLocalInvoke.ts -> goLocalStart.ts (class is GoLocalStart), update its import - add ts-prune/depcheck audit scripts; audit confirms no production dependency is safely removable (flags are interface types, ts-jest/e2e/f2elint transitives) Tests (high-value gaps first): - add 12 unit test files / 120 cases for previously untested modules: resources acr/oss/ram/vpc-nas, info, 2to3, deploy/impl base/trigger/vpc_binding, deploy/utils, run-command - oss/ram/vpc-nas 0->100%, acr 0->80.8%, info 0->98.9%, 2to3 0->98.5% - overall statement coverage 61.87% -> 67.36% Test config: - add collectCoverageFrom to expose real coverage - split `test` to unit-only (no credentials); add `test:it` for integration Docs: - delete empty version.md, redundant root CONTRIBUTING.md, and stale AI meta-docs (project-summary, testing-plan, technical-documentation) - consolidate contribution guide into docs/CONTRIB.md; rewrite docs index and architecture design notes; fix README node badge >=14.14.0 -> >=16 - update CLAUDE.md scripts table Signed-off-by: ls147258 <ls147258@alibaba-inc.com>
49f582f to
d574086
Compare
- Run npm run fix so check-format CI passes (no residual TS diffs) - 2to3 test: use path.join instead of hardcoded POSIX paths so assertions pass on Windows (path.join uses the platform separator) Signed-off-by: ls147258 <ls147258@alibaba-inc.com>
Summary
Behavior-preserving refactor covering dead-code cleanup, test gaps, and documentation. No public API changes — all 22 command exports in
src/index.tsare unchanged. Verified bytypecheck+ full unit suite +ncc build.Dead code (safe cleanup only)
goLocalInvoke.ts→goLocalStart.ts(the class isGoLocalStart, and the old name collided withinvoke/goLocalInvoke.ts); import updated.ts-prune/depcheckaudit scripts. Audit confirms no production dependency is safely removable — flags areinterface/public types and ts-jest/e2e/f2elint transitive deps.Tests (high-value gaps first)
acr/oss/ram/vpc-nas,info,2to3,deploy/impl(base/trigger/vpc_binding),deploy/utils,run-command.oss/ram/vpc-nas0→100%,acr0→80.8%,info0→98.9%,2to30→98.5%.jestconfig: addedcollectCoverageFromto expose real coverage.testto unit-only (no credentials required); addedtest:itfor integration tests.Docs
version.md, redundant rootCONTRIBUTING.md(generic boilerplate with wrong repo refs), and stale AI meta-docs (project-summary,testing-plan,technical-documentation).docs/CONTRIB.md; rewrote docs index and architecture design notes.>=14.14.0→>=16; updatedCLAUDE.mdscripts table.Test plan
npm run typecheck— cleannpm test— 75 suites, 1122 passed / 2 skippednpm run build— ncc bundle producednpm run lint— 0 errors