Does sow-module CI know the full artifact set at release time? #58
Notifications
Due Date
No due date set.
Blocks
#61 Bunny write credential for sow-module CI
ShadowsOverWestgate/sow-tools
Reference: ShadowsOverWestgate/sow-tools#58
Reference in New Issue
Block a user
Question
At the moment sow-module cuts a release, does its CI actually know the full set of artifacts a manifest must cover — every hak digest,
sow_top.hakandsow_tlk.tlk?Part of #54. sow-platform#94 claimed only the channel resolver knows the four-tuple, which was the stated reason for putting
assemblein the resolve step. That reason is now believed stale: #87 madepublish-module-release.shemitmodule_haks, andfetch-hak-manifest.shprependssow_topby name. But it has not been checked.Verify against the actual scripts and catalogs in
sow-module,sow-assets-manifestandsow-topdata:fetch-hak-manifest.shresolves, in what order, and whether the resultingmodule_hakslist carries digests or only names.assembleneeds digests, because the per-artifact NSYM lives atartifacts/haks/sha256/<a>/<b>/<sha256>.nsym.sow_tlk.tlka manifest entry in its own right.module_hakspriority order the shadowing rule depends on — earliest hak wins,sow_topprepended and therefore winning over assets.Resolved: yes for haks, a small closeable gap for topdata
sow-platform#94's claim that only the channel resolver knows the full artifact set is stale. Module CI already resolves the hak side end to end — tag, names, SHA-256, sizes and URLs — and throws the digests away only because nothing needed them until now. Nothing here requires bulk data.
The hak set: digests are one deleted
jqmap awayfetch-hak-manifest.shreadsreleases/haks/channels.json(:34), maps channel to hak tag (:36), fetchesreleases/haks/<tag>/haks.json(:42), and then discards everything but the names (:50):The digests are already in the file it downloaded.
sow-assets-manifest/scripts/pack-haks.sh:145-147emits{name, build_key, sha256, size_bytes, url, released_at}per hak, andpublish-release.sh:33-36enforces that shape at publish time — 64-hexsha256, integersize_bytes,https://url. The url isartifacts/haks/sha256/<a>/<b>/<sha>.hak(hak-artifact-record.sh:23-24). So the fix is to stop discarding fields: keepmodule_haksas-is forApplyHAKManifest, and emit the full records alongside it.The order is the real resolution order
Traced end to end:
hak-layout.yml:7-17hak_order->hak-manifest.yml:3-13order:->source-manifest.sh:35-36,96-99->pack-haks.sh:139preserving array order in the published catalog ->fetch-hak-manifest.sh:50prependingsow_top. Visible in the built result atsource/module/module.ifo.json:350-400, whereMod_HakListstartssow_top,sow_over_01,sow_core_01.Both ends are contract-tested —
tests/fetch-hak-manifest-contract.sh:35requiressow_topatmodule_haks[0], and:41-42requires the tail to equal catalog array order, explicitly guarding the "re-derive from hak_order" trap.fetch-hak-manifest.sh:12-14says the catalog is truth and warns against re-deriving.So
sow_topbeats assets, exactly as in the running game, and the shadowing rule the assembler needs is already the order module CI holds.The TLK: known by name only, digest publicly available but unfetched
Mod_CustomTlkis the literal"sow_tlk"insource/module/module.ifo.json:64-66, hand-held, never validated or updated by the build.fetch-hak-manifest.sh:48-49states the deliberate choice:sow_topis prepended fromhak_order, not resolved from a topdata channel, so module/topdata parity stays deploy-pinned.The digest exists and is anon-readable.
sow-topdata/scripts/publish-topdata-release.sh:58-66publishes a catalog of identical shape atreleases/topdata/<tag>/haks.json, with bothsow_top.hakandsow_tlk.tlkcarryingsha256andsize_bytes; the channel pointer isreleases/topdata/channels.json(promote-topdata.sh:19), and:35-37guarantees a channel only ever names a tag whose catalog is already published.One thing this changes for the emit spec: topdata artifacts live under
artifacts/topdata/sha256/..., notartifacts/haks/sha256/.... sow-tools#53 assumes thehaksprefix for the NSYM path. Raised as its own ticket.What module CI has to fetch that it does not today
Two small JSON files over the anon read it already performs —
releases/topdata/channels.jsonandreleases/topdata/<tag>/haks.json— plus a zero-fetch change to stop discarding hak catalog fields.Confirmed no bulk data anywhere: the corpus is 15.27 GB across 11 members and module CI never downloads a
.hak.pack-haks.sh:143builds its catalog "from records only (never inspect or download HAK files)" — digests already flow as metadata by design.CI runner, and a bonus for #61
.gitea/workflows/release.yml: triggers onv*tags (:8-10),runs-on: nix-docker(:14-16), and already hasBUNNY_CDN_BASEin env (:17-18) and the secretsBUNNY_STORAGE_ZONE,BUNNY_STORAGE_PASSWORD,BUNNY_API_KEY(:41-68). It publishes the.modcontent-addressed, thenSHA256SUMS, then the catalog last as the publication boundary (publish-module-release.sh:71-72), then moves the channel pointer.So sow-module CI already holds Bunny write credentials. #61 is largely pre-answered — it becomes a scoping question, not a plumbing one.
ci.yml:10runs everytests/*.shcontract on PR, so a manifest-assembly change lands under an existing gate.One decision this surfaced
A module release records
hak_releasebut has notopdata_releasefield (publish-module-release.sh:59). Assembling at release time means the release must know which topdata it shipped against — pin a tag, or read thecurrentchannel at build time. That is a real hole today independent of NWSync. Raised as its own ticket.