ReviewOS

pantry-pm/pantry

Resolve unversioned native producer versions from actual canonical catalog files

#267
Closed chris opened this 9 hours ago ·
9 hours ago

The maintained Build Registry Package producer cannot choose an unversioned Craft build from its real generated catalog. This is separate from #265: Publish Changed Packages uses the working discovery route, so the immutable 0.0.423.1 repair does not require this helper to be changed.

Reproduced on source 9028f58, inherited unchanged by v0.11.158:

bun -e 'import {resolveBuildVersion} from "./packages/ts-pantry/scripts/resolve-build-version.ts"; console.log(await resolveBuildVersion("craft-native.org"))'

Actual: cannot find src/packages/craft-nativeorg.ts. The maintained generated file is src/packages/craft-native.org.ts, with canonical domain: craft-native.org and latest version 0.0.423.1. The helper derives a filename by stripping every dot for non-nested domains. Existing nested DynamoDB tests pass because that branch preserves the domain path. Other generated catalogs also retain legacy flattened filenames such as postgresqlorg.ts, so changing every lookup to a literal domain path is insufficient.

Owning source: packages/ts-pantry/scripts/resolve-build-version.ts, consumed by the version-selection step in .github/workflows/build-registry.yml. Its current test packages/ts-pantry/test/resolve-build-version.test.ts covers real nested DynamoDB plus explicit-version bypasses, but misses a real non-nested catalog whose file retains punctuation. Existing discovery already resolves actual package definitions by their declared domain; filename conversion/resolution should have one shared, collision-safe contract rather than divergent producer guesses.

Acceptance:

  • Public resolveBuildVersion("craft-native.org") returns the latest value from the real catalog, without file copies or a Craft-only override.
  • Real legacy flattened and nested domains still resolve correctly, explicit exact versions retain their current behavior, and returned metadata must declare the requested canonical domain.
  • Add meaningful public-helper regressions for all three actual catalog layouts and preserve traversal/output-injection rejections.
  • Keep generated catalog identities and accepted registry artifacts immutable.

Related delivery investigation: #227 and #266. Observed during #265 read-only publication preview; no producer dispatch or installation was used to reproduce it. Original failure log retained locally under /tmp/settlers-native-423-normal-install/registry-readonly/release-selection-preview/unversioned-helper-failure.log.

5 hours ago

Implemented on main in 54c533c3, preserved through both concurrent upstream merges and exact release source eafe53d8. All authored commits/merges are Chris with no coauthor trailers; upstream history was preserved verbatim.

The public helper now selects through the generated catalog's declared canonical domain, covering actual literal, legacy flattened and nested layouts. Explicit versions and traversal/output-injection rejection are retained. Current real invocation on exact source159 returns 0.0.424 for craft-native.org, matching the current catalog, with no file copy or special-case override. Focused maintained tests:5pass/27assertions; owning TS/type/Pickier checks passed and both independent reviews passed.

Exact-source Main CI41447621606 is successful. Independently verified original source-gate artifact13144107863:4524bytes, SHA256 975ab9fd3e293d9ae7c9ad62d2c28eef41c5aec74f5b4b19407228c1a8995726; API/head/size/digest, unique safe ZIP member and CRCs match, and all14 required jobs succeed on exacteafe source. Final integrated source proof /tmp/pantry-267-269-268-main-push-receipt.json, SHA256 0d63a7e1adca1f9ebaf63c084da57b66509f3fa35e6a9c2ea17c44f30f5538b2; final real-helper log /tmp/pantry-267-final-main-public-helper.log retains the424result.

Closing this CI producer-helper leaf. The159 native/npm release is still building and is not claimed qualified here; runtime activation/signing/Linux-provider/publication/adoption criteria remain separately open in #265, #266, #268, #269 and Stacks3103. This helper change requires no separate CLI release, producer dispatch or accepted-artifact replacement.

Sign in to comment on this issue.