Skip to content

fix(signing): sign each part of a split request from its own input (0.12.1 backport of #34247) - #34249

Merged
bolichen97 merged 1 commit into
release/0.12.0from
hotfix/0.12.1-sign-slim-parts
Nov 10, 2026
Merged

bolichen97 merged 1 commit into
release/0.12.0from
hotfix/0.12.1-sign-slim-parts

Conversation

@bolichen97

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Let the 0.12.1 release build sign the universal macOS app with every part of its split signing request well inside the signing service's 900 s task limit, by backporting main's #34247 to release/0.12.0.

On the v0.12.1-rc.3 Release run (42702512443) part 1 of the universal app's split signing request finished at 900 s, the signing service's task limit, and the final request took 840 s. Every part read the whole universal app (924 MB compressed, 97,094 entries), and a task's time follows the tree it is given, not its list.

Why it matters

With no headroom left on part 1, a slightly bigger backend or a slower service run fails the universal macOS signing, and the 0.12.1 Release run cannot finish.

Not a goal

  • Making the final request faster: it still reads the whole merged app.
  • Any change to what the signed release contains, to notarization, or to the single-arch legs.

What changed (motivation → approach → change)

git cherry-pick -x of main's #34247 (branch commit b441cd0), clean. Each part of a split request now reads its own upload, pre-signed/<channel>/<version>/<AppSlug>.part-<N>.tar.gz, which split-manifest.py stage builds from the app with every backend file that part does not list taken out. Everything the service's app pass works on (frameworks, main executable, app.asar, entitlements) stays. The merge step and the final request over the whole merged app are unchanged, so the signed release is the same. On the rc.3 app the part inputs are 309 MB and 410 MB compressed with under 900 entries each, against 924 MB and 97,094 entries before. The split path no longer uploads the whole unsigned app, because no request reads it.

Backwards compatibility

Breaking: split-manifest.py plan requires --part-input-prefix. Writer sweep on release/0.12.0 @ 156cb2e: packaging/signing/sign.sh is the only caller and passes it; test/test_signing_split.py is the only caller of split_manifest().

Reader: packaging/signing/sign.sh:sign_in_parts -- entry: release -- the whole-app <AppSlug>.tar.gz is no longer written on the split path; its only reader was each part's inputKey, which now names <AppSlug>.part-<N>.tar.gz (test_an_over_limit_manifest_is_signed_in_parts_then_as_an_app)
Reader: packaging/signing/sign.sh:upload_input -- entry: release -- the one-request path still uploads and reads <AppSlug>.tar.gz (test_a_manifest_under_the_limit_is_still_one_request_byte_for_byte)

Tests

The tests come with the cherry-pick (test/test_signing_split.py); on this branch they and the neighbouring signing tests pass (43), and black, flake8, isort, comment-history, brand and semgrep pass on the diff.

Proof: PROVEN test/test_signing_split.py::test_an_over_limit_manifest_is_signed_in_parts_then_as_an_app[340], test/test_signing_split.py::test_an_over_limit_manifest_is_signed_in_parts_then_as_an_app[700] (head 7e7bd75)

Manual verification

The part inputs were built from the real v0.12.1-rc.3 universal app on a DevSpace (sizes above; detail in #34247). The signing service itself is exercised by the next RC tag's Release run, which prints each part's Signing completed! (<n>s).

Related Issues

Part of #34232. Part of the 0.12.1 hot patch (#33974, #34032, #34021, #34033, #34035, #34129).

Sibling sweep

Siblings: none -- the sweep is in #34247; this is the same commit on the release line.

Pattern harvest

Not generalizable: the defect is the cost model of this one signing service, whose task time follows the uploaded tree rather than the request's list.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

A universal macOS manifest over the signing service's body limit is
signed in parts, and every part read the same upload: the whole
universal app, 924 MB compressed and 97,094 entries. A task's time
follows the tree it unpacks, signs and seals, not the length of its
list, so part 1 took 900 s, the service's task limit, while the final
request, which lists only the shell, took 840 s.

Each part now reads its own upload, built by `split-manifest.py stage`
from the app with every backend file that part does not list taken
out: what the app pass works on (everything outside the backend tree)
stays, hard-linked, and of the backend only the part's own binaries.
A part gives back only those binaries and the final request still
seals the whole merged app, so the signed release is unchanged. On the
rc.3 app the two part inputs are 309 MB and 410 MB with under 900
entries each. The whole unsigned app is no longer uploaded on the
split path, since no request reads it.

Closes #34232

(cherry picked from commit b441cd0)
@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 10, 2026 00:50
@bolichen97
bolichen97 requested review from iamwhatever and removed request for a team November 10, 2026 00:50
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision 7e7bd75ef166c4afb574d37a0909a247225ddcbb touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 7e7bd75ef166c4afb574d37a0909a247225ddcbb — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: this is a clean backport. Each part now gets its own smaller signing input, and the final request still reads the whole merged app, so the signed release is unchanged.

Notes

  • The real signing service only runs this path on the next RC tag's Release run. Treat that run's per-part Signing completed! (<n>s) lines as the go/no-go before the 0.12.1 tag.

[DESIGN-REVIEWED] 7e7bd75

Description read

[DESCRIPTION-READ] fb3bc1329ccca1ceda5b307a0b37624360eb970d933a7f5124336926ed101107

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 7e7bd75ef166c4afb574d37a0909a247225ddcbb — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. This backports #34247 as-is, and the cause comes from a measured run: part 1 ran into the 900 s task limit on run 42702512443. Each part's task time follows the tree it receives, so the fix shrinks that tree.

What this change ships

Inventory (6 items) — 6 justified

Intent: let the 0.12.1 release sign the universal macOS app with each split part well under the signing service's 900 s task limit — FIX.

  1. Each part of a split signing request reads its own smaller upload (<AppSlug>.part-<N>.tar.gz) instead of the whole app — justified
  2. The split path no longer uploads the whole unsigned app (the one-request path still does) — justified
  3. New split-manifest.py stage subcommand builds a part's input tree with hard links, falling back to a copy — justified
  4. split-manifest.py plan now requires --part-input-prefix (one caller, sign.sh) — justified
  5. pack_tar plus an inline aws s3 cp replaced by one upload_input <dir> <key>, used by the single, part and merged uploads — justified
  6. The signing runbook and README now describe per-part inputs and a shorter job — justified

[FIRST-PRINCIPLES-REVIEWED] 7e7bd75

Description read

[DESCRIPTION-READ] 752413040afb11c66770dfff984dfcfa11b38bededd8321530e4f0accc7f1e3a

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 7e7bd75ef166c4afb574d37a0909a247225ddcbb and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 7e7bd75

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 7e7bd75ef166c4afb574d37a0909a247225ddcbb false-positive: <reason, 20 to 500 characters>

@github-actions

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 7e7bd75ef166c4afb574d37a0909a247225ddcbb — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 7e7bd75

Verdict parsed from the review's SHA-scoped output markers for commit 7e7bd75ef166c4afb574d37a0909a247225ddcbb.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 7e7bd75ef166c4afb574d37a0909a247225ddcbb false-positive: <reason, 20 to 500 characters>

@buluoray buluoray left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve on 7e7bd75. Clean pick of b441cd0 (#34247, now merged to main): patch-id identical, 358 signing tests pass, and a mutation reddens 3 named tests. Each split-signing part uploads only its own backend files plus the non-backend app (~310/410 MB instead of 924 MB); the final request and the one-request path are unchanged.

@bolichen97
bolichen97 merged commit 6e00846 into release/0.12.0 Nov 10, 2026
22 of 24 checks passed
@bolichen97
bolichen97 deleted the hotfix/0.12.1-sign-slim-parts branch November 10, 2026 02:45
@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Nov 10, 2026
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