Skip to content

ci(release): ship the GraphQL adapter as a release tarball - #421

Draft
Soushi888 wants to merge 9 commits into
sproutfrom
ci/adapter-release-asset
Draft

Soushi888 wants to merge 9 commits into
sproutfrom
ci/adapter-release-asset

Conversation

@Soushi888

@Soushi888 Soushi888 commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

SoushAI analysis. Drafted by Soushi's AI assistant, reviewed and posted by @Soushi888.

Intent

happ-0.5.0-beta.1 needs adapter 0.700.0-rc.0, and npm still serves 0.600.0-rc.0, the 0.6 line. Today an integrator reading our release page finds a DNA and no supported way to install the adapter that talks to it. This makes the adapter a release artifact, so every release ships the pair it was tested with, whether or not npm has caught up.

It complements #418 rather than replacing it: npm stays the preferred channel once a token exists, and the release tarball is what integrators use until then and what they can pin by checksum afterwards.

Changes

  • One packing path. scripts/pack-adapter.sh type-checks the adapter, builds it, runs scripts/verify-purpose-schema.mjs against the build, then packs valueflows-vf-graphql-holochain-<version>.tgz with a .sha256 beside it. The type check comes first because the package's own build script is tsc ...; node ./finish-build, which exits 0 on a type error. It runs the tsc the build itself resolves (the member's, then the root's node_modules/.bin), not whatever npx finds.
  • Every happ-* release carries it. release.yml runs the script after the WASM build and uploads both files with hrea.dna and hrea.happ.
  • Past releases can get it too. A new workflow_dispatch workflow, Attach adapter to a release, checks out an existing tag, installs it with yarn at the tag's root (the same lockfile the release path uses), packs it with the current script (HREA_ROOT points the script at the tagged tree) and attaches the tarball, without the hour-long WASM build. It refuses to replace a tarball the release already carries, failing with the asset's name, unless the replace input is set: a rebuild has different gzip bytes, so a silent replace would break every consumer's pin.
  • Docs. consuming-a-release.md lists the new artifacts and gains Installing the GraphQL adapter: npm when published, the release tarball with a checksum check and a file: dependency otherwise, or a build from source. It says plainly that the beta.1 tarball exists only once the dispatch workflow has run, and what a rebuild reproduces. graphql-api.md stops claiming 0.700.0-rc.0 was published alongside the release, and names the packed entry points correctly (index.js, not build/index.js).

Decisions

Option Rejected because
Wait for #418 and an npm token Integrators are blocked now; two downstream apps are about to vendor the adapter, and they should vendor an artifact this repo published rather than a private build
Ride the adapter on its own tag, like #418 A release asset belongs with the DNA it pairs with; the happ-* tag is that pairing
Re-run release.yml on the old tag to backfill It rebuilds every WASM artifact and re-uploads the DNA with --clobber, which could change a published DNA's bytes
npm install inside the adapter's workspace member for the backfill npm 11 resolves the whole yarn workspace and fails on clients/acceptance's link: dependency (EUNSUPPORTEDPROTOCOL)

What a checksum covers. Two packs of the same tag with the same lockfile and tsc 5.9.3 gave identical contents (gzip -dc <tgz> | sha256sum = fac8a221f0a4...0f00d for both) and different tarball checksums (e6416391...3d2fe and 59914ae9...aa600), because the gzip layer depends on the npm/node build. So a consumer pins the release's own tarball, and a rebuild is checked against the tar stream. The docs say this.

Open for a maintainer's call, not changed here: release.yml still uploads every asset with --clobber, as it already did for the DNA, so re-running the release job on a published tag would replace the tarball too; release.yml packs the adapter before the DNA upload, so an adapter failure now blocks hrea.dna and hrea.happ too; nothing ties the adapter's package.json version to the tag, so the next happ-* tag ships 0.700.0-rc.0 again unless the version is bumped first.

How to test

  • On a checkout of tag happ-0.5.0-beta.1: nix develop --command bash -c 'yarn install --no-frozen-lockfile --ignore-scripts' at the root, then from this branch HREA_ROOT=<that checkout> scripts/pack-adapter.sh /tmp/out. Measured: type check passes, ALL SCHEMA CHECKS PASSED, cd /tmp/out && sha256sum -c *.sha256 OK.
  • The same run with a type error added to index.ts exits 2 and writes no tarball.
  • The tarball installed into an empty project with bun add <file>.tgz: createHolochainSchema imports and type-checks under --strict.
  • shellcheck scripts/pack-adapter.sh is clean; actionlint on both workflows flags only the existing actions/checkout@v3 lines in release.yml.
  • Neither workflow has run on GitHub yet: release.yml runs on the next happ-* tag, and the dispatch workflow runs only from the default branch, so after merge.

