Skip to content

[Fix] Failed worker packaging removes the previous release checksum - #3629

Open
roomote-roomote[bot] wants to merge 3 commits into
developfrom
fix/worker-package-failure-0gumj5qbdydw6
Open

roomote-roomote[bot] wants to merge 3 commits into
developfrom
fix/worker-package-failure-0gumj5qbdydw6

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

​Opened on behalf of @daniel-lxs. Follow up by mentioning @roomote-roomote, in the web UI, or in Telegram.

Related issue

Internal maintainer-requested reliability work; no issue was opened.

Why this PR exists

  • A maintainer explicitly invited this PR in the linked issue or discussion
  • I am a maintainer / this is internal Roomote work

A failed worker release package should leave the last complete release usable. Previously, packaging removed its checksum before copying or archiving the replacement, and a failed tar left both the staging tree and partial archive behind.

What changed

  • Give each packaging attempt its own temporary staging directory and clean unpublished files on exit.
  • Generate the replacement archive and checksum before replacing the previous files.
  • Preserve the archive layout, packaged skills, sourcemap stripping, release names and publishing arguments.

This keeps a previous release usable after copy, tar or checksum-generation failure, and avoids deleting an unrelated same-named directory in the checkout. Archive and checksum publication remain two filesystem renames; this does not claim transactional multi-file publication, concurrent compiler isolation or SIGKILL cleanup.

How it was tested

  • Baseline c97173a7: ran the actual packaging script with native tar/gzip under a controlled file-size limit. It failed with exit 2, preserved the previous archive, deleted its checksum, and retained a partial archive/staging tree.
  • Head f44fe16f: repeated the same stimulus and a native TERM interruption; both previous files survived and unpublished files were cleaned. Compilation is substituted by prebuilt synthetic assets only in these failure fixtures.
  • Regression tests cover native tar failure, failure of both checksum implementations, preservation of unrelated same-named directories, successful checksum/embedded skill contents, and extracted COMMIT, NODE_PTY_VERSION, PM2_VERSION and VERSION metadata.
  • At the same head, ran the real worker build and release packaging with no compilation stub; the generated 4.4 MB archive passed sha256sum -c.
  • All 100 dev-package tests, 317 compute-provider tests, 83 release-script tests, six Judgement isolation tests, pnpm lint, pnpm check-types, pnpm check-types:fast and pnpm knip passed. Browser proof is not applicable to this shell packaging path. Hosted publication and macOS execution were not exercised.
  • Two initial hosted failures identified old staging-path expectations in the Modal and release-workflow source contracts. Both anchored expectations were updated, with actual archive metadata assertions added. Final-head hosted Test succeeded through full Vitest, Judgement isolation and release-script tests; current-head review is clean. A local full-repository test attempt hit its ten-minute command limit; all directly affected suites passed locally and the final hosted suite completed successfully.

Related PRs

Checklist

  • The PR title follows the repo convention: [Fix], [Feat], [Improve], [Refactor], [Docs], or [Chore] followed by a user-facing description
  • This PR is small and scoped to one change
  • pnpm lint and pnpm check-types pass locally
  • I added tests or included a clear manual validation note above
  • I removed secrets, tokens, private keys, and customer data from code, logs, and screenshots
  • If this change should appear in the changelog, I ran pnpm changeset

No changeset: development/release tooling failure cleanup only.

@roomote-community

roomote-community Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

No new code issues found. Reviewed the deterministic GITHUB_SHA fixture, extracted COMMIT assertion, and updated release-workflow expectation against the packaging script. Current-head CI lint, type checking, and Knip passed; tests and the app Docker build were still running when inspected. See session

Reviewed f44fe16

@roomote-roomote
roomote-roomote Bot marked this pull request as ready for review October 30, 2026 05:15
@roomote-roomote
roomote-roomote Bot marked this pull request as draft October 30, 2026 05:21

This branch has not been deployed

No deployments
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.

1 participant