test(discord): cover durable chunk retry delivery#82898
Conversation
|
Verification before merge:
Known proof gap: live Discord API delivery was not run; the test mocks the Discord send seam to deterministically cover later-chunk transient retry behavior. |
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. for the PR's focused mocked path: the diff drives sendDurableMessageBatch through the Discord plugin registry, fails the second planned chunk once with status 500, and asserts retry plus both message IDs. I did not run the test or reproduce the live Discord report. Real behavior proof Next step before merge Security Review detailsBest possible solution: Land the focused regression test after required CI and maintainer verification, while keeping the linked Discord message-loss issue open until the live runtime behavior is fixed or proven on current main. Do we have a high-confidence way to reproduce the issue? Yes for the PR's focused mocked path: the diff drives sendDurableMessageBatch through the Discord plugin registry, fails the second planned chunk once with status 500, and asserts retry plus both message IDs. I did not run the test or reproduce the live Discord report. Is this the best way to solve the issue? Yes for regression coverage: it exercises the existing durable-send, chunking, retry, and receipt contracts without adding product surface. It is not a complete runtime fix or live proof for the linked Discord message-loss report. Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 422a1374e02b. |
076fbb1 to
639b442
Compare
7131d42 to
415bfca
Compare
|
Verification for 415bfca: Behavior addressed: Discord durable chunk fan-out now has a regression test covering a later chunk transient 500 and retry delivery; PR also carries a narrow Telegram/test-lane CI blocker repair required after rebasing onto latest main.
|
* test(discord): cover durable chunk retry delivery * test(discord): use plugin sdk test runtime * fix(telegram): satisfy message cache strict checks * test(discord): include durable delivery in changed lane
* test(discord): cover durable chunk retry delivery * test(discord): use plugin sdk test runtime * fix(telegram): satisfy message cache strict checks * test(discord): include durable delivery in changed lane
* test(discord): cover durable chunk retry delivery * test(discord): use plugin sdk test runtime * fix(telegram): satisfy message cache strict checks * test(discord): include durable delivery in changed lane
* test(discord): cover durable chunk retry delivery * test(discord): use plugin sdk test runtime * fix(telegram): satisfy message cache strict checks * test(discord): include durable delivery in changed lane
* test(discord): cover durable chunk retry delivery * test(discord): use plugin sdk test runtime * fix(telegram): satisfy message cache strict checks * test(discord): include durable delivery in changed lane
* test(discord): cover durable chunk retry delivery * test(discord): use plugin sdk test runtime * fix(telegram): satisfy message cache strict checks * test(discord): include durable delivery in changed lane
* test(discord): cover durable chunk retry delivery * test(discord): use plugin sdk test runtime * fix(telegram): satisfy message cache strict checks * test(discord): include durable delivery in changed lane
* test(discord): cover durable chunk retry delivery * test(discord): use plugin sdk test runtime * fix(telegram): satisfy message cache strict checks * test(discord): include durable delivery in changed lane
* test(discord): cover durable chunk retry delivery * test(discord): use plugin sdk test runtime * fix(telegram): satisfy message cache strict checks * test(discord): include durable delivery in changed lane
* test(discord): cover durable chunk retry delivery * test(discord): use plugin sdk test runtime * fix(telegram): satisfy message cache strict checks * test(discord): include durable delivery in changed lane
* test(discord): cover durable chunk retry delivery * test(discord): use plugin sdk test runtime * fix(telegram): satisfy message cache strict checks * test(discord): include durable delivery in changed lane
* test(discord): cover durable chunk retry delivery * test(discord): use plugin sdk test runtime * fix(telegram): satisfy message cache strict checks * test(discord): include durable delivery in changed lane
"## Summary\n- Add a Discord durable delivery regression for multi-chunk final text.\n- Prove a transient 500 on the second planned chunk is retried and both Discord message ids are preserved in the durable receipt.\n\n## Verification\n- ./node_modules/.bin/oxfmt --check --threads=1 extensions/discord/src/durable-delivery.test.ts\n- node scripts/run-vitest.mjs extensions/discord/src/durable-delivery.test.ts\n- codex-review --parallel-tests "./node_modules/.bin/oxfmt --check --threads=1 extensions/discord/src/durable-delivery.test.ts && node scripts/run-vitest.mjs extensions/discord/src/durable-delivery.test.ts"\n\n## Real behavior proof\nBehavior addressed: Discord durable final delivery now has regression coverage for planned multi-chunk fan-out where a later chunk hits a transient Discord 500 and must retry instead of silently disappearing.\nReal environment tested: Local OpenClaw Discord plugin durable delivery path with the Discord send seam mocked at the network boundary.\nExact steps or command run after this patch: node scripts/run-vitest.mjs extensions/discord/src/durable-delivery.test.ts\nEvidence after fix: The test sends two newline-planned chunks through sendDurableMessageBatch, makes chunk two fail once with status 500, then observes three send attempts and a sent durable result.\nObserved result after fix: Durable receipt platformMessageIds contains msg-chunk-1 and msg-chunk-2; payloadOutcomes records one sent payload with both delivered results.\nWhat was not tested: Live Discord API delivery was not exercised in this PR; the network boundary is mocked to deterministically trigger the transient later-chunk failure.\n\nRefs #82858\n"