Follow-up after merge

A maintainer dispatches Attach adapter to a release (Actions tab, ref sprout) with tag happ-0.5.0-beta.1. Until then the beta.1 release has only hrea.dna and hrea.happ, and the tarball URL in the docs returns 404 (checked 2026-10-09).

Pre-open review

Independent pre-open review on the branch, first at 8a1f5831: four blocking findings (dispatch install broken under npm, a from-source recipe calling a script the beta.1 tag lacks, a false reproducibility claim, docs promising an asset not yet uploaded). Fixed in 894975da, 0e9c6e41, ee63a3b1, re-reviewed at ee63a3b1: READY TO OPEN. e7ab455c adds the docs index line. Maintainer review then asked that a published tarball never be replaced silently: 2cba5058 adds the replace input and the refusal step, 842affba documents it, and a second independent review at 842affba read READY, with the check and upload steps run verbatim against happ-0.5.0-beta.1 with uploads stubbed (no clash, clash, replace, partial clash, near-miss name, missing tag). Measured head: 842affba.

Related

Related #412: an interim channel for the adapter; #412 closes when npm serves 0.700.

npm install inside modules/vf-graphql-holochain resolves the whole
workspace and fails on the link: dependency in clients/acceptance.
Install the way release.yml does, so both release paths resolve from
the tag's yarn.lock.
npx --no-install looked only in the workspace root's .bin and fell back
to a cached tsc@2.0.4 stub when the root had none. Put the member's and
the root's .bin on PATH, in the order npm run uses. Anchor the dist/
ignore to the repository root.
…ld reproduces

Say that happ-0.5.0-beta.1 carries the adapter only after the attach
workflow has run, and how to check. Give the HREA_ROOT recipe for tags
that predate scripts/pack-adapter.sh. Replace the reproducibility claim:
the release sha256 covers the gzip stream, which varies with npm and
node; compare the decompressed tar stream instead.
Soushi888 added a commit to happenings-community/requests-and-offers that referenced this pull request Oct 9, 2026
npm install inside a full hREA checkout fails with EUNSUPPORTEDPROTOCOL on
the yarn workspace link: dependency, so the recipe now extracts the module
with git archive first. The gzip layer varies with the packing toolchain, so
the reproducible check is the sha256 of the uncompressed tar stream. Points
at hREA's scripts/pack-adapter.sh (h-REA/hREA#421) as the future path.
Soushi888 added a commit to Sensorica/nondominium that referenced this pull request Oct 9, 2026
… stream

Building inside a full hREA checkout fails under npm 11 (EUNSUPPORTEDPROTOCOL on
the workspace link: dependency), so the recipe now extracts the module with git
archive. A rebuild reproduces the tar stream, not the gzip layer, so the README
records the tar stream sha256 and points at h-REA/hREA#421 for the pack script.
AlchemicalSpiralizer pushed a commit to happenings-community/requests-and-offers that referenced this pull request Oct 18, 2026
* chore(deps): vendor the hREA GraphQL adapter 0.700.0-rc.0 and drop the 0.600 patch

* docs(tech-specs): name the vendored adapter version

* docs(claude): say the hREA adapter is vendored, not an npm dependency

* ci(frontend): verify the vendored adapter tarball sha256 before install

* ci(manual): verify the vendored adapter tarball before the heavy-test installs

Also bring the documented unit count to 646.

* docs(ci): state why the vendored tarball has a sha256 gate

bun does check a file: tarball against its bun.lock sha512, but only on a
cold cache; a warm cache installs the cached bytes and exits 0. The gate
stays, for its real reasons: one answer whatever the cache holds, and an
explicit failure naming the file before install.

* docs(vendor): fix the adapter rebuild recipe and compare the tar stream

npm install inside a full hREA checkout fails with EUNSUPPORTEDPROTOCOL on
the yarn workspace link: dependency, so the recipe now extracts the module
with git archive first. The gzip layer varies with the packing toolchain, so
the reproducible check is the sha256 of the uncompressed tar stream. Points
at hREA's scripts/pack-adapter.sh (h-REA/hREA#421) as the future path.
Soushi888 added a commit to Sensorica/nondominium that referenced this pull request Oct 27, 2026
… stream

Building inside a full hREA checkout fails under npm 11 (EUNSUPPORTEDPROTOCOL on
the workspace link: dependency), so the recipe now extracts the module with git
archive. A rebuild reproduces the tar stream, not the gzip layer, so the README
records the tar stream sha256 and points at h-REA/hREA#421 for the pack script.
Soushi888 added a commit to Sensorica/nondominium that referenced this pull request Oct 27, 2026
…#155)

