Skip to content

Stabilize amsg-instant SSE/Web Push parity e2e assertion in release workflow#25

Merged
Tosd0 merged 3 commits into
mainfrom
copilot/fix-release-job-failure
Jul 17, 2026
Merged

Stabilize amsg-instant SSE/Web Push parity e2e assertion in release workflow#25
Tosd0 merged 3 commits into
mainfrom
copilot/fix-release-job-failure

Conversation

Copilot AI commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

The release GitHub Actions job was failing due to a flaky e2e assertion in @rei-standard/amsg-instant, not a production runtime defect. The test assumed intercepted Web Push backup calls would always arrive in SSE payload order, which is not guaranteed under async execution.

  • Problem focus

    • packages/rei-standard-amsg/instant/test/e2e.test.mjs had an order-sensitive assertion in the SSE parity test (payloads vs decrypted backups).
  • Change made

    • Kept the parity check intact, but normalized backup ordering before comparison.
    • Sort decrypted backup payloads by messageIndex so the assertion compares semantic sequence rather than fetch timing.
  • Why this is the right scope

    • Test-only, surgical change.
    • Preserves existing contract checks (messageId parity between SSE and Web Push) while removing nondeterministic ordering assumptions.
const backups = [];
for (const call of router.pushCalls) {
  backups.push(JSON.parse(await decryptCapturedPushBody(call.body, subKit)));
}
backups.sort((a, b) => a.messageIndex - b.messageIndex);

assert.equal(backups[0].messageId, payloads[0].messageId);
assert.equal(backups[1].messageId, payloads[1].messageId);

Copilot AI changed the title [WIP] Fix failing GitHub Actions job release Stabilize amsg-instant SSE/Web Push parity e2e assertion in release workflow Jul 17, 2026
Copilot finished work on behalf of Tosd0 July 17, 2026 09:35
Copilot AI requested a review from Tosd0 July 17, 2026 09:35
The bare sort reads as redundant without the reason behind it. Record
that SSE backup pushes go out concurrently, so the order they hit the
intercepting fetch is unrelated to the SSE order.

Claude-Session: https://claude.ai/code/session_011YT96KgPecPVLQnwk2x4Fz
@Tosd0
Tosd0 marked this pull request as ready for review July 17, 2026 09:59
@Tosd0
Tosd0 merged commit 4926a2d into main Jul 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants