Skip to content

Commit d623c0c

Browse files
gHashTagona-agent
andcommitted
feat: Real VSA Modality Encoders — Cycle 51
4 encoder modules with @import("vsa") calling real VSA operations: - vsa_real_text_encoder: 16 tests, 38 vsa.* calls - vsa_real_vision_encoder: 15 tests, 38 vsa.* calls - vsa_real_voice_encoder: 15 tests, 38 vsa.* calls - vsa_real_code_encoder: 16 tests, 42 vsa.* calls Re-applied 0.13 compat fixes (page_size, CallingConvention). Updated build_zig13.zig with all encoder test steps. zig build test: 809/809 tests, 25/25 steps. Total real vsa.* calls across all generated modules: 290. Co-authored-by: Ona <no-reply@ona.com>
1 parent 370515a commit d623c0c

14 files changed

Lines changed: 2146 additions & 10 deletions

build_zig13.zig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,24 @@ pub fn build(b: *std.Build) void {
204204
vsa_imported_step.dependOn(&run_vsa_imported.step);
205205
test_step.dependOn(&run_vsa_imported.step);
206206

207+
// Real VSA Encoder tests (Cycle 51)
208+
const encoder_files = [_][]const u8{
209+
"generated/vsa_real_text_encoder.zig",
210+
"generated/vsa_real_vision_encoder.zig",
211+
"generated/vsa_real_voice_encoder.zig",
212+
"generated/vsa_real_code_encoder.zig",
213+
};
214+
for (encoder_files) |enc_file| {
215+
const enc_tests = b.addTest(.{
216+
.root_source_file = b.path(enc_file),
217+
.target = target,
218+
.optimize = optimize,
219+
});
220+
enc_tests.root_module.addImport("vsa", vsa_mod);
221+
const run_enc = b.addRunArtifact(enc_tests);
222+
test_step.dependOn(&run_enc.step);
223+
}
224+
207225
// VIBEE Compiler CLI
208226
const vibee = b.addExecutable(.{
209227
.name = "vibee",
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Golden Chain Cycle 51: Real VSA Modality Encoders
2+
3+
**Date:** 2026-02-07
4+
**Status:** Complete
5+
**Build:** 809/809 tests, 25/25 steps
6+
7+
## Summary
8+
9+
Migrated all 4 modality encoders to use real `@import("vsa")` with actual VSA operations. Each encoder calls `vsa.bind()`, `vsa.bundle2()`, `vsa.permute()`, `vsa.cosineSimilarity()`, `vsa.charToVector()`, `vsa.encodeText()`, and `vsa.randomVector()` on real `HybridBigInt` vectors.
10+
11+
Also re-applied Zig 0.13 compatibility fixes (`page_size_min` -> `page_size`, `callconv(.c)` -> `callconv(.C)`) that were overwritten by remote commits.
12+
13+
## Encoder Modules
14+
15+
| Module | Tests | Real vsa.* calls | Lines |
16+
|--------|-------|-------------------|-------|
17+
| vsa_real_text_encoder.zig | 16 | 38 | 366 |
18+
| vsa_real_vision_encoder.zig | 15 | 38 | 357 |
19+
| vsa_real_voice_encoder.zig | 15 | 38 | 360 |
20+
| vsa_real_code_encoder.zig | 16 | 42 | 373 |
21+
| **Total** | **62** | **156** | **1456** |
22+
23+
## Build Results
24+
25+
```
26+
Build Summary: 25/25 steps succeeded; 809/809 tests passed
27+
```
28+
29+
| Step | Tests |
30+
|------|-------|
31+
| trinity.zig | 211 |
32+
| vsa.zig | 137 |
33+
| vm.zig | 187 |
34+
| b2t_integration | 23 |
35+
| wasm_parser | 27 |
36+
| extension_wasm | 31 |
37+
| depin | 5 |
38+
| vsa_imported_system | 126 |
39+
| vsa_real_text_encoder | 16 |
40+
| vsa_real_vision_encoder | 15 |
41+
| vsa_real_voice_encoder | 15 |
42+
| vsa_real_code_encoder | 16 |
43+
44+
## Metrics
45+
46+
| Metric | Value |
47+
|--------|-------|
48+
| New encoder tests | 62 |
49+
| New real vsa.* calls | 156 |
50+
| Total real vsa.* calls (all modules) | 290 (134 + 156) |
51+
| Build steps | 25/25 |
52+
| Total tests | 809/809 |
53+
| TODOs | 0 |
54+
55+
---
56+
**Formula:** phi^2 + 1/phi^2 = 3

0 commit comments

Comments
 (0)