Skip to content

chore(deps): upgrade to Holochain 0.7 - #130

Draft
Soushi888 wants to merge 6 commits into
devfrom
chore/holochain-0.7
Draft

chore(deps): upgrade to Holochain 0.7#130
Soushi888 wants to merge 6 commits into
devfrom
chore/holochain-0.7

Conversation

@Soushi888

@Soushi888 Soushi888 commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Status: draft. The port is complete and green locally (all zomes build, happ packs, 39/39
Sweettest pass, UI typechecks). It is a draft for two reasons, both listed under
What is still missing at the bottom: this PR needs a companion hREA PR merged first, and an
independent review of the validation diff did not finish before the session ended.

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 ZomeDef dropped its custom untagged serialization, and
the DnaHash derives from the serialized integrity zomes, so an otherwise identical DNA hashes
differently. Persistence also moved from holochain_sqlite to holochain_data with renamed
databases 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 (rev ffcc7c63b4b8); note the default holonix
template now tracks holochain-0.8.0-dev, so the ref is explicit. Workspace pins hdi =0.8.0,
hdk =0.7.0, holochain =0.7.0 with test_utils. JS side moves to @holochain/client ^0.21.0
and @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); an Action is now an
ActionHeader plus an ActionData, and flat-op variants carry a TypedAction<D> whose D is
already known from the variant matched. Concretely, across zome_person, zome_resource,
zome_gouvernance, zome_group_integrity and zome_lobby_integrity:

  • FlatOp::StoreEntry/StoreRecord are now CreateEntry/CreateRecord; RegisterCreateLink
    and RegisterDeleteLink fold into FlatOp::Link(OpLink::*).
  • EntryCreationAction is replaced by TypedAction<EntryCreationData>; narrowing a fetched
    Action goes through try_into() rather than a hand-written Create/Update match.
  • Fields that used to sit on the flat-op variant are gone with no replacement accessor:
    OpRecord::DeleteEntry reads action.deletes_address, UpdateEntry reads
    action.original_action_address, DeleteLink reads action.link_add_address, and link ops
    read base_address/target_address/tag off the typed action.
  • action.author becomes the accessor action.author().

Coordinator zomes. post_commit signal dispatch matches on action.hashed.content.data
(ActionData::*) instead of the removed Action::* 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 about
independent review below.

hREA submodule. hREA upstream has no main-0.7 branch (only main-0.5 and main-0.6), and
the hREA DNA ships as a role in this hApp, so it had to move too. The vendored Sensorica fork is
ported on Sensorica/hREA branch chore/holochain-0.7 (commit 8735ca07), and the submodule
pointer 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 a TODO returning Valid, so there is no
behaviour to preserve. hREA also needed holochain_serialized_bytes 0.0.560.0.57, because
0.0.56 pins serde 1.0.219 and conflicts with hdi 0.8.

Dev launcher. 0.7 removes the WebRTC/tx5 transport entirely (iroh is compiled in
unconditionally), and hc sandbox create network now accepts only mem or quic.
scripts/launch-happ.mjs passes quic.

Tests. await_consistency_20_s is gone; 0.7 offers await_consistency(cells) with a hard 60s
timeout and await_consistency_s(timeout, cells) as the configurable form. The existing 20s and
10s waits are preserved through the latter rather than silently widened. SweetConductorBatch no
longer derefs mutably or exposes iter_mut, but does implement IndexMut.

Tryorama is now unrunnable. @holochain/tryorama has no 0.7-compatible release (latest 0.19.2
targets a 0.6 conductor). The tests/ suite was already deprecated; tests/DEPRECATED.md and the
testing 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 shellHook runs git submodule update --init vendor/hrea on every nix develop, which silently discards an uncommitted branch checkout inside
the submodule. This bit during the port; CONTRIBUTING.md now has a short section on it.

Decisions

Option Rejected because
Hold hREA on 0.6 and ship only the Nondominium-side port The hREA DNA is a role in this hApp and runs in the same 0.7 conductor. A 0.6-built wasm will not load, so the happ would not run at all.
Widen the preserved 20s/10s consistency waits to the 60s default That is a behaviour change smuggled into a dependency bump. await_consistency_s keeps the timings identical; retuning them is a separate decision.
Attempt data migration via init properties 0.7 ships the init-properties mechanism, but the DX is incomplete and Nondominium has no production users. Every 0.7 network is a new network; that is stated rather than worked around.

How to test

git submodule update --init --recursive
nix develop                      # holochain 0.7.0, hc 0.7.0, lair 0.7.1, rustc 1.95.0
bun install
bun run build:happ               # builds all zomes + hREA, packs 5 DNAs and the happ

CARGO_TARGET_DIR=target/native-tests cargo test -p nondominium_sweettest -- --test-threads 6
CARGO_TARGET_DIR=target/native-tests cargo test -p group_sweettest -- --test-threads 6
CARGO_TARGET_DIR=target/native-tests cargo test -p lobby_sweettest -- --test-threads 6

bun run --filter ui check

Delete any existing hc sandbox / conductor data first. 0.7 cannot read 0.6 databases and the
failure mode is a confusing startup error rather than a clear version message.

