Repository navigation
feat(#7829): remove DeleteDropUserHandler, a deprecated handler no route constructs - #8763
Conversation
…ute constructs The DELETE /server/user route was dropped in #1250 and its handler left behind. It still called ServerSecurity.dropUserClusterWide, so security audits counted it as a live entry point (#7559). A source-level test now fails when any concrete handler in com.arcadedb.server.http.handler is constructed nowhere. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
💤 Files with no reviewable changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe deprecated ChangesHTTP Handler Cleanup
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Refactor · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The cleanup preserves the documented user-deletion endpoint and adds a check for unused handlers. No actionable merge-blocking risk remains after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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 |
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Coverage variation | ✅ -5.98% coverage variation |
| Diff coverage | ✅ ∅ diff coverage |
Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (a94d47d) 201284 169749 84.33% Head commit (e69ff02) 233846 (+32562) 183229 (+13480) 78.35% (-5.98%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>
Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#8763) 0 0 ∅ (not applicable) Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
ReviewOverall: LGTM. The deletion is safe and the guard test is a good idea. A few non-blocking notes. Deletion
Test coverage: the PR shows the guard red on No blockers from my side. |
…ch non-public and final handlers Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ReviewVerdict: looks good to merge. No blocking issues. Deletion
|
…scan sources one file at a time Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ReviewOverall: a clean, well-scoped change. Nothing blocks the merge. I checked the tree and no reference to Deletion
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8763 +/- ##
=========================================
Coverage 76.06% 76.07%
+ Complexity 3704 3703 -1
=========================================
Files 2075 2074 -1
Lines 201284 201269 -15
Branches 42403 42399 -4
=========================================
+ Hits 153106 153113 +7
+ Misses 31577 31545 -32
- Partials 16601 16611 +10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Closes #7829
DeleteDropUserHandler(the deprecatedDELETE /server/user?userName=handler) has been constructed by nothing since the HTTP server refactor in #1250 removed its route. It still compiled and still calledServerSecurity.dropUserClusterWide, so audits of the security entry points (#7559) counted it as a live door. This PR deletes it and adds a source-level guard,EveryHttpHandlerIsConstructedTest, which fails when any concrete handler incom.arcadedb.server.http.handleris not constructed (new X(,X::new,extends X) by the main sources of any module. The next orphaned handler then shows up in CI instead of in an audit.Before deleting, I checked for references to the route, as the issue asked:
SecurityAdminApiSpecdocuments only/api/v1/server/users. There is no/server/user/{name}path.docs/, the Studio sources, or any JS/TS/Python/Go client (grep -E "server/user[^s]"returns nothing).http.drop-usermetric is still incremented byPostServerCommandHandler'sdrop usercommand, so no metric goes away.Test plan
EveryHttpHandlerIsConstructedTestfails onmainwithExpecting empty but was: ["DeleteDropUserHandler"]DeleteUserHandlermust be seen as constructedHardcodedTestServerPortsTestandOpenApiSpecGeneratorTestare greenmvn -pl server -am testcompilesCoverage
Invariant: every concrete HTTP handler in
com.arcadedb.server.http.handleris constructed by production code.DeleteDropUserHandler*Handlerin the package (65 files)Issue7559SecurityPreconditionOnFollowerTestjavadoc mentionKnown gaps: None. The guard covers only the
serverhandler package. Plugin modules keep their handlers in their own packages, where they are registered by the plugin itself.Adversarial pass
No subagent tool was available in this run, so the author ran the Phase 1.5 pass instead. That makes it less independent than the process intends. Checks and results:
HttpServerroutesDELETE /server/userstoDeleteUserHandler, andgit log -Sshows thenew DeleteDropUserHandler(call was removed in Refactor HTTP Server #1250.// was: new DeleteDropUserHandler(this)toHttpServeris still red, so a comment does not count as construction.Review cycles
finalhandler classesserver/.../handler/X.java), sources are scanned one file at a time, and the javadoc explainsextends XDeferred items (skipped, non-blocking)
public static class": every handler in the package declares its class at the start of the line. A miss here only skips a file. It never produces a false alarm, and the minimum-count check limits how much can be skipped. Skipped.Path.of("..")working-directory dependency" and "startsWithin SKIPPED_TOP_LEVEL": these match the existingHardcodedTestServerPortsTestconvention. Skipped for consistency.Final state
clean-approval
🤖 Generated with Claude Code