|
1 | | -## 2026-02-25 — Review of: Add 9 gen\_\*\_v0 Go wrappers with conformance tests |
| 1 | +## 2026-02-25 — Add Go CI job to ci.yml |
2 | 2 |
|
3 | | -**Verdict:** PASS |
| 3 | +**Done:** Added a `go:` job to `.github/workflows/ci.yml` that builds the WASM module from Rust, |
| 4 | +copies it to the Go package directory, and runs `go test` and `go vet`. The job follows the |
| 5 | +established CI pattern (checkout → Rust toolchain → cache → language setup → build → test) and is |
| 6 | +placed after the `java:` job at the end of the `jobs:` section. |
4 | 7 |
|
5 | | -**Summary:** All 9 `Gen*CodeV0` Go wrappers implemented on `*Runtime` with 4 memory helpers |
6 | | -(`writeBytes`, `writeI32Slice`, `writeStringArray`, `writeI32ArrayOfArrays`) and a shared |
7 | | -`callStringResult` helper. Conformance tests cover all 46 vectors from data.json across all 9 |
8 | | -functions. Clean, well-structured code with proper error handling and memory cleanup on all paths. |
| 8 | +**Files changed:** |
9 | 9 |
|
10 | | -**Verification:** |
| 10 | +- `.github/workflows/ci.yml`: Added `go:` job block with 8 steps (checkout, rust-toolchain with |
| 11 | + wasm32-wasip1 target, rust-cache, setup-go with go-version-file, cargo build WASM, cp WASM to |
| 12 | + packages/go, go test with CGO_ENABLED=0 and -count=1, go vet) |
11 | 13 |
|
12 | | -- [x] `cd packages/go && CGO_ENABLED=0 go test -v -count=1 ./...` passes — 14 tests pass (5 existing |
13 | | - \+ 9 new conformance tests covering 46 vectors) |
14 | | -- [x] `cd packages/go && go vet ./...` exits 0 — clean |
15 | | -- [x] All 9 `Gen*CodeV0` methods exist on `*Runtime` type — confirmed in iscc.go |
16 | | -- [x] Each conformance test vector produces an ISCC string matching expected output from data.json — |
17 | | - all 46 subtests pass |
18 | | -- [x] `mise run check` — all 14 pre-commit hooks pass |
19 | | -- [x] No quality gate circumvention — no lint suppressions, test skips, or hook weakening in diff |
| 14 | +**Verification:** All four criteria from next.md pass: |
20 | 15 |
|
21 | | -**Issues found:** |
| 16 | +- `git diff` shows exactly one new job block (`go:`) with no changes to existing jobs |
| 17 | +- YAML validation (`yaml.safe_load`) exits 0 |
| 18 | +- All 8 required steps verified present in the Go job section |
| 19 | +- `mise run check` passes — all 14 pre-commit hooks clean |
22 | 20 |
|
23 | | -- (none) |
| 21 | +**Next:** The Go bindings are now complete with CI coverage (14 tests, 46 conformance vectors). |
| 22 | +Consider adding the remaining 12 Tier 1 Go function wrappers (text utils, algo primitives, |
| 23 | +streaming), or creating `packages/go/README.md` and updating root README with Go installation |
| 24 | +instructions. |
24 | 25 |
|
25 | | -**Next:** Add Go CI job in `.github/workflows/ci.yml` to run `go test` and `go vet` in CI. The Go |
26 | | -module scaffold and all 9 gen functions are complete — CI integration is the natural next step to |
27 | | -protect against regressions. After CI, consider adding the remaining 12 Tier 1 utility function |
28 | | -wrappers (text utilities, algorithm primitives, streaming types). |
29 | | - |
30 | | -**Notes:** |
31 | | - |
32 | | -- The `allocEntry` type is defined locally in both `writeStringArray` and `writeI32ArrayOfArrays` — |
33 | | - minor duplication but acceptable since they're unexported local types. Could be extracted to a |
34 | | - package-level type in a future cleanup. |
35 | | -- Go tests create a new Runtime per test function (not per subtest). This is efficient since wazero |
36 | | - module instantiation is the expensive part and subtests share it. |
37 | | -- The `TextClean` method could be refactored to use `callStringResult` for consistency, but it was |
38 | | - pre-existing code and out of scope for this iteration. |
| 26 | +**Notes:** No surprises. This was a straightforward YAML addition following the exact spec in |
| 27 | +next.md. The `go-version-file` approach means the Go version in CI is controlled by `go.mod` |
| 28 | +(currently 1.24.0) — no hardcoded version in the workflow. |
0 commit comments