Skip to main content

Go First Verification

The 2026-10-27 School run passes compilation and SQLite verification with the Go workspace runtime: WORKSPACE PASS — RELEASE PENDING. Public v0.3.1 still lacks GenerateInternalId and EnsureInternalIdFloor used by the deployed generator; its separate published-consumer receipt retains the build failure. Follow the explicit workspace command to reproduce the passing source result.

A successful compile proves only that generated symbols line up. The first useful verification must cross the generated Request, UserContext, provider, real database, and audited mutation boundary.

Verification ladder​

1. Public module resolution​

From the generated console directory, resolve the version selected by its go.mod, then verify that exact version in a clean module cache:

teaql_runtime_version=$(GOWORK=off go list -m -f '{{.Version}}' github.com/teaql/teaql-golang)
test -n "$teaql_runtime_version"
teaql_probe_cache=$(mktemp -d)
GOMODCACHE="$teaql_probe_cache" GOWORK=off \
go mod download -json "github.com/teaql/teaql-golang@$teaql_runtime_version"
GOMODCACHE="$teaql_probe_cache" GOWORK=off \
go list -m -json "github.com/teaql/teaql-golang@$teaql_runtime_version"

Confirm the resolved version matches the generated manifest, with no local replace supplying the runtime. Compare it with Latest Versions; a recorded historical tag is not an instruction to downgrade a new workspace.

2. Generated contract​

go test ./...
go vet ./...

Use scoped Assist and compiler diagnostics to verify exact generated names and terminal signatures. Execution receives one trusted context and requires non-empty Comment and Purpose, in either order. Do not read generated library source for API discovery. Add application tests before treating go test ./... as behavioral evidence; output reporting no test files is not a verification pass.

3. Real SQLite smoke test​

Run the shared School SQLite example from a checkout of teaql-io-site:

npm run verify:school -- --language go

This default command checks the published dependency. While its release is pending, add --go-runtime /absolute/path/to/teaql-golang to select the verified source checkout explicitly; the result remains qualified as workspace-only.

The complete Go application uses the same School model as the other six runtimes. The runner generates and builds the workspace, checks root/constant bootstrap twice, saves a school with an audit reason, then starts a new process to read it back. An independent SQLite checker verifies persisted fields and relationships after every phase. Logs, exit codes and row snapshots are retained under artifacts/school/.

4. Negative governance checks​

Prove these operations fail:

  • query without Purpose;
  • purpose with no non-empty comment;
  • execution with an uninitialized context;
  • save without AuditAs;
  • stale-version update;
  • dynamic JSON containing unknown fields or trusted-context overrides.

Some failures should be compile-time because the terminal is absent; the rest must be runtime errors. Never turn them into empty results or unfiltered queries.

5. SQL semantics​

For a representative list query, retain a masked SQL trace and verify stable ordering, bound parameters, native COUNT/SUM/GROUP BY, and exact per-parent Top-N with at least two parents. Check the selected provider plan: SQLite can use bounded runtime probes instead of window SQL. Compare page rows, record count, totals, and facets under the same active filter.

6. Regeneration​

Add a field to the model, regenerate from scratch, compile, and rerun the SQLite test. Review the generated diff instead of keeping a manual generated-file repair.

Minimum evidence​

Record toolchain/runtime/generator versions, model hash, generation command, build and test exit codes, database/provider version, masked native response, and relevant SQL shape. This turns “it ran once” into a reproducible baseline.

After this gate passes, continue with Go Customization and the business scenarios.