Repository navigation
fix(signing): sign each part of a split request from its own input (0.12.1 backport of #34247) - #34249
Conversation
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)
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of 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
[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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of 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 shipsInventory (6 items) — 6 justifiedIntent: 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.
[FIRST-PRINCIPLES-REVIEWED] 7e7bd75 Description read[DESCRIPTION-READ] 752413040afb11c66770dfff984dfcfa11b38bededd8321530e4f0accc7f1e3a That sha256 names the PR description this verdict read. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
buluoray
left a comment
There was a problem hiding this comment.
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.
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
What changed (motivation → approach → change)
git cherry-pick -xof 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, whichsplit-manifest.py stagebuilds 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 planrequires--part-input-prefix. Writer sweep on release/0.12.0 @ 156cb2e:packaging/signing/sign.shis the only caller and passes it;test/test_signing_split.pyis the only caller ofsplit_manifest().Reader: packaging/signing/sign.sh:sign_in_parts -- entry: release -- the whole-app
<AppSlug>.tar.gzis no longer written on the split path; its only reader was each part'sinputKey, 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
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.