Rewrite as canonical Holochain 0.6 client#4
Conversation
Rewrite the client from scratch for Holochain 0.6.1. The previous code was
0.2-era and non-functional against current conductors (wrong request
envelope, wrong websocket framing, signing via an archived native crate, no
working response deserialization).
Client (async-only):
- Direct conductor wire protocol: msgpack framing, the {type, value}
envelope, Origin-header handshake.
- Type-driven serde layer mirroring serde's adjacent/internal/external enum
tagging and struct-as-map encoding.
- HoloHash byte types, typed admin/app request and response models.
- Zome-call signing in-language (msgpack + SHA-512 + ed25519 via PyNaCl),
dropping the native holochain-serialization dependency.
- Typed Record/Action/Entry models with decode_record() for zome results.
Stable endpoints only; countersigning and DNA migration (unstable cargo
features, absent from the release binary) are intentionally not covered.
Fixture upgraded to hdk 0.6.1 / hdi 0.7.1 and the current DNA/app manifest
format. Tooling moved to Python 3.10+, PyNaCl, and the Holonix main-0.6 flake.
Tests: serde/signing/record unit tests plus admin and app integration tests
covering install, signing, zome calls, Record decoding, and signals. Set
HC_ADMIN_PORT to run the suite against an already-running conductor.
|
Warning Review limit reached
More reviews will be available in 40 minutes and 21 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (59)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The top-level websockets.connect resolves to the legacy client on websockets 13.x, which rejects additional_headers (it uses extra_headers). Import websockets.asyncio.client.connect explicitly so the Origin header works across websockets 13-16.
The pinned install-nix-action@v25 (nix 2.20.1) fails to provision the Nix store volume on current macos-latest runners (eDSRecordAlreadyExists). Newer installer reuses the existing volume.
|
✔️ 42da24c...a999d7e - Conventional commits check succeeded. |
Rewrites the client from scratch for Holochain 0.6.1. The previous code was 0.2-era and non-functional against current conductors.
What changed
Client (
holochain_client/, async-only):{type, value}request/response envelope, and the requiredOriginhandshake header.serde.py) mirroring serde's adjacent ({type, value}), internal ({type, …fields}, e.g.Action), and external ({Variant: …}, e.g.RecordEntry) enum tagging, plus struct-as-map encoding.HoloHashbyte types (DnaHash/AgentPubKey/ActionHash/…) and fully-typed admin/app request & response models (AppInfo,CellInfo, capability grants, …).msgpack+hashlib.sha512+ PyNaCl ed25519), dropping the archived nativeholochain-serializationdependency.Record/Action/Entrymodels withdecode_record()/decode_records()for zome-call results.Scope: stable endpoints only. Countersigning and DNA migration are behind unstable cargo features (absent from the release binary) and are intentionally not covered yet.
DnaDefandAppManifestare returned as decoded structures rather than bespoke types.Fixture: upgraded to hdk 0.6.1 / hdi 0.7.1 and the current DNA/app manifest format (
manifest_version: "0", zomepath,getrandom_backend="custom").Tooling: Python 3.10+, PyNaCl, Holonix
main-0.6flake. Staleflake.lock/poetry.lockremoved to regenerate.Wire-protocol fixes (root causes of the old breakage)
value, notdata.datafield must be msgpack bin (serde_bytes), not an int array.Originheader.Tests
Unit tests (serde / signing / record — no conductor) plus admin and app integration tests covering install, signing, zome calls,
Recorddecoding, and signals. The suite passes against a live Holochain 0.6.1 conductor. SetHC_ADMIN_PORTto run against an already-running conductor instead of spawning one.🤖 Generated with Claude Code