OverviewFilesCommitsIssuesDocsReleasesPeers

hypercore-kb commits / c860c8b

skills/hyperschema-c: it cannot generate our dht_messages.h
The first revision said generating our HyperDHT codecs from upstream's schemas "would make tracking upstream mechanical instead of an audit". That is wrong, and checking took one command. Against the installed hyperdht 6.34.0: no spec/ directory, no hyperschema dependency, and lib/messages.js opens with `const c = require('compact-encoding')`. HyperDHT hand-writes its wire codecs exactly as we do. There is no upstream schema for the DHT wire to generate from. Only hyperdht-address — a small new dep of 6.34.0 — is hyperschema-backed, and libhc uses hyperschema-c for its own manifest/store encodings. Where it does apply: protocols WE define (a daemon control plane, a session channel), where we own the schema and can generate both ends; and libhc, if we link it. Not for matching hyperdht's existing wire, which stays a hand-written port held to vectors. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
c860c8b945b28c428696e2aed9d08e0a90071177
by plankatron <fleeky@gmail.com> · 2026-09-10T16:47:06.000Z

Changed files (1) +21 -9

.claude/skills/hyperschema-c/SKILL.md +21 -9
……@@ -19,15 +19,27 @@ parity audit on hyperdht 6.29.0 while upstream was at 6.34.0 — see
1919
2020## Why it matters to us
2121
22Our `hyperswarm-peer/src/dht_messages.h` is a **hand-written** codec for the
23HyperDHT wire. Upstream is moving the other way: hyperdht 6.34.0 pulled in
24`hyperdht-address`, which uses hyperschema, and `libhc`'s own commits read
25*"generate manifest encoding via hyperschema-c"*. So their encodings are becoming
26a GENERATED artifact from a shared schema while ours are typed by hand.
27
28Generating ours from the same schemas would make tracking upstream mechanical
29instead of an audit. Not done — recorded as an open question in
30`PARITY-hyperswarm.md` §6.3.
22⛔ **IT CANNOT GENERATE OUR `dht_messages.h`, AND AN EARLIER REVISION OF THIS
23FILE SAID IT COULD.** Checked 2026-09-10 against the installed hyperdht 6.34.0:
24
25 ls node_modules/hyperdht -> no spec/ directory
26 package.json dependencies -> no hyperschema
27 lib/messages.js -> const c = require('compact-encoding')
28
29**HyperDHT hand-writes its own wire codecs, exactly as we do.** There is no
30upstream schema for the DHT wire to generate from, so "generate ours from the
31same schemas and tracking upstream becomes mechanical" was wrong. Only
32`hyperdht-address` — a small new dependency of 6.34.0 — is hyperschema-backed,
33and `libhc` uses hyperschema-c for its OWN manifest/store encodings.
34
35Where it genuinely applies to us:
36
37- **protocols WE define** — a daemon control plane, a session channel. There we
38 own the schema, so generating both ends is free.
39- **libhc integration**, if we ever link it: its encodings are already generated
40 this way.
41- NOT for matching hyperdht's existing wire. That stays a hand-written port
42 held to vectors (see `PARITY-hyperswarm.md`).
3143
3244## Usage
3345