* chore(deps): vendor the hREA GraphQL adapter 0.700.0-rc.0

Commit the @valueflows/vf-graphql-holochain 0.700.0-rc.0 tarball built from h-REA/hREA tag happ-0.5.0-beta.1 (79c8d4fb) under vendor/, beside the hrea submodule, with its sha256 and a README recording source commit, rebuild steps and how to drop it once npm serves 0.700. The UI installs it through a file: dependency; bun.lock regenerated by bun install.

The adapter brings its own @holochain/client ^0.21, installed nested; the UI keeps ^0.20 until the Holochain 0.7 layer.

Closes #153

* docs(ui): list the vendored hREA adapter in the UI stack

* docs(vendor): fix the hREA adapter rebuild recipe and compare the tar stream

Building inside a full hREA checkout fails under npm 11 (EUNSUPPORTEDPROTOCOL on
the workspace link: dependency), so the recipe now extracts the module with git
archive. A rebuild reproduces the tar stream, not the gzip layer, so the README
records the tar stream sha256 and points at h-REA/hREA#421 for the pack script.

* docs(hrea): bound the GraphQL adapter to read-only UI queries

The integration strategy said hREA integration bypasses GraphQL entirely,
while this branch vendors the GraphQL adapter into the UI. State the bound:
the adapter serves read-only queries, and every write stays zome-level so
governance evaluation and PPR issuance cannot be skipped.
Soushi888 added a commit to Sensorica/nondominium that referenced this pull request Nov 4, 2026
* chore(deps): port zomes to hdk 0.7 / hdi 0.8 flat-op model

Pin holonix to main-0.7 and the workspace to hdk =0.7.0 / hdi =0.8.0 /
holochain =0.7.0.

The 0.7 action model replaces the per-variant action structs with
ActionHeader + ActionData, so the integrity zomes move to TypedAction:

- FlatOp variants renamed: StoreEntry -> CreateEntry, StoreRecord ->
  CreateRecord.
- EntryCreationAction is gone; narrowing a fetched Action now goes through
  TypedAction<EntryCreationData>::try_from.
- OpRecord::DeleteEntry no longer carries original_action_hash; read
  action.deletes_address. Same for UpdateEntry ->
  action.original_action_address.
- action.author is now the accessor action.author(); Create/Update
  parameter types become TypedAction<CreateData> / TypedAction<UpdateData>.
- Coordinator post_commit handlers match on action.hashed.content.data
  (ActionData) instead of the removed Action::* variants.

Validation logic is unchanged: every check reads the same value from its
new location.

* chore(deps): bump JS client to 0.21, port launcher to QUIC, sync docs

- @holochain/client ^0.21.0 (root, ui, tests); @holochain/hc-spin ^0.700.0.
- scripts/launch-happ.mjs: 0.7 removed the WebRTC/tx5 transport, so
  `hc sandbox create network` now takes `quic` instead of `webrtc <signalUrl>`.
- Version references across CLAUDE.md, README.md and documentation/ updated to
  HDK 0.7 / HDI 0.8 / holochain 0.7 / client 0.21.
- Tryorama has no 0.7-compatible release; tests/DEPRECATED.md and the testing
  stack table now say the legacy suite cannot run against a 0.7 conductor.

* fix(ui): adapt e2e harness and shared-types peer dep to client 0.21

@holochain/client 0.21 narrows AppWebsocket.client to the AppClientTransport
interface (request/on only), so the e2e harness feature-detects close()
instead of calling it on the concrete WsClient. shared-types peerDependency
moves to ^0.21.0.

svelte-check: 0 errors, 0 warnings.

* test(sweettest): port suites to the holochain 0.7 test_utils API

- await_consistency_20_s is gone. 0.7 has await_consistency(cells) with a
  hard 60s timeout and await_consistency_s(timeout, cells) as the
  configurable form; existing 20s and 10s waits are preserved via the latter
  rather than silently widened to 60s.
- SweetConductorBatch no longer derefs mutably or exposes iter_mut, but does
  implement IndexMut, so the NDO cell setup indexes the batch directly.

All three suites (nondominium, group, lobby) compile against
holochain =0.7.0 with test_utils.

* chore(deps): point hREA submodule at the 0.7 port

The vendored hREA DNA ships as a role in this hApp and runs in the same 0.7
conductor, so a 0.6-built wasm will not load. Upstream h-REA has no main-0.7
branch, so the Sensorica fork carries the port on chore/holochain-0.7.

Note the flake's shellHook runs `git submodule update --init vendor/hrea` on
every `nix develop`; without this pointer commit that reset the submodule back
to the 0.6 commit.

* docs(contributing): document the vendor/hrea submodule reset trap

The flake shellHook runs `git submodule update --init vendor/hrea` on every
`nix develop`, which silently discards an uncommitted branch checkout inside
the submodule. Hit during the 0.7 port.

* chore(deps): vendor the hREA GraphQL adapter 0.700.0-rc.0

Commit the @valueflows/vf-graphql-holochain 0.700.0-rc.0 tarball built from h-REA/hREA tag happ-0.5.0-beta.1 (79c8d4fb) under vendor/, beside the hrea submodule, with its sha256 and a README recording source commit, rebuild steps and how to drop it once npm serves 0.700. The UI installs it through a file: dependency; bun.lock regenerated by bun install.

The adapter brings its own @holochain/client ^0.21, installed nested; the UI keeps ^0.20 until the Holochain 0.7 layer.

Closes #153

* docs(ui): list the vendored hREA adapter in the UI stack

* docs(vendor): fix the hREA adapter rebuild recipe and compare the tar stream

Building inside a full hREA checkout fails under npm 11 (EUNSUPPORTEDPROTOCOL on
the workspace link: dependency), so the recipe now extracts the module with git
archive. A rebuild reproduces the tar stream, not the gzip layer, so the README
records the tar stream sha256 and points at h-REA/hREA#421 for the pack script.

* docs(hrea): bound the GraphQL adapter to read-only UI queries

The integration strategy said hREA integration bypasses GraphQL entirely,
while this branch vendors the GraphQL adapter into the UI. State the bound:
the adapter serves read-only queries, and every write stays zome-level so
governance evaluation and PPR issuance cannot be skipped.

* chore(deps): move the hREA submodule to h-REA/hREA happ-0.5.0-beta.1

Point vendor/hrea at the upstream repository over https and pin it to
79c8d4fb, the commit tagged happ-0.5.0-beta.1. The branch line is
dropped: the pin is a release tag, not a branch to follow.

Refs #154

* docs(hrea): name h-REA/hREA happ-0.5.0-beta.1 as the submodule source

The README, the vendor README, the implementation status and the
integration strategy still named the Sensorica fork on main-0.6. They
now name the upstream release tag and its commit, and the integration
strategy records that the pin needs the Holochain 0.7 toolchain.

Refs #154

* fix(zomes): port dev's action reads to the Holochain 0.7 ActionData model

* test(sweettest): use await_consistency_s with an explicit timeout on 0.7

* fix(ui): read group record author and timestamp under content.header

* docs: note that every Holochain 0.7 network is a new network

* fix(e2e): pass the bootstrap server as the QUIC relay URL to hc sandbox create

* test(sweettest): use await_consistency_s with an explicit timeout in the resource scope tests

* chore(deps): move the hREA submodule to h-REA/hREA happ-0.5.0-beta.1

Point vendor/hrea at the upstream repository over https and pin it to
79c8d4fb, the commit tagged happ-0.5.0-beta.1. The branch line is
dropped: the pin is a release tag, not a branch to follow.

Refs #154

* docs(hrea): name h-REA/hREA happ-0.5.0-beta.1 as the submodule source

The README, the vendor README, the implementation status and the
integration strategy still named the Sensorica fork on main-0.6. They
now name the upstream release tag and its commit, and the integration
strategy records that the pin needs the Holochain 0.7 toolchain.

Refs #154

* fix(person): build capability grants with the Holochain 0.7.1 CapGrant API

hdk 0.7.1 replaced ZomeCallCapGrant and the CapAccess grant variants with
CapGrant::new_zome_call_grant and GrantConstraint. Both grant sites keep
the same tag, secret, assignees and function list, so what a grant
allows is unchanged.

* chore(deps): move to Holochain 0.7.1

Workspace pins hdk =0.7.1, hdi =0.8.1 and holochain =0.7.1. Holonix
main-0.7 is updated to the 0.7.1 revision, and the JS side moves to
@holochain/client ^0.21.1 and @holochain/hc-spin ^0.700.1. Docs that
named the exact pins follow.

Refs #130

* chore(deps): pin hREA to happ-0.5.0-beta.1 plus the hdk 0.7.1 bump

vendor/hrea now points at Sensorica/hREA c4c44adb: the release commit
79c8d4fb with only the hdk =0.7.1 / hdi =0.8.1 pins and the lockfile
changed. A DNA built on hdk 0.7.0 cannot be granted a signing capability
by a Holochain 0.7.1 conductor. Retired once upstream releases the bump.

Refs #130
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.

1 participant