Fix Node 22 github-release test worker serialization failure #352

Closed
opened 2026-06-06 23:38:40 +00:00 by steve · 0 comments
Owner

Forgejo checks.yml fails in the repo script test suite at
scripts/github-release.test.mjs with Node 22 reporting:
Unable to deserialize cloned data due to invalid or unsupported version.
Local Node 24 runs pass, which points to a Node-version-sensitive incompatibility
in the GitHub release upload path or its test doubles.

Problem

The GitHub release helper and/or its tests appear to depend on behavior that is
safe in Node 24 but breaks under the Node 22 runtime used by the CI container.
The likely fault line is file-backed Blob handling during asset upload.

Goal

Make the GitHub release helper and its script tests pass reliably under the CI
Node 22 runtime without regressing the documented GitHub releases mirror flow.

Scope

  • scripts/github-release.mjs
  • scripts/github-release.test.mjs
  • Root script validation that exercises test:scripts
  • Spec updates only if the runtime contract or validation guidance changes

Non-goals

  • Changing the GitHub release mirror behavior or release tag naming
  • Reworking unrelated Forgejo workflow steps
  • Broad refactors across the release tooling stack unless required for the fix

Acceptance Criteria

  • scripts/github-release.test.mjs passes under Node 22 in isolation.
  • pnpm test:scripts passes in the local repo environment after the fix.
  • The fix avoids Node-version-sensitive upload objects that break test runner
    worker serialization while preserving GitHub asset upload behavior.
  • Relevant spec documentation is updated in the same change if behavior or
    validation expectations changed.

Implementation Notes

  • Reproduce with a Node 22 binary rather than only the local default Node 24.
  • Prefer a narrow compatibility fix in the upload path or test seam over
    workflow-specific suppression.
  • Keep the issue body updated if the diagnosis changes during implementation.

Suggested Files or Specs To Inspect

  • scripts/github-release.mjs
  • scripts/github-release.test.mjs
  • spec/src/80-maintenance/release-management.md
  • spec/src/80-maintenance/monorepo-scripts.md
  • .forgejo/workflows/checks.yml

Validation Commands

  • npx -y node@22 --test --test-concurrency=1 scripts/github-release.test.mjs
  • pnpm test:scripts
  • pnpm check:all

Follow-up Tasks

Implementation Summary

Replaced the Blob-based GitHub upload unit-test body with Uint8Array so Node 22 combined node --test runs no longer hit worker deserialization failures; revalidated scripts and repo tests.

Forgejo `checks.yml` fails in the repo script test suite at `scripts/github-release.test.mjs` with Node 22 reporting: `Unable to deserialize cloned data due to invalid or unsupported version.` Local Node 24 runs pass, which points to a Node-version-sensitive incompatibility in the GitHub release upload path or its test doubles. ## Problem The GitHub release helper and/or its tests appear to depend on behavior that is safe in Node 24 but breaks under the Node 22 runtime used by the CI container. The likely fault line is file-backed `Blob` handling during asset upload. ## Goal Make the GitHub release helper and its script tests pass reliably under the CI Node 22 runtime without regressing the documented GitHub releases mirror flow. ## Scope - `scripts/github-release.mjs` - `scripts/github-release.test.mjs` - Root script validation that exercises `test:scripts` - Spec updates only if the runtime contract or validation guidance changes ## Non-goals - Changing the GitHub release mirror behavior or release tag naming - Reworking unrelated Forgejo workflow steps - Broad refactors across the release tooling stack unless required for the fix ## Acceptance Criteria - `scripts/github-release.test.mjs` passes under Node 22 in isolation. - `pnpm test:scripts` passes in the local repo environment after the fix. - The fix avoids Node-version-sensitive upload objects that break test runner worker serialization while preserving GitHub asset upload behavior. - Relevant spec documentation is updated in the same change if behavior or validation expectations changed. ## Implementation Notes - Reproduce with a Node 22 binary rather than only the local default Node 24. - Prefer a narrow compatibility fix in the upload path or test seam over workflow-specific suppression. - Keep the issue body updated if the diagnosis changes during implementation. ## Suggested Files or Specs To Inspect - `scripts/github-release.mjs` - `scripts/github-release.test.mjs` - `spec/src/80-maintenance/release-management.md` - `spec/src/80-maintenance/monorepo-scripts.md` - `.forgejo/workflows/checks.yml` ## Validation Commands - `npx -y node@22 --test --test-concurrency=1 scripts/github-release.test.mjs` - `pnpm test:scripts` - `pnpm check:all` ## Related Issues - Follow-up to #290 — [Mirror release assets to GitHub releases repo](../closed/290-mirror-release-assets-to-github-releases-repo.md) ## Follow-up Tasks ## Implementation Summary Replaced the Blob-based GitHub upload unit-test body with Uint8Array so Node 22 combined node --test runs no longer hit worker deserialization failures; revalidated scripts and repo tests. <!-- backlog:task_id=TASK-RELEASE-003 source_spec=spec/src/80-maintenance/release-management.md related_issue=290 -->
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lapis-notes/lapis#352
No description provided.