Repository navigation
fix(synology-chat): stop fabricating send message ids - #110770
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 18, 2026, 12:17 PM ET / 16:17 UTC. Summary PR surface: Source -7, Tests +30. Total +23 across 2 files. Reproducibility: yes. at source level with high confidence: successful text and media sends traverse the production outbound adapter after a boolean-only webhook acknowledgement, and the contributor provided matching before/after live terminal output against a protocol-compatible endpoint. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Rebase or merge-update the narrow two-file change onto current main, preserve the empty-ID/empty-receipt contract for webhook acknowledgements without platform IDs, and land it after the refreshed focused checks remain green. Do we have a high-confidence way to reproduce the issue? Yes, at source level with high confidence: successful text and media sends traverse the production outbound adapter after a boolean-only webhook acknowledgement, and the contributor provided matching before/after live terminal output against a protocol-compatible endpoint. Is this the best way to solve the issue? Yes. Returning the existing empty-ID sentinel with an empty receipt is narrower and more truthful than generating a local timestamp or treating a chat target as a platform message identifier. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 88e5af7097de. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source -7, Tests +30. Total +23 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
|
@clawsweeper re-review Addressing the [P1] proof finding on head Baseline: Method (precedent: #109997 / #110147)No real Synology NAS is available, so per the accepted protocol-compatible-local-webhook
No mocks, no monkey-patching: the driver builds a production-shaped config Because the webhook ack carries no message id, the honest result is the empty-id sentinel — BEFORE —
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
The incoming-webhook send contract acks with a bare boolean and carries
no platform message id, but the adapter returned a synthetic
`sc-${Date.now()}` id and stamped it into the delivery receipt. Return
the established empty-id sentinel and an empty receipt instead, matching
the honest no-platform-id shape used by sibling channels (qqbot,
googlechat) and the plugin-sdk empty-id contract.
Co-Authored-By: Claude <[email protected]>
777ffdc to
2487872
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
Merged via squash.
|
* origin/main: (224 commits) fix(memory): preserve Windows session ownership (openclaw#115851) fix(compaction): drop context-engine fallback on codex ownership skip (openclaw#114155) (openclaw#115666) fix(msteams): ignore blank certificate settings (openclaw#109112) fix(usage): guard malformed DeepSeek payloads (openclaw#110785) docs(agents): reword imported review rules in repo voice docs(agents): add context-budget, tool-description, cache-invalidation, and review-premise rules docs(agents): mock-gateway proof satisfies gate without discouraging live proof docs(agents): add vitest in-flight edit rule and mock-gateway proof recipe docs(agents): restructure root AGENTS.md around product doctrine and deduped policy fix(codex): keep completed answers over audit gaps (openclaw#115849) test(cli): isolate unknown-command process validation (openclaw#115848) fix(memory-host-sdk): resolve stable execPath for worker fork to survive Homebrew Node upgrades (openclaw#99318) feat(ui): add composer capability menu (openclaw#115800) fix(synology-chat): stop fabricating send message ids (openclaw#110770) fix(feishu): reply to direct messages by chat id (openclaw#109637) fix(acp): attach error listener to spawned ACP agent process (openclaw#109529) fix(sessions): deliver agent announcements to direct message sessions (openclaw#115811) fix(nextcloud-talk): reject reactions for disabled or unconfigured accounts (openclaw#112675) refactor(ui): move Agent Defaults entry from the sidebar into the Agents page (openclaw#115836) feat(gateway): push session PR indicators to subscribed clients (openclaw#115643) ... # Conflicts: # src/agents/apply-patch.ts # src/agents/sandbox/fs-bridge-mutation-helper.ts
* origin/main: docs(agents): reword imported review rules in repo voice docs(agents): add context-budget, tool-description, cache-invalidation, and review-premise rules docs(agents): mock-gateway proof satisfies gate without discouraging live proof docs(agents): add vitest in-flight edit rule and mock-gateway proof recipe docs(agents): restructure root AGENTS.md around product doctrine and deduped policy fix(codex): keep completed answers over audit gaps (openclaw#115849) test(cli): isolate unknown-command process validation (openclaw#115848) fix(memory-host-sdk): resolve stable execPath for worker fork to survive Homebrew Node upgrades (openclaw#99318) feat(ui): add composer capability menu (openclaw#115800) fix(synology-chat): stop fabricating send message ids (openclaw#110770) fix(feishu): reply to direct messages by chat id (openclaw#109637) fix(acp): attach error listener to spawned ACP agent process (openclaw#109529) fix(sessions): deliver agent announcements to direct message sessions (openclaw#115811) fix(nextcloud-talk): reject reactions for disabled or unconfigured accounts (openclaw#112675) refactor(ui): move Agent Defaults entry from the sidebar into the Agents page (openclaw#115836) feat(gateway): push session PR indicators to subscribed clients (openclaw#115643) fix(setup): make Gemini recovery actionable (openclaw#115835) fix(terminal-core): prevent String.replace $ pattern injection in display-string (openclaw#111398) refactor(channels): share ingress retention defaults (openclaw#115824) fix(nostr): profile imports vary on timestamp ties (openclaw#111798)
* fix(synology-chat): stop fabricating send message ids
The incoming-webhook send contract acks with a bare boolean and carries
no platform message id, but the adapter returned a synthetic
`sc-${Date.now()}` id and stamped it into the delivery receipt. Return
the established empty-id sentinel and an empty receipt instead, matching
the honest no-platform-id shape used by sibling channels (qqbot,
googlechat) and the plugin-sdk empty-id contract.
Co-Authored-By: Claude <[email protected]>
* test(synology-chat): verify truthful webhook receipts
---------
Co-authored-by: Claude <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
* origin/main: docs(agents): reword imported review rules in repo voice docs(agents): add context-budget, tool-description, cache-invalidation, and review-premise rules docs(agents): mock-gateway proof satisfies gate without discouraging live proof docs(agents): add vitest in-flight edit rule and mock-gateway proof recipe docs(agents): restructure root AGENTS.md around product doctrine and deduped policy fix(codex): keep completed answers over audit gaps (openclaw#115849) test(cli): isolate unknown-command process validation (openclaw#115848) fix(memory-host-sdk): resolve stable execPath for worker fork to survive Homebrew Node upgrades (openclaw#99318) feat(ui): add composer capability menu (openclaw#115800) fix(synology-chat): stop fabricating send message ids (openclaw#110770) fix(feishu): reply to direct messages by chat id (openclaw#109637) fix(acp): attach error listener to spawned ACP agent process (openclaw#109529) fix(sessions): deliver agent announcements to direct message sessions (openclaw#115811) fix(nextcloud-talk): reject reactions for disabled or unconfigured accounts (openclaw#112675) refactor(ui): move Agent Defaults entry from the sidebar into the Agents page (openclaw#115836) feat(gateway): push session PR indicators to subscribed clients (openclaw#115643) fix(setup): make Gemini recovery actionable (openclaw#115835) fix(terminal-core): prevent String.replace $ pattern injection in display-string (openclaw#111398) refactor(channels): share ingress retention defaults (openclaw#115824) fix(nostr): profile imports vary on timestamp ties (openclaw#111798)
What Problem This Solves
Synology Chat outbound sends fabricated a platform message id. After the incoming-webhook
sendMessage/sendFileUrlcalls resolve with a baretrue(extensions/synology-chat/src/client.ts:96,:132—Promise<boolean>, no id in the webhook contract), the adapter returnedmessageId: \sc-${Date.now()}`and stamped that synthetic id into the delivery receipt'sprimaryPlatformMessageId,platformMessageIds, andparts(extensions/synology-chat/src/channel.ts). Downstream consumers treatmessageIdas a real platform id (e.g. delivery-pin lookup insrc/infra/outbound/deliver.ts), so a fabricated id can be acted on as if it were deliverable platform state. This is the same shape as the merged nostr fix #110006, which removed the syntheticnostr-${Date.now()}` id in favor of an honest send result.Why This Change Was Made
The plugin-sdk contract already defines the sanctioned representation for "no platform id": the empty string sentinel.
createEmptyChannelResultdocuments that "empty message ids are the legacy 'no platform id' sentinel expected by outbound callers" (src/plugin-sdk/channel-send-result.ts:55), andbuildChannelSendResultnormalizes a missing id to""(src/plugin-sdk/channel-send-result.ts:120). Sibling channels that receive no platform id from their transport (qqbotextensions/qqbot/src/channel.ts:52, googlechatextensions/googlechat/src/channel.adapters.ts:52) pass an emptyresultsarray tocreateMessageReceiptFromOutboundResults, producing a receipt with no platform ids and no parts. This change adopts exactly that shape:messageId: ""and a receipt built from an empty results array (keepingthreadId= chat id for routing context only). Note the receipt builder falls back frommessageIdtochatIdwhen resolving a part id (src/channels/message/receipt.ts:17-27), so passing the chat id alongside an empty message id would have re-laundered the chat id into a fake platform message id; the empty-results form avoids that. Downstream is safe for the sentinel: the delivery-pin path explicitly guardsif (!params.messageId)(src/infra/outbound/deliver.ts:1075), and result aggregation uses truthiness (deliver.ts:2572,:2618). Scope is limited to the two send paths; no SDK or core changes.User Impact
Successful Synology Chat text and media sends now report an empty message id and a receipt with no platform message ids instead of a plausible-looking but fake
sc-<timestamp>id. Delivery itself is unchanged; only the reported send metadata becomes honest. Operators relying on delivery receipts will no longer see synthetic ids that cannot be resolved on the NAS.Evidence
nostr-${Date.now()}fabrication in the nostr adapter.node scripts/run-vitest.mjs extensions/synology-chat— with the fix,channel.test.tsis 40 passed / 41 total, and the full plugin suite shows 120 passed with 3 failures that reproduce identically on unmodifiedorigin/main(5143d909b9): two setup-wizard prompt failures incore.test.tsandsetup status honors the selected named accountinchannel.test.ts(locale-dependent wizard prompt expectations, unrelated to this change).channel.tsstashed, the three updated/new assertions fail (declares message adapter durable text and media with receipt proofs,sendText returns an honest empty-id result on success,sendMedia returns an honest empty-id result on success); with the fix restored, all three pass.sendText/sendMediasuccess tests now assertmessageId === "",receipt.primaryPlatformMessageId === undefined, emptyplatformMessageIds/parts, andreceipt.threadId === chatId; the message-adapter capability proof test asserts the same honest receipt shape for both text and media.node scripts/run-tsgo.mjs -p tsconfig.extensions.json— zero errors in touched code; only the 3 pre-existingpackages/net-policy/src/ip.tserrors that also occur on cleanorigin/main.git diff --checkclean;oxfmt --checkclean on both touched files.channel.tsnet −6 lines).