Repository navigation
Build & Test is red on main: the VSA module was deleted but two build targets still reference it #737
Description
Activity
The repository already answers this.
build.zig.zon:5-9:"src/vsa.zig and the 27 files of src/vsa/ were extracted here in 42490a2. build.zig kept building modules from the old path; this is the half that never landed."
I opened this asking where
vsashould come from. The migration's own manifest says:zig-hdc. Four independent probes then established what still stands between that and a green build.The extraction is byte-exact — and incomplete
crates/trios-hdc/vendor/zig-hdc/:src/vsa.zigbyte-identical to the deleted file ( diffsilent)all 27 files under src/vsa/byte-identical, 27 identical / 0 differing src/vsa/agent/absent — autonomous.zig,memory.zig,system.zig,types.zig,unified.zigagent.zigimports all five. It backs 16 of the 59 exports —UnifiedAgent,AgentMemory,AutonomousAgent,ImprovementLoop,UnifiedAutonomousSystemand the rest.Three things block the repoint
- The dependency has no hash.
build.zig.zondeclares.zig_hdc = .{ .url = "git+https://github.com/gHashTag/zig-hdc#main", .hash = "PLACEHOLDER" }— a literalPLACEHOLDER. - The vendored copy is an orphan gitlink. Mode
160000, commit27bb44aa, no entry in.gitmodules—git submodule statusfails with "no submodule mapping found". A fresh clone does not fetch it. build.zigstill points at the deleted path in both places, and five more missing paths sit alongside:src/vsa/photon_{demo,immersive,terminal,trinity_canvas}.zigandsrc/vsa/raygui_impl.c.
Correcting my own framing above
I wrote that
vsa_trihas "live consumers" and implied removing it would break them. A verifier refuted that, and it is worth stating plainly: all five wirings are dangling. Two of the five receiving modules do reference the import —src/tvc/tvc_corpus.zig:16andsrc/tri/tri_vsa.zig:12— but they reference a module whose root file does not exist. That is a dangling reference, not a live need. Three of the five are dangling and never referenced.So the choice is not "delete versus keep". Nothing works today either way.
Not a difference between candidates, but worth knowing
src/vsa.zigexportspub const LockFreePool = concurrency.LockFreePool;andconcurrency.zigdefines no such symbol — in the deleted original and inzig-hdcalike.external/zig-golden-float/is not a candidate: no aggregator, missing 4 of the 7 sibling modules, and its ownsrc/vsa/common.zigdoes@import("../hybrid.zig")against a file that is not there.What is still unverified
Whether any of this compiles. The probes were read-only by instruction and no
zig buildwas run. Theagent/gap andLockFreePoolare file-existence and grep findings; how Zig's lazy declaration analysis surfaces them is untested.🤖 Generated with Claude Code
- The dependency has no hash.
This is now determined by measurement, not a judgement call
I opened this saying the choice of replacement needed a human. It does not. Two measurements settle it.
The missing
agent/subdirectory blocks nothingzig-hdclackssrc/vsa/agent/, which backs 16 of the 59 exports. Every one of those 16 was grepped acrosssrc/,crates/andtools/, excluding the vendored copy itself:UnifiedAgent AgentMemory AgentRole Modality MultiModalToolUse AutonomousAgent ImprovementLoop UnifiedAutonomousSystem UnifiedRequest UnifiedResponse SystemCapability getUnifiedAgent getAgentMemory getAutonomousAgent getUnifiedSystemNot one is referenced anywhere. The gap is real and inert.
Everything actually used is present
The two files that genuinely import the module use seven symbols between them:
symbol in vendor/zig-hdc/src/vsa.zigHybridBigIntpresent TEXT_VECTOR_DIMpresent bindpresent cosineSimilaritypresent bundle2present HRRpresent Correcting my own first pass: it reported
bundleandtrias missing. Both were artefacts of the pattern I used.vsa.bundle2was truncated tobundlebecause[A-Za-z_]+stops at a digit — the real symbol isbundle2and it is declared at line 44.trinever was a usage; it matched the comment// @origin(spec:tri_vsa.tri).What that leaves
Mechanical, not architectural:
- Point the module root off
b.path("src/vsa.zig")— at the vendored path, or atzig_hdconce its.hash = "PLACEHOLDER"is resolved. - Register
crates/trios-hdc/vendor/zig-hdcin.gitmodules; today it is an orphan gitlink (160000, commit27bb44aa) thatgit submodule statusrejects and a fresh clone never fetches. - Delete
vsa_testsatbuild.zig:188— tests of a tree that no longer exists.
Still unverified, and stated as such: whether it compiles. No
zig buildwas run at any point in this investigation.LockFreePoolis re-exported fromconcurrency.zig, which defines no such symbol — in the deleted original and inzig-hdcalike, so it is pre-existing and not a difference between the options.🤖 Generated with Claude Code
- Point the module root off
Retracting this issue: it describes a defect that main does not have
I investigated a checkout that is 84 commits behind main and wrote this up as if it were current. On
origin/main:$ git show origin/main:build.zig | grep -c 'b.path("src/vsa.zig")' 0There are no dangling references.
build.zigtakes the module from the dependency:const zig_hdc_dep = b.dependency("zig_hdc", .{ .target = target, .optimize = optimize }); const hdc_vsa = zig_hdc_dep.module("zig-hdc-vsa");
Done in
486de2993"Take vsa from the repository it was migrated to (#686)" andbc20dc48a"The library facade takes its core modules from where they went (#701)" — two and three days ago, before I opened this. Thevsa_testsstep was removed in the same pass, with a comment explaining thataddTestneeds a root module carrying a known target and a dependency-exported module does not.Everything in my earlier comments about "five dangling wirings" and "the choice of replacement" was about a stale branch. The measurement that the
agent/gap is inert and that every used symbol is present still holds — it just was not the blocker.The real cause of Build & Test on main
Same failure locally and in CI:
build.zig.zon:19:21: error: hash mismatch: manifest declares 'golden_float-2.1.0-h7LKhZMGCwBW0FS_zsli6CWxs9d5pElRE1pFFiy3WRSD' but the fetched package has 'golden_float-2.1.0-h7LKhUUNCwAtKVHQ56wjridCZVwXY7_oxT2…'It never reaches compilation. And it is structural rather than a stale value:
.url = "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/gHashTag/zig-golden-float/archive/main.tar.gz", .hash = "golden_float-2.1.0-h7LKhZMG…",
archive/main.tar.gzis a moving target. Every commit to that repository's main changes the tarball and invalidates the pinned hash.zig_hdcis declared the same way, so it carries the same fuse — upstream main last moved 2026-08-11.Updating the hash fixes it until the next upstream commit. Pinning each
.urlto a commit or tag fixes it permanently, at the cost of an explicit bump when you want the update — which is what a lockfile is for.I have not made either change: I could not reproduce the fetched hash locally (this machine has Zig 0.16.0, the repository pins 0.15.2, and the toolchain download did not complete), so I would be writing a hash I had not computed.
Suggest closing this issue and tracking the manifest problem separately.
🤖 Generated with Claude Code
Rechecked against current
mainat03ae2f93f5af2fd4fa23e4c613a3c0e19ac51530on 2026-09-12.Closing the original diagnosis as not planned/invalid, following the author's explicit retraction in #737 (comment). The current build obtains VSA from
zig_hdc; the manifest pinszig-hdctob73b2fa29874f4e30297f167a6ea8a3c2ded9d32andzig-golden-floattoe7ce32885de2a8c50b7b6a3030d0592202145dd1, so the moving-main archive problem described in that comment is also no longer present.This does not certify the entire build. Current test-target failures and a pipeline that swallows their exit code are tracked in #616. See https://github.com/gHashTag/trinity/actions/runs/34614355939; the test logs, rather than the green job summary, contain the failure evidence.
Build & Testhas been failing onmainsince the refactor. The cause is not CI configuration — three source files cannot be loaded:What was measured
42490a222"refactor: remove 4425 lines of migrated duplicates (#517)" deletedsrc/vsa.zig— a 130-line facade re-exportingvsa/common.zig,vsa/core.zig,vsa/encoding.zig,vsa/agent.zig,vsa/concurrency.zig,vsa/hrr.zig,vsa/storage.zig,vsa/tests.zig.The whole
src/vsa/tree went with it — all eight targets are gone, andsrc/vsa.zigexists nowhere else in the tree, including thezig-golden-floatsubmodule.build.zig:2377already carries the note "VSA module … REMOVED", so the removal was intended.Two references were left behind.
The two references are not equivalent
build.zig:188—vsa_tests. Tests for a module that no longer exists. Nothing consumes it. Removing it is unambiguous.build.zig:1150—vsa_tri. This one has live consumers. Its own comment says:So
tvc_corpus_modand the fluent CLI currently depend on a module whose source is gone. This is not a leftover — it is a live dependency that the refactor broke.The decision this needs
Where should
vsa_trinow come from? Deleting it removes whatevertvc_corpusand the fluent CLI use it for; pointing it at some other implementation risks linking a different VSA than the one those call sites were written against.external/zig-golden-float/src/hasvsa_jit.zigandsrc/ternary/hybrid.zig, but novsa.zig.That is a call for whoever performed the migration. I have deliberately not guessed it.
Separately fixed
The
goto-bus/setup-zig404 in two workflows — #736. Unrelated to this.🤖 Generated with Claude Code