Repository navigation
refactor(android): reuse node JSON param parser - #120456
Conversation
|
@clawsweeper review Exact head: |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 8:21 PM ET / August 26, 2026, 00:21 UTC. ClawSweeper reviewWhat this changesThe PR replaces two Android handler-local JSON-object parsers with the shared node parser while preserving each handler’s validation behavior. Merge readinessKeep open for normal maintainer review: current main still has both duplicated parsers, while this branch routes both callers to a source-identical shared implementation without changing handler validation. Priority: P3 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherAndroid gateway invocation handlers receive JSON parameters from the Gateway session, parse object-shaped requests, then perform notification or system actions. This PR centralizes parsing in the shared node utility before handler-specific validation. flowchart LR
A[Gateway invocation] --> B[Android node handler]
B --> C[Shared JSON object parser]
C --> D{Valid object?}
D -->|No| E[Handler invalid-request response]
D -->|Yes| F[Notification or system action]
Before merge
Agent review detailsSecurityNone. PR surfaceOther -21. Total -21 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Land the two handler call-site substitutions as one canonical parser path after normal maintainer review of the current head. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a behavior-preserving refactor, and the deleted and shared parser bodies are source-equivalent. Is this the best way to solve the issue? Yes: centralizing the identical parser in its existing node utility removes duplication while leaving handler-specific request validation in place. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 18ad0dda9137. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
629618e to
7bc4984
Compare
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
What Problem This Solves
The Android notification and system handlers each carried a private copy of the node layer's JSON-object parameter parser. The canonical parser already lives in
NodeUtils.ktand has the same absent, malformed, and non-object behavior.The previous test-only MCP lint-gate work on this draft remains preserved at signed head
629618e42d3664783bdbd0013c7f2223a427b45f. Its body explicitly marked it "Draft only. Do not merge as part of this execution." This rewrite reuses that deferred draft slot instead of opening another maintainer PR above the repository cap.Why This Change Was Made
parseJsonParamsObject.No SDK seam, protocol, config, persistence, authorization, compatibility, or dependency change.
User Impact
No intended behavior change. Null, blank, malformed, and non-object JSON still fail through the same handler-specific invalid-request paths; valid objects retain their existing field validation.
Evidence
Exact head:
7bc4984fe3d61c05303485c10235b5cebe36fd86NodeUtilsTest,NotificationsHandlerTest, andSystemHandlerTest.:app:ktlintCheck: passed.pnpm check:changed: passed.git diff --check: passed.gpt-5.6-solhigh: clean, confidence 0.99.tbx_01m0xkcxebgh87jfxfb9veq68n:pnpm check:changedpassed.Test Audit
No new test was added. The canonical parser already has direct malformed/object-shape coverage, and both handlers retain focused invalid-request and valid-request tests. The change removes duplicate implementation without introducing a new observable contract or test-only seam.
AI-assisted: yes.