What was actually verified locally

Check Result
nix develop --command holochain --version holochain 0.7.0 (hc 0.7.0, lair 0.7.1)
cargo tree -i hdk / -i hdi hdk v0.7.0 / hdi v0.8.0, single version each
cargo build --release --target wasm32-unknown-unknown exit 0, 11 wasm artifacts
hREA wasm build (vendor/hrea) exit 0
hc app pack workdir --recursive wrote workdir/nondominium.happ (5 DNAs)
Sweettest, all three suites 39 passed, 0 failed, 2 ignored, every suite exit 0
bun run --filter ui check svelte-check: 0 errors, 0 warnings
hc sandbox create network --help lists only mem and quic, confirming the launcher change

The two ignored tests were already #[ignore] on dev; this PR did not add or skip any test.

What is still missing

Picking this up fresh, in priority order:

  1. Merge the hREA PR first. This branch's submodule pointer targets Sensorica/hREA
    chore/holochain-0.7 @ 8735ca07. That branch is pushed but has no PR yet, and it is not on
    the 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.
  2. Finish the independent review of the validation diff. A fresh-context reviewer was
    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 old original_action_hash vs the new
    action.deletes_address; UpdateEntry's vs action.original_action_address; DeleteLink's
    vs action.link_add_address), and did any try_into() failure branch flip an Invalid
    verdict to Valid? Those two are the only places in this diff where a mechanical port could
    silently weaken validation. Everything else is a rename.
  3. CI has no Sweettest job. .github/workflows/build.yml builds the happ and runs the browser
    e2e suite, but never runs Sweettest, so the 39 passing tests above are local-only evidence.
    Worth adding, but out of scope here.
  4. Browser e2e not run. bun run e2e was not executed in this session. The harness compiles
    and typechecks against client 0.21, and the one real API break there is fixed
    (AppWebsocket.client is narrowed to AppClientTransport in 0.21 and no longer exposes
    close()), but the suite has not been run against a live 0.7 conductor.
  5. Publish the new DNA hashes somewhere users can see, since the old network is unreachable
    from this build.
  6. Not attempted, deliberately: data migration, and Kangaroo / Moss / Holo Edge packaging.
    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/HDI
    and 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 / holonix main-0.7.
  • tests/DEPRECATED.md — states that the legacy suite cannot run against a 0.7 conductor.
  • CONTRIBUTING.md — new section on the vendor/hrea submodule reset trap.

Related

  • Depends on: Sensorica/hREA branch chore/holochain-0.7 (submodule pointer, see item 1 above).

Closes #134

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.
@Soushi888

Copy link
Copy Markdown
Collaborator Author

Author self-check on the highest-risk item (not an independent review)

Item 2 in "What is still missing" asks whether the replaced original_action_hash reads are
actually equivalent. I checked this myself against the hdi 0.7.1 source (the 0.6 line) versus
hdi 0.8.0. This is the author checking his own diff, so it does not discharge the need for a
second pair of eyes
— but it does mean a reviewer can start from a narrower question.

Where 0.6 populated each field, from hdi-0.7.1/src/op.rs:

0.6 flat-op field fed from this PR now reads equivalent
OpRecord::DeleteEntry.original_action_hash deletes_address.clone() (line 209) action.deletes_address yes
OpRecord::UpdateEntry.original_action_hash Update.original_action_address, renamed on destructure (lines 158/175) action.original_action_address yes
OpRecord::DeleteLink.original_action_hash link_add_address.clone() (line 94) action.link_add_address yes

Narrowing failure branches. Every site that swapped a hand-written
Action::Create(..) | Action::Update(..) match for TryInto<TypedAction<EntryCreationData>>
keeps its original verdict. try_into fails on exactly the same set the old _ arm caught
(anything that is neither Create nor Update), so the arms are semantically identical:

  • zome_resource DeleteEntry: InvalidInvalid (same message)
  • zome_person DeleteEntry: InvalidInvalid (same message)
  • zome_gouvernance DeleteEntry / UpdateEntry: ValidValid
  • zome_lobby_integrity UpdateEntry: ValidValid
  • hREA UpdateEntry / DeleteEntry / DeleteLink: InvalidInvalid (same messages)

No branch flipped Invalid to Valid.

One genuinely new branch, worth a reviewer's eye. In hREA's OpActivity::CreateAgent arm,
0.6 read action.prev_action as a plain ActionHash; in 0.7 ActionHeader.prev_action is
Option<ActionHash> (None only for the genesis Dna action). I added
None => return Ok(ValidateCallbackResult::Valid). A CreateAgent op always follows an
AgentValidationPkg, so that arm should be unreachable in practice, but it is the one place in
this diff where I wrote a new decision rather than relocating an existing one.

Still unreviewed by anyone but me: the FlatOp variant renames (whether each new variant is
the same authority as the old one it replaced) and the four link-arm restructurings into
FlatOp::Link(OpLink::*), where base_address / target_address / tag are now bound from the
typed action at the top of the arm.

Soushi888 added a commit that referenced this pull request Aug 16, 2026
…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.
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.

chore(deps): upgrade Nondominium to Holochain 0.7 (blocked on hREA)

1 participant