chore(deps): upgrade to Holochain 0.7 - #130
Conversation
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.
- @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.
@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.
- 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.
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.
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.
Author self-check on the highest-risk item (not an independent review)Item 2 in "What is still missing" asks whether the replaced Where 0.6 populated each field, from
Narrowing failure branches. Every site that swapped a hand-written
No branch flipped One genuinely new branch, worth a reviewer's eye. In hREA's Still unreviewed by anyone but me: the |
…can write (#138) rsync -a preserves the read-only mode of nix store paths, so after the first materialization .claude/ was mode 555 and the agent-skills hook could not mkdir .claude/skills/holochain. Every nix shell entry and every CI job logged 'rsync: mkdir failed: Permission denied (13)' three times. Non-fatal but noisy, and a red herring when diagnosing real e2e failures: in PR #130's failing run the error appears immediately before the launcher timeout, though the two are unrelated. .cursor/ already had this exact chmod; .claude/ was missing it.
Intent
Move Nondominium from Holochain 0.6.1 to Holochain 0.7.0. The 0.7 line is what Unyt is driving
core releases against, and the expensive part of this upgrade is a one-time rewrite of every
integrity zome onto the new action model. Doing it now, while the project has no production
users and the DNA-hash break costs nothing, is far cheaper than doing it later.
This changes every DNA hash. In 0.7
ZomeDefdropped its custom untagged serialization, andthe DnaHash derives from the serialized integrity zomes, so an otherwise identical DNA hashes
differently. Persistence also moved from
holochain_sqlitetoholochain_datawith renameddatabases and no migration path. Practically: a 0.7 network is a new network, and existing
conductor data must be cleared. No migration is attempted here, and none is needed yet.
Changes
Toolchain. holonix pinned to
main-0.7(revffcc7c63b4b8); note the default holonixtemplate now tracks
holochain-0.8.0-dev, so the ref is explicit. Workspace pinshdi =0.8.0,hdk =0.7.0,holochain =0.7.0withtest_utils. JS side moves to@holochain/client^0.21.0and
@holochain/hc-spin^0.700.0.Integrity zomes — the v2 action model. 0.7 removes the per-variant action structs (
Create,Update,Delete,CreateLink,DeleteLink,EntryCreationAction); anActionis now anActionHeaderplus anActionData, and flat-op variants carry aTypedAction<D>whoseDisalready known from the variant matched. Concretely, across
zome_person,zome_resource,zome_gouvernance,zome_group_integrityandzome_lobby_integrity:FlatOp::StoreEntry/StoreRecordare nowCreateEntry/CreateRecord;RegisterCreateLinkand
RegisterDeleteLinkfold intoFlatOp::Link(OpLink::*).EntryCreationActionis replaced byTypedAction<EntryCreationData>; narrowing a fetchedActiongoes throughtry_into()rather than a hand-writtenCreate/Updatematch.OpRecord::DeleteEntryreadsaction.deletes_address,UpdateEntryreadsaction.original_action_address,DeleteLinkreadsaction.link_add_address, and link opsread
base_address/target_address/tagoff the typed action.action.authorbecomes the accessoraction.author().Coordinator zomes.
post_commitsignal dispatch matches onaction.hashed.content.data(
ActionData::*) instead of the removedAction::*variants.Validation behaviour is intended to be unchanged. Every check reads the same value from its
new location; no
validate_*body lost a rule to make the code compile. See the caveat aboutindependent review below.
hREA submodule. hREA upstream has no
main-0.7branch (onlymain-0.5andmain-0.6), andthe hREA DNA ships as a role in this hApp, so it had to move too. The vendored Sensorica fork is
ported on
Sensorica/hREAbranchchore/holochain-0.7(commit8735ca07), and the submodulepointer here moves to it. That port is a pure signature/shape sweep: the hREA integrity zome is
scaffolded and uniform, and every
validate_*body is aTODOreturningValid, so there is nobehaviour to preserve. hREA also needed
holochain_serialized_bytes0.0.56→0.0.57, because0.0.56pinsserde 1.0.219and conflicts withhdi 0.8.Dev launcher. 0.7 removes the WebRTC/tx5 transport entirely (iroh is compiled in
unconditionally), and
hc sandbox create networknow accepts onlymemorquic.scripts/launch-happ.mjspassesquic.Tests.
await_consistency_20_sis gone; 0.7 offersawait_consistency(cells)with a hard 60stimeout and
await_consistency_s(timeout, cells)as the configurable form. The existing 20s and10s waits are preserved through the latter rather than silently widened.
SweetConductorBatchnolonger derefs mutably or exposes
iter_mut, but does implementIndexMut.Tryorama is now unrunnable.
@holochain/tryoramahas no 0.7-compatible release (latest 0.19.2targets a 0.6 conductor). The
tests/suite was already deprecated;tests/DEPRECATED.mdand thetesting stack table now say plainly that it cannot connect to a 0.7 conductor. The dependency is
left pinned so the files still typecheck as reference material.
Contributor trap documented. The flake
shellHookrunsgit submodule update --init vendor/hreaon everynix develop, which silently discards an uncommitted branch checkout insidethe submodule. This bit during the port;
CONTRIBUTING.mdnow has a short section on it.Decisions
await_consistency_skeeps the timings identical; retuning them is a separate decision.How to test
Delete any existing
hc sandbox/ conductor data first. 0.7 cannot read 0.6 databases and thefailure mode is a confusing startup error rather than a clear version message.
What was actually verified locally
nix develop --command holochain --versionholochain 0.7.0(hc 0.7.0, lair 0.7.1)cargo tree -i hdk/-i hdihdk v0.7.0/hdi v0.8.0, single version eachcargo build --release --target wasm32-unknown-unknownvendor/hrea)hc app pack workdir --recursiveworkdir/nondominium.happ(5 DNAs)bun run --filter ui checkhc sandbox create network --helpmemandquic, confirming the launcher changeThe two ignored tests were already
#[ignore]ondev; this PR did not add or skip any test.What is still missing
Picking this up fresh, in priority order:
Sensorica/hREAchore/holochain-0.7@8735ca07. That branch is pushed but has no PR yet, and it is not onthe fork's default branch. CI here checks out submodules recursively, so CI on this PR will
stay red until the hREA side is merged and the pointer is repointed at the merged commit.
Open the hREA PR at https://github.com/Sensorica/hREA/pull/new/chore/holochain-0.7.
dispatched to check one specific risk and did not report back before the session ended. The
question it was asked, which is the right question for a reviewer here: are the replaced hash
fields actually equivalent (
DeleteEntry's oldoriginal_action_hashvs the newaction.deletes_address;UpdateEntry's vsaction.original_action_address;DeleteLink'svs
action.link_add_address), and did anytry_into()failure branch flip anInvalidverdict to
Valid? Those two are the only places in this diff where a mechanical port couldsilently weaken validation. Everything else is a rename.
.github/workflows/build.ymlbuilds the happ and runs the browsere2e suite, but never runs Sweettest, so the 39 passing tests above are local-only evidence.
Worth adding, but out of scope here.
bun run e2ewas not executed in this session. The harness compilesand typechecks against client 0.21, and the one real API break there is fixed
(
AppWebsocket.clientis narrowed toAppClientTransportin 0.21 and no longer exposesclose()), but the suite has not been run against a live 0.7 conductor.from this build.
Check each downstream packager's own 0.7 support before promising a release date; their
conductor pins lag core.
Documentation
CLAUDE.md— technology stack versions, Sweettest framework pin.README.md,documentation/IMPLEMENTATION_STATUS.md,documentation/ARCHITECTURE_COMPONENTS.md,documentation/DOCUMENTATION_INDEX.md,documentation/zomes/architecture_overview.md— HDK/HDIand client version references.
documentation/Testing_Infrastructure.md— testing stack table; Tryorama marked retired.documentation/hREA/integration-strategy.md— HDK compatibility note now reads 0.7 / holonixmain-0.7.tests/DEPRECATED.md— states that the legacy suite cannot run against a 0.7 conductor.CONTRIBUTING.md— new section on thevendor/hreasubmodule reset trap.Related
Sensorica/hREAbranchchore/holochain-0.7(submodule pointer, see item 1 above).Closes #134