mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-07 16:06:19 +00:00
Summary: - This PR routes direct APNs HTTP/2 sends through an APNs allowlisted managed-proxy CONNECT wrapper, adds APNs proxy validation/docs/guardrails, and expands regression and live-test coverage. - Reproducibility: yes. source-reproducible: current main `sendApnsRequest()` still uses raw `http2.connect(au ... nly covers HTTP/global-agent/Undici hooks. I did not run a live APNs reproduction in this read-only review. Automerge notes: - PR branch already contained follow-up commit before automerge: test: guard raw HTTP2 APNs connections - PR branch already contained follow-up commit before automerge: test: guard raw HTTP2 with OpenGrep - PR branch already contained follow-up commit before automerge: lint: ban raw HTTP2 imports - PR branch already contained follow-up commit before automerge: fix: use managed proxy state for APNs - PR branch already contained follow-up commit before automerge: test: exercise APNs active proxy state - PR branch already contained follow-up commit before automerge: fix: reject conflicting managed proxy activation Validation: - ClawSweeper review passed for headdab7c86a75. - Required merge gates passed before the squash merge. Prepared head SHA:dab7c86a75Review: https://github.com/openclaw/openclaw/pull/74905#issuecomment-4350181159 Co-authored-by: jesse-merhi <79823012+jesse-merhi@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
35 lines
994 B
TypeScript
35 lines
994 B
TypeScript
import { Command } from "commander";
|
|
import { describe, expect, it } from "vitest";
|
|
import { registerProxyCli } from "./proxy-cli.js";
|
|
|
|
describe("proxy cli", () => {
|
|
it("registers the debug proxy subcommands", () => {
|
|
const program = new Command();
|
|
registerProxyCli(program);
|
|
|
|
const proxy = program.commands.find((command) => command.name() === "proxy");
|
|
expect(proxy?.commands.map((command) => command.name())).toEqual([
|
|
"start",
|
|
"run",
|
|
"validate",
|
|
"coverage",
|
|
"sessions",
|
|
"query",
|
|
"blob",
|
|
"purge",
|
|
]);
|
|
|
|
const validate = proxy?.commands.find((command) => command.name() === "validate");
|
|
expect(validate?.description()).toBe("Validate the operator-managed network proxy");
|
|
expect(validate?.options.map((option) => option.long)).toEqual([
|
|
"--json",
|
|
"--proxy-url",
|
|
"--allowed-url",
|
|
"--denied-url",
|
|
"--apns-reachable",
|
|
"--apns-authority",
|
|
"--timeout-ms",
|
|
]);
|
|
});
|
|
});
|