Repository navigation
Conversation
Locally adapt Colin McDonnell's Zod a0ebf970f2d752e5f58527cd2942ff48be4f46bd (#6652) to the SDK's bundled Zod 3 parser. This is not a cherry-pick or a Zod major migration. Preserve valid API behavior and document intentional early-abort issue changes. Adapt authentication/browser regression scaffolding from local aggregate 8e6f7bd (roboclaw-bot), preserved in f0a0c53. Add direct size-bound and async regression coverage. Co-authored-by: RomneyDa <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesPatch Discord’s bundled Zod parser to reject oversized bounded arrays and sets before parsing their elements. Example: An SDK schema permits five buttons but receives six.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR addresses an unfixed bundled-parser defect with a narrow, source-supported repair; no actionable patch defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Discord Activities build bundles the Embedded App SDK into a browser asset served by the Gateway; its embedded Zod parser validates SDK requests and responses. flowchart LR
A[Exact version package patch] --> B[Embedded SDK parser]
B --> C[Activity browser bundle]
C --> D[Gateway asset route]
D --> E[Discord Activity browser]
E --> F[SDK schema validation]
Technical reviewBest possible solution: Retain the exact-version parser repair and remove it once a published SDK passes the same regression coverage without patching. Do we have a high-confidence way to reproduce the issue? Published ESM and CJS parser source shows oversized bounded collections reaching element traversal, and the PR reports a failing unpatched regression; no target code was executed during this review. Is this the best way to solve the issue? The focused adaptation repairs the embedded parser that a root Zod upgrade cannot reach, preserves valid parsing, and avoids replacing the SDK’s schema major. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 54818f9e6756. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceTests +208, Docs +36, Config +1, Other +60. Total +305 across 6 files. Added test files: 1. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 29, 2026, 12:41 AM ET / 04:41 UTC. |
Co-authored-by: RomneyDa <[email protected]>
…187296) * fix(macos): skip passive uninstall without plist (#181257) Passive macOS Gateway stops now preserve an absent current-profile service definition without invoking uninstall, while explicit low-level ghost recovery remains available. Release adaptation: the 2026.10.8 backport of #180390 removed the absent-plist guard from GatewayLaunchAgentManager's disable path without main's follow-up, so every passive stop with no LaunchAgent plist ran `openclaw gateway uninstall` (mac validation: GatewayProcessManagerTests "pause preserves unretainable services" [absent]). Stable has no migration-pending custody or `.authority` wrapper, so the guard checks `custody.definition.plist` directly. Mac-only post-tag fix; npm, Docker and Linux bytes are unaffected. (cherry picked from commit cb10ec4) * fix(discord): reject oversized vendored Zod collections on stable Port local adaptation 0c38cbb (roboclaw-bot, #187289) to release/2026.10.8. Locally adapt Colin McDonnell Zod a0ebf970f2d752e5f58527cd2942ff48be4f46bd (#6652); not an upstream OpenClaw cherry-pick or major migration. Test scaffolding: 8e6f7bd (roboclaw-bot), preserved in f0a0c53. Co-authored-by: RomneyDa <[email protected]> --------- Co-authored-by: Shakker <[email protected]> Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: RomneyDa <[email protected]>
) Port local adaptation 0c38cbb (roboclaw-bot, #187289) to release/2026.10.10. Locally adapt Colin McDonnell Zod a0ebf970f2d752e5f58527cd2942ff48be4f46bd (#6652); not an upstream OpenClaw cherry-pick or major migration. Test scaffolding: 8e6f7bd (roboclaw-bot), preserved in f0a0c53. Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: RomneyDa <[email protected]>
Scope
Draft targeting
extended-stable/2026.9.33(observed basee93b50ad2400871616c2e6588d57488dba94ecad, package version 2026.9.35). Focused mitigation for the Zod parser embedded inside Discord’s browser SDK, not a broad dependency refresh or a claim of clean dependency audits.The published
@discord/[email protected]bundles its own Zod 3 implementation. Updating the separately installed Zod package does not change those bytes. A baseline regression invokes element refinements on an oversized array; the patch rejects the collection before element or outer-refinement work.Implementation and provenance
a0ebf970f2d752e5f58527cd2942ff48be4f46bd(colinhacks/zod#6652), referenced by GHSA-mrhx-c7xc-m3w5.invalid_union; regression coverage and the patch documentation make that compatibility change explicit. The bundled Zod-3 map API has no upper-size constraint.8e6f7bd28af9e7bebf03ff08bf0001e4fc7561be, authored byroboclaw-bot, preserved inf0a0c53aa23b80bd68267fc48cfdda020db77c26; this is not an upstream OpenClaw fix being backported. New early-rejection and compatibility coverage belongs to this isolated local adaptation.81e49dfa871e935641d9b9591ed789e837dc89e1), remains open; it is not a published compatible fix. This small patch avoids the previous whole-parser replacement.Validation
node scripts/run-vitest.mjs run test/scripts/discord-sdk-zod.test.ts: 7 tests pass, including both SDK entrypoints and the actual production browser build.node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.root.scripts.json --noEmit: pass.pnpm install --frozen-lockfile --ignore-scripts, package-patch guard andgit diff --check: pass. Native lifecycle / packaged-plugin qualification is not claimed.patches/README.md.Boundaries / remaining gates
This does not remove the separately installed Zod-3 dependency or claim that the advisory is globally cleared. Beta 2026.10.10-beta.5 and stable 2026.10.8 also use SDK 2.5.0 and need the embedded-parser repair; this PR includes no unqualified cross-train commits. Their direct Zod 4.6.5 pins are a separate dependency scope.
Keep draft pending full independent review, hosted checks and release/packaged-plugin qualification. No ready-for-review request, merge, tag, or release is authorized by these local checks.