ReviewOS

pantry-pm/pantry

Close native helper resource dependencies before publishing relocated artifacts

#273
Closed chris opened this 4 hours ago ·
4 hours ago

Parent: #266. Related: #272 adds WebKitGTK helper resource declarations, but this ticket fixes the generic native packaging core and does not qualify WebKit rendering, production relocation or sandbox behavior.

At main 4bc358120, a real macOS public fixUp regression reproduces:

  1. A declared selected library provider has a native libexec/provider/helper resource plus its own message file.
  2. The helper links a second declared library that the application/provider library do not use. Before processing, the real helper prints 42:owned helper resource; the application independently prints 7.
  3. fixUp(stage, 'darwin-arm64', [], declaredPackages) reports success.
  4. After moving the finished artifact into a fresh prefix with spaces and removing all source/dependency roots, the actual helper aborts: Library not loaded: @rpath/libfixture-helper-only.1.dylib.

The maintained native-runtime bundler queues binaries before copying runtimeResources and does not enqueue those copied native helpers. Later loader normalization still mutates their bytes, while the resource receipt retains its pre-normalization SHA256.

Owning paths:

  • packages/ts-pantry/scripts/native-runtime.ts
  • public orchestration packages/ts-pantry/scripts/fix-up.ts
  • maintained native relocation tests under packages/ts-pantry/test/

Acceptance:

  • A copied native helper owned by a selected shared-library provider participates in recursive declared-library closure.
  • Missing helper-only providers fail public fixUp before publication; no host search/copy or validation exemption.
  • Actual relocated macOS helper returns literal42 and reads its own resource with all staging/source/dependency roots unavailable and loader overrides cleared.
  • Actual native Linux ELF counterpart runs through normal maintained CI; a Mac/foreign inspection is not Linux runtime qualification.
  • Resource receipt hashes match finalized artifact bytes after loader/signature normalization; existing ownership/conflict/signing/layout checks stay strict.
  • Library-less provider resource inclusion remains a separate API/receipt design, outside this slice. No WebKit recipe/profile/sandbox relaxation or provider qualification claim.

Initial local regression:0pass/1fail,11assertions, Apple clang21, Bun1.4.4. Original failure retained locally; no source fix or publication yet.

49 minutes ago

Implemented and verified all six generic source criteria.

  • Source fixes: b50b1ea3e942db36faed72a2cf13295a7682b884 and native identity evidence ecf736a87e7a584f08f34b8907b7ab15c111733c, retained in release source 2f29383de4744c64e98154414fb2d92f25ca9c7c (v0.11.160).
  • Real relocated Mac helpers in both libexec/provider and share/provider return 42:owned helper resource, while the application returns 7, with all staging/dependency roots removed. Missing helper-only dependencies refuse, read-only modes survive success/failure, and finalized resource hashes/idempotence pass.
  • Exact release source CI passed all 14 required jobs. Its original Linux helper observations record actual UID 1001, both helper locations, relocated execution and finalized hashes.
  • Canonical Releaser passed its source gate, all seven native builds/public ZIPs and npm publication. Original payloads and the normal isolated SDK consumer were verified. The independent standalone Zig workflow was cancelled with unknown cause; it is retained as non-green and supplies no additional native execution evidence.

The publisher modules are repository tools, distributed through the public source tag and consumed by the canonical checked-out build-package.ts pipeline. They are intentionally absent from the npm SDK; no new npm fixUp API is claimed. I independently read both fixed modules from the public v0.11.160 tag and matched them byte for byte to the released Git source.

Evidence: /tmp/pantry-273-source-delivery-readback/proof.json, SHA256 06275f37950f5cb884710ffe648c26793a8b524b77c8c7bbc77ca25cda0ec656; full publication proof /tmp/pantry-160-qualification/qualification-proof.json, SHA256 ada1e9e05e343f78d0bfcbb6696e72451084a6e1126e11a10e3b9ff7a5023e06; installed consumer proof SHA256 7d299a88ba7e1f369d51d0408f645264a4b20f1f5520f9f50b8e06d5bfaaf310.

Parent #266 remains open for the actual production publisher run/upload, WebKit relocation, supported features and sandbox qualification. Those broader claims are not made here.

Sign in to comment on this issue.