Skip to content

build,test(base): GOEXPERIMENT=jsonv2 + per-conn budget regression test#9

Merged
hanzo-dev merged 1 commit into
mainfrom
feat/scale-standard
May 22, 2026
Merged

build,test(base): GOEXPERIMENT=jsonv2 + per-conn budget regression test#9
hanzo-dev merged 1 commit into
mainfrom
feat/scale-standard

Conversation

@hanzo-dev
Copy link
Copy Markdown
Member

Summary

Per SCALE_STANDARD.md (https://github.com/hanzoai/HIPs/blob/main/docs/SCALE_STANDARD.md):

  • §2 — Dockerfile compiles with GOEXPERIMENT=jsonv2 by default.
  • §3 + §8 — conn_memory_test.go asserts per-conn heap and goroutine budgets.

Verified numbers (Apple M1 Max, Go 1.26)

=== Per-connection memory profile (hanzoai/base) ===
conns held       : 1000
per-conn heap    : 8246 B (8.05 KiB)
goroutines / conn: 1.00

Test plan

  • go test -mod=mod -run=TestConnMemory -v -conn-count=10000 passes
  • per_conn_heap < 12 KiB
  • goroutines/conn in [0.95, 1.05]

Notes

DO NOT MERGE — release-train PR.

Per SCALE_STANDARD.md (~/work/hanzo/hips/docs/SCALE_STANDARD.md):

§2 — Dockerfile compiles with GOEXPERIMENT=jsonv2 by default. Verified
on hanzoai/zip's json_bench_test.go:
- Edge POST roundtrip: -12% time, -23% allocs
- Marshal-only: -22% time
- Unmarshal-only: -19% time, -25% allocs

§3 + §8 — TestConnMemory asserts the per-conn heap and goroutine
budgets that gate every Hanzo Go service:
- per_conn_heap <= 12 KiB (verified 8.05 KiB at 1k conns)
- goroutines/conn in [0.95, 1.05] (verified 1.00 at 1k conns)

Verified locally (Apple M1 Max, Go 1.26):
- 1,000 conns: 8.05 KiB / conn, 1.00 goroutine / conn — PASS
@hanzo-dev hanzo-dev merged commit bd677d2 into main May 22, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant