Skip to content

Gateway: add APNs push test pipeline#20307

Merged
mbelinky merged 2 commits intomainfrom
mb/pr-gateway-apns-pipeline
Feb 18, 2026
Merged

Gateway: add APNs push test pipeline#20307
mbelinky merged 2 commits intomainfrom
mb/pr-gateway-apns-pipeline

Conversation

@mbelinky
Copy link
Contributor

@mbelinky mbelinky commented Feb 18, 2026

Summary

  • add APNs push protocol schemas and server methods
  • add openclaw nodes register push CLI flow
  • add APNs infra sender + tests and gateway push test coverage

Testing

  • not run in this PR prep flow

Greptile Summary

Adds a complete APNs push test pipeline: protocol schemas (PushTestParams/PushTestResult), a push.test gateway server method (gated behind operator.write scope), an openclaw nodes push CLI command, APNs infrastructure (push-apns.ts) with token registration, JWT-based auth with caching, and HTTP/2 delivery, plus a push.apns.register node event handler for iOS nodes to register their push tokens.

  • The APNs infra module is well-structured with proper input validation (hex token regex), base64url JWT encoding, and HTTP/2 connection lifecycle management.
  • The push.test handler follows existing patterns (respondInvalidParams, respondUnavailableOnThrow).
  • The CLI push command always renders output in green "success" color regardless of whether the push succeeded or failed, which could confuse operators when debugging push failures.
  • Tests cover registration persistence, token validation, auth config resolution, and the server method handler (invalid params, missing registration, successful flow).
  • PR notes testing was not run in this PR prep flow.

Confidence Score: 4/5

  • This PR is safe to merge with one minor UX bug in CLI output coloring.
  • The code is well-structured, follows existing codebase patterns, and includes good test coverage. The only issue found is the CLI using success-colored output unconditionally regardless of push result. No security, data integrity, or logical correctness issues in the core push infrastructure or server method.
  • src/cli/nodes-cli/register.push.ts uses success color for failed push results.

Last reviewed commit: a411741

@openclaw-barnacle openclaw-barnacle bot added app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes size: L maintainer Maintainer-authored PR labels Feb 18, 2026
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

13 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines 78 to 79
const { ok: okLabel } = getNodesTheme();
defaultRuntime.log(okLabel(`push.test status=${status} ok=${ok} env=${env}`));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Success color used for failed pushes

The output is always formatted with the ok (green/success) theme color, even when the APNs push fails (ok=false). When a push returns e.g. status 400, the user sees green-colored text saying ok=false, which is misleading. Consider choosing the color based on the result:

Suggested change
const { ok: okLabel } = getNodesTheme();
defaultRuntime.log(okLabel(`push.test status=${status} ok=${ok} env=${env}`));
const { ok: okLabel, error: errorLabel } = getNodesTheme();
const label = ok ? okLabel : errorLabel;
defaultRuntime.log(label(`push.test status=${status} ok=${ok} env=${env}`));

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/cli/nodes-cli/register.push.ts
Line: 78:79

Comment:
**Success color used for failed pushes**

The output is always formatted with the `ok` (green/success) theme color, even when the APNs push fails (`ok=false`). When a push returns e.g. status 400, the user sees green-colored text saying `ok=false`, which is misleading. Consider choosing the color based on the result:

```suggestion
          const { ok: okLabel, error: errorLabel } = getNodesTheme();
          const label = ok ? okLabel : errorLabel;
          defaultRuntime.log(label(`push.test status=${status} ok=${ok} env=${env}`));
```

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

@mbelinky mbelinky merged commit 99d099a into main Feb 18, 2026
10 checks passed
@mbelinky mbelinky deleted the mb/pr-gateway-apns-pipeline branch February 18, 2026 19:32
@mbelinky
Copy link
Contributor Author

Merged via squash.

Thanks @mbelinky!

@huntharo
Copy link

It appears that this broke pnpm protocol:check on main after merging @mbelinky

anschmieg pushed a commit to anschmieg/openclaw that referenced this pull request Feb 19, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 6a1c442
Co-authored-by: mbelinky <[email protected]>
Co-authored-by: mbelinky <[email protected]>
Reviewed-by: @mbelinky
HenryChenV pushed a commit to HenryChenV/openclaw that referenced this pull request Feb 20, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 6a1c442
Co-authored-by: mbelinky <[email protected]>
Co-authored-by: mbelinky <[email protected]>
Reviewed-by: @mbelinky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui cli CLI command changes gateway Gateway runtime maintainer Maintainer-authored PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments