Repository navigation
fix(gateway): restore native lint after transport changes - #157516
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 3:21 PM ET / 19:21 UTC. ClawSweeper reviewWhat this changesMoves Apple Gateway error-detail conversion into the shared error module so native lint can pass while connection and request errors keep the same fields. Merge readiness✅ Ready for maintainer review Keep open: the native lint problem remains on the pinned current main, and this branch is a focused repair. Source review found no concrete correctness or security defect. Priority: P3 Review scores
Verification
How this fits togetherOpenClawKit's Apple Gateway channel receives Gateway responses and turns failures into connection or request errors. The error-detail converter carries the server's fields into those errors for app handling. flowchart LR
A[Gateway response] --> B[Apple Gateway channel]
B --> C[Error detail conversion]
C --> D{Failure type}
D --> E[Connection error]
D --> F[Request error]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceOther 0. Total 0 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep error-detail conversion in the shared error module, with native lint passing and connection and request error fields preserved. Do we have a high-confidence way to reproduce the issue? Yes. The linked native CI failure, the 1,500-line SwiftLint threshold, and the pre-fix helper location give a focused reproduction path; this read-only review did not rerun SwiftLint. Is this the best way to solve the issue? Yes. Moving the converter to the existing error owner preserves both callers and their field precedence without weakening the lint rule. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 533664f8825e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash auto-merge.
|
Related: #147070, #157454, #157457
What Problem This Solves
Fixes native CI failing its existing SwiftLint file-length limit after the shared gateway transport changes landed.
User Impact
No user-visible behavior changes. This restores native validation for the next small mobile pairing PR without weakening the lint limit or changing authentication behavior.
Why This Change Was Made
GatewayChannel.swiftreached 1,512 counted lines against the existing 1,500-line limit. Move its 22-line error-detail conversion function into the existingGatewayErrors.swiftowner. Both connection and request-response callers keep using the same function and error-field precedence. The moved function remains module-internal; no public API changes.Production delta: +22/-22 (net zero); tests: unchanged. No new files, configuration, dependencies, migrations, or desktop application changes.
Evidence
GatewayChannel.swiftfile-length violation).git diff --checkpass.a0923d39b1a7cc0c8733ac330dd8cbc7321f1075: 1,792 tests across 141 suites in 36.444 seconds, including Gateway errors and Gateway session coverage. It tested merge217b51cf03e66a95144066c9a9c1185a93634bb6with main37783fcbcf78c93c09caf743e0ba53ed44dbfedf.openclaw/ci-gate. The separate inherited Periphery finding is documented below.Known baseline follow-up: shared Periphery intersection reports only
GatewayExternalAuthorizationError, introduced by #157454. ItsGatewayConnectionProblem.swiftblob is identical on this branch and the main baseline (ce5ffbb9441cd4aea2b9d9f9f8137070f64c9294); this PR changes neither that type nor its admission/reconnect consumers. The global scan includes all shared declarations, so it exposes the staged error type before its app producer lands. Resolve that retention/activation decision with the staged mobile ingress work; this repair adds no suppression and preserves the existing transport contract.