Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
186 commits
Select commit Hold shift + click to select a range
2f00233
chore: add EUPL-1.2 LICENCE file (UK English canonical)
Snider May 1, 2026
963725c
audit: harden + extend v0.9.0 audit script
Snider May 1, 2026
b48b896
audit: add replace-directives dimension
Snider May 1, 2026
e13d7d1
audit: align python helpers with audit.sh external/ exclusion
Snider May 1, 2026
b418522
core: wrapper expansion — RawMessage, Buffer, Builder + 5 string wrap…
Snider May 1, 2026
62aac07
audit: add tracked-artifacts dimension
Snider May 1, 2026
cfe2000
audit: add 3 dims extracted from core/go/docs (Mantis #1337 Phase 2)
Snider May 1, 2026
eb6afa1
audit: example-gaps METHOD regex requires uppercase receiver type
Snider May 1, 2026
83ad20d
audit: ax7-gaps METHOD regex same fix as example-gaps (eb6afa1)
Snider May 1, 2026
a00b71a
audit: exclude .lintdeps/ from scans (Mantis #1336)
Snider May 1, 2026
7d10b44
audit(file-presence): fix METHOD regex false-positive on lowercase re…
Snider May 1, 2026
d237034
feat(audit): add tuple-result-shape check to v090 audit
Snider May 11, 2026
3ecf794
fix(audit): broaden tuple-result-shape regex to catch slice/map first…
Snider May 11, 2026
18b86f3
audit: add 4 new dimensions covering 2026-05 canon
Snider May 11, 2026
5fab841
feat(api): export HTTP method/status constants + Flusher/DefaultClien…
Snider May 15, 2026
581cfe5
feat(time): export After / NewTicker / Unix(s,ns) / UnixMilli
Snider May 15, 2026
bf32bfd
feat(core): add LastIndex / SliceSortFunc / LimitReader / RandRead
Snider May 15, 2026
1a0e3b3
feat(core): export Go(fn) + IsShutdown() — tracked goroutines + coope…
Snider May 15, 2026
e0951cd
test(string): add AX-11 bench harness for hot string primitives
Snider May 21, 2026
1c18c2f
perf(string): replace O(N²) Concat-cascade in Join with single pre-si…
Snider May 21, 2026
ccbdb4f
test(slice): add AX-11 bench harness for slice primitives
Snider May 21, 2026
6d2b96d
perf(slice): replace sort.Slice with generic slices.Sort/SortFunc
Snider May 21, 2026
7c76f28
test(json): add AX-11 bench harness for json primitives
Snider May 21, 2026
b4e6af4
test(io): add AX-11 bench harness for io primitives
Snider May 21, 2026
7c1270a
perf(io): fast path for ReadAll when reader exposes Len()
Snider May 21, 2026
ac337a8
test(api): add AX-11 bench harness for HTTP + API primitives
Snider May 21, 2026
fcef973
perf(string): ASCII no-op fast path for Lower and Upper
Snider May 21, 2026
2598335
test(slice): measure full sort benchmark operation
Snider May 21, 2026
ca96526
perf(io): unsafe.String + LimitedReader fast path for ReadAll
Snider May 21, 2026
729b23b
perf(slice): small-N linear path for SliceUniq
Snider May 21, 2026
6cd30f2
test(array): add AX-11 bench harness for Array[T] primitive
Snider May 21, 2026
d12d466
perf(array): pre-size Filter + small-N linear path for Deduplicate
Snider May 21, 2026
2a921a3
perf(random): uint64 rejection for RandomInt + inline RandomString
Snider May 21, 2026
23c0576
perf(math): use builtin min/max instead of cmp.Compare three-way path
Snider May 21, 2026
691ef3e
test(atomic): add AX-11 bench harness for the typed atomic wrappers
Snider May 21, 2026
ace2c41
perf(runtime): drop empty-map literal in NewRuntime + add AX-11 bench…
Snider May 21, 2026
8b43d04
test(time): add AX-11 bench harness for time.go primitives
Snider May 21, 2026
70ad640
perf(fs): cache resolved root + unsafe.String in Read
Snider May 21, 2026
49a7e29
test(sync): add AX-11 bench harness for sync.go primitives
Snider May 21, 2026
5e90c53
perf(map): index-assign in MapKeys/MapValues instead of append
Snider May 21, 2026
451b3aa
perf(hash): unsafe.Slice aliasing for SHA256{,Hex}String
Snider May 21, 2026
8316208
test(regexp): add AX-11 bench harness for regex primitives
Snider May 21, 2026
492bfe7
perf(error): direct *Err type assertion fast path
Snider May 21, 2026
904c675
test(iter): add AX-11 bench harness for iter primitives
Snider May 21, 2026
fe7eb81
test(net): add AX-11 bench harness for net primitives
Snider May 21, 2026
930f0ac
test(url): add AX-11 bench harness for URL primitives
Snider May 21, 2026
c325961
perf(path): absolute-first-segment fast path for Path()
Snider May 21, 2026
bd43e1f
perf(log): rewrite formatter — single Buffer, no defensive copy, key …
Snider May 21, 2026
2547f66
test(bench): close export-coverage gaps across nine bench harnesses
Snider May 21, 2026
7335eba
test(bench): AX-11 harnesses for int/encode/format/unicode/result/con…
Snider May 21, 2026
e832c70
test(bench): AX-11 harnesses for core/action/registry/service/app pri…
Snider May 21, 2026
6b76ddb
test(bench): AX-11 harnesses for sha3/table/drive/scanner/user/templa…
Snider May 21, 2026
a8c4d7e
test(bench): AX-11 harnesses for data/options/contract/embed/entitlem…
Snider May 21, 2026
7b549ab
perf(core): lift zero-copy view primitives + propagate to internal wr…
Snider May 21, 2026
7d1874e
perf(core): cache Fs.validatePath, lock-free IPC dispatch, cached Loc…
Snider May 21, 2026
90b66c3
perf(utils): single-buffer ID() + shortRand — 5 allocs → 1
Snider May 21, 2026
ffb1abb
perf(json): JSONMarshalString uses AsString — skip return-side copy
Snider May 21, 2026
0a8b115
perf(path,io): CleanPath OS-native fast path + WriteString zero-copy …
Snider May 21, 2026
d9522dc
perf(data,embed,log): drop allocs across read paths + log formatter
Snider May 21, 2026
169c79a
perf(path): PathBase + PathExt zero-alloc via lastIndex
Snider May 21, 2026
ad23494
perf(json,encode): zero-copy returns — AsBytes input + AsString output
Snider May 21, 2026
c59e0f6
feat(string): add Clone — detach string from backing memory
Snider May 21, 2026
f7a84db
feat(unsafe): add PinnedView for zero-copy Go→C tensor handoff
Snider May 21, 2026
a777ca3
fix(i18n): SetLanguage returns Result, aligning Translator to go-i18n
Snider Jun 4, 2026
c4419b0
feat(os): export core.O_NOFOLLOW (#1681)
Snider Jun 4, 2026
fe2f5d9
feat(core): export Core.WithContext for request-scoped derivation (#1…
Snider Jun 4, 2026
b57fdf1
feat(time): complete time wrapper — Date/Month/Weekday/Location/Timer…
Snider Jun 4, 2026
d4e2855
feat(os): wrap Chmod/Symlink/Readlink/CreateTemp/Executable + Err* se…
Snider Jun 4, 2026
9a8d3c0
feat(string): wrap Repeat/Fields/Count/EqualFold/Cut family + IndexAn…
Snider Jun 4, 2026
d101d03
feat(json): wrap streaming Encoder/Decoder + Number/Delim/Valid + ifa…
Snider Jun 4, 2026
29800b7
feat(reflect): add KindUintptr + TypeFor/NewValue/MakeSlice/MakeMap/C…
Snider Jun 4, 2026
43738c6
test(string): bench scan/cut family — IndexAny/ContainsAny/ContainsRu…
Snider Jun 4, 2026
7c95f96
test(os): rename TestOs_* -> TestOS_* — uppercase acronym (AX-1)
Snider Jun 4, 2026
4b0072a
feat(core): make CLI registration opt-in via WithCli()
Snider Jun 27, 2026
418146e
test(sha3): deepen SHA3_256/SHA3_256Hex triplets to pin the full cont…
Snider Jun 28, 2026
5f2a938
test(atomic): rename type-level triplets to the real symbol (AtomicBo…
Snider Jun 28, 2026
f47c765
test(log): consolidate legacy block to one test per symbol
Snider Jun 28, 2026
4813ed8
test(assert): combine 4 extra-case dups into helper triplets; rename …
Snider Jun 28, 2026
1b56ec5
test(exit): consolidate to one test per symbol
Snider Jun 28, 2026
9e6865d
test(ipc): consolidate shorthand into the canonical Core_* set
Snider Jun 28, 2026
3fea728
test(app): drop shorthand dups, name the c.App() accessor tests
Snider Jun 28, 2026
ed717b6
test(array): drop New dup, name the empty-construction edge
Snider Jun 28, 2026
7bc64eb
test(user): make UserCurrent_Ugly actually test UserCurrent
Snider Jun 28, 2026
b32d6b0
test(runtime): remove shorthand umbrella dups of the canonical triplets
Snider Jun 28, 2026
6e87209
test(scanner/drive/i18n/lsp): clear K3 singles
Snider Jun 28, 2026
5103935
test(time/reflect/fs/core): clear K3 — reference the real symbol; dro…
Snider Jun 28, 2026
29bee85
test(error): reference the real symbol for the flagged ErrorLog tests
Snider Jun 28, 2026
0405370
test(lock): drop umbrella dups, name the unique edges
Snider Jun 28, 2026
8fbdec5
test(config): drop umbrella dups, reference the real symbol
Snider Jun 28, 2026
26b2e00
test(command): fold scenario edges into canonical, drop dups
Snider Jun 28, 2026
32bec23
test(service): fold scenario edges into canonical, drop dups
Snider Jun 28, 2026
5a997b0
test(embed): rename misparsed descriptors, drop umbrella/dup tests
Snider Jun 28, 2026
b09b630
test(log): merge log_internal_test.go into log_test.go (package core)
Snider Jun 28, 2026
d8d0a88
test(info): merge info_internal_test.go away (init tests were Env dups)
Snider Jun 28, 2026
1825ff3
test(os/options/cli): clear K3 singles
Snider Jun 28, 2026
d430482
test(lsp): merge lsp_internal_test.go into lsp_test.go (package core)
Snider Jun 28, 2026
951cd6e
test(log): replace PackageLevelFunctions smoke with the missing Warn_…
Snider Jun 28, 2026
681f3b0
test(assert): split grouped failure-suite into per-symbol failure tests
Snider Jun 28, 2026
62ae7d8
test(os): conform TestOS_ -> TestOs_ to the file-prefix grammar
Snider Jun 28, 2026
20c563a
test(unsafe): conform to FilePrefix_Symbol grammar + complete triplets
Snider Jun 28, 2026
c833ea9
test(math,string): fill Clamp/Sign + Clone/LastIndex triplets
Snider Jun 28, 2026
b88d8ab
test(slice,array,io,random): fill pure-function triplets
Snider Jun 28, 2026
b11f5f9
test(config,core): split Feature umbrella into per-method triplets + …
Snider Jun 28, 2026
34b09b2
test(contract): fill CoreOption builder triplets
Snider Jun 28, 2026
170a339
test(runtime,registry): Core.Go/IsShutdown triplets + canonical GetOr…
Snider Jun 28, 2026
286e6a9
test(fs,info): fill ReadDir/Sub + OS/Env triplet gaps
Snider Jun 28, 2026
4e80e62
test(os): fill file-op + Setenv + Exit triplet gaps
Snider Jun 28, 2026
dfdabd3
test(cli_assert): AssertCLI + AssertCLIs triplets via a stub process.…
Snider Jun 28, 2026
7966f80
test(cli,time): CliRegister_Good + Unix/UnixMilli/After/NewTicker tri…
Snider Jun 28, 2026
ddc9f32
test(api): HTTP wrapper triplets (mux/strip/error/fs/fileserver/listen)
Snider Jun 28, 2026
9ca1ef6
test(lsp): LSPServe_Ugly — deadline-exceeded context returns immediately
Snider Jun 28, 2026
44aa0c1
test(assert): complete the per-symbol triplets — pass-path Good/Ugly
Snider Jun 28, 2026
9ee90dd
test: replace gamed AssertTrue(t,true) stubs with real outcome assert…
Snider Jun 28, 2026
16d71c5
test: differentiate identical Good/Bad/Ugly triplet bodies
Snider Jun 28, 2026
28d671b
docs(core/go): add architecture.md + development.md (close docs-gaps)
Snider Jun 28, 2026
bd080de
refactor(io): readAllSized returns Result, not (\[\]byte, error)
Snider Jun 28, 2026
b5a38ff
refactor(embed): internal helpers return Result, not (T, error)
Snider Jun 28, 2026
c3faa43
refactor(lsp): lspServer.writeMessage returns Result, not error
Snider Jun 28, 2026
488f9e1
refactor: wrap raw errors with WrapCode in the converted Result returns
Snider Jun 28, 2026
2d717db
refactor(path): PathWalk/PathWalkDir return Result, not error
Snider Jun 28, 2026
c319d88
refactor(lsp): readMessage returns Result, not (\[\]byte, error)
Snider Jun 28, 2026
f42549a
docs(math): Example Clamp/Sign/NaN/IsNaN
Snider Jun 28, 2026
44c8201
docs(result): Example Ok/Fail/ResultOf/MustCast
Snider Jun 28, 2026
de413fc
docs(string): Example Clone/IndexAny/ContainsAny/ContainsRune/Count/C…
Snider Jun 28, 2026
ee8fb94
docs(path): Example PathJoin/PathMatch/PathToSlash/PathEvalSymlinks/P…
Snider Jun 28, 2026
8822bd1
docs(config): Example ConfigVar.Get/IsSet + Feature.Name/Enable/Disab…
Snider Jun 28, 2026
1305788
docs(time): Example Date/Tick/NewTimer/AfterFunc
Snider Jun 28, 2026
37b488e
docs(info): Example OS/Arch/GoVersion/NumCPU/StackBuf
Snider Jun 28, 2026
b337393
docs(unsafe): Example PinSlice + PinnedView Ptr/Len/Bytes/Active/Release
Snider Jun 28, 2026
7829525
docs(slice): Example SliceClone/SliceSorted
Snider Jun 28, 2026
67f4b9f
docs(reflect): Example Zero/MakeSlice/MakeMap/MakeMapWithSize/CopyVal…
Snider Jun 28, 2026
03a00fc
docs(int,array): Example FormatUint, Array.IndexOf
Snider Jun 28, 2026
403f3fb
docs(options): Example Options.Float64/Duration
Snider Jun 28, 2026
cc5ee37
docs(io): move ExampleReadAll to io_example_test.go (matches ReadAll'…
Snider Jun 28, 2026
2933177
docs(json): Example JSONMarshalIndent
Snider Jun 28, 2026
a1875c1
docs(scanner): Example NewBufReader
Snider Jun 28, 2026
a8f8782
docs(context): Example TODO/WithValue/WithDeadline
Snider Jun 28, 2026
2ba4417
docs(registry,regexp): Example GetOrSet/GetIncludingDisabled + MatchS…
Snider Jun 28, 2026
3e0c5ba
docs(fs): Example ReadDir/ReadFSFile/Sub/WalkDir
Snider Jun 28, 2026
fe1706c
docs(format): move Sprint/Sprintf/Println/Print examples to format_ex…
Snider Jun 28, 2026
244ecfc
docs(atomic): Example Load/Store/Add/Swap for Bool/Int32/Int64/Uint32…
Snider Jun 28, 2026
9d2116d
docs(sync): Example Mutex/RWMutex/Once/WaitGroup/SyncMap methods
Snider Jun 28, 2026
d9f1cfa
docs(core): Example for Core accessors + move Core_Feature from confi…
Snider Jun 28, 2026
78e11f1
docs(os): Example for file ops, process, and environment helpers
Snider Jun 28, 2026
7d32eab
docs(action): Example Action.Enable/Disable/Enabled
Snider Jun 28, 2026
26ab35e
docs: Example LSPRegisterDiagnostic/DiagnosticSources/Serve, WithCli,…
Snider Jun 28, 2026
5298649
docs(cli,os): Example CliRegister + Cli Print/SetOutput/Run/PrintHelp…
Snider Jun 28, 2026
563499b
test(assert): benchmarks for all 27 Assert/Require helpers (success p…
Snider Jun 28, 2026
7de10c6
test(os): benchmarks for fs/process/env wrappers (Exit excluded — ter…
Snider Jun 28, 2026
961c8b8
test(lsp): benchmarks for the diagnostic pipeline (compute + sources)
Snider Jun 28, 2026
19568bf
test(cli): benchmarks for CliRegister + Cli Print/SetOutput/SetBanner…
Snider Jun 28, 2026
254294e
test(process): benchmarks for Process façade (Run/RunIn/RunWithEnv/St…
Snider Jun 28, 2026
fea15b8
test(fs): benchmarks for WriteStream/WriteAll/WalkSeq/WalkSeqSkip/Wal…
Snider Jun 28, 2026
dfefc54
test(core): benchmarks for Feature/WithContext/Must/RunResult/Run (+ …
Snider Jun 28, 2026
d5de191
test(config): benchmarks for Config.Group + Feature.Name/Enable/Disab…
Snider Jun 28, 2026
fdd208d
test(command,signal): benchmarks for Command tree + Signal façade
Snider Jun 28, 2026
1faeb20
test(time,log): benchmarks for Sleep/After/Tick/timers + Log Debug/Wa…
Snider Jun 28, 2026
2db597e
test(time,log): timers/Sleep + Log methods, LogPanic.Recover, and pac…
Snider Jun 28, 2026
4a3dd36
test(error,action): ErrorLog.Must/ErrorPanic.Recover/SafeGo + Core.Pe…
Snider Jun 28, 2026
9ee58ef
test(unsafe,reflect,string,array): PinnedView Len/Bytes/Active, MakeM…
Snider Jun 28, 2026
7672883
test(contract,template): WithService + ParseTemplateFiles
Snider Jun 28, 2026
ac055cc
test(net): benchmarks for NetListen/NetListenPacket/NetDial/NetDialTi…
Snider Jun 28, 2026
779653f
test(assert): typed-compare benches (uint64/float64 ordering branches)
Snider Jun 28, 2026
2e5dccc
test(runtime): benchmarks for Runtime.ServiceStartup/ServiceShutdown …
Snider Jun 28, 2026
18bc35c
test(cli_assert): benchmark AssertCLI (success path; AssertCLIs needs…
Snider Jun 28, 2026
65729ee
test(embed): MountEmbed/EmbedFS (compile-time embed.FS) + ScanAssets/…
Snider Jun 28, 2026
786650b
test(embed): benchmark Extract (covers isTemplate/renderPath/copyFile)
Snider Jun 28, 2026
f409e76
test(data): benchmark Data.Extract (mount + extract path)
Snider Jun 28, 2026
fb959ae
test(api): benchmarks for API.Stream/Call + Core.RemoteAction (mock p…
Snider Jun 28, 2026
af9c188
test(alloc): allocation-regression gates for hot primitives (AllocsPe…
Snider Jun 28, 2026
7194031
test(alloc): extend regression gates — atomics, more math, Result.Or,…
Snider Jun 28, 2026
c1cf230
perf(lsp): compile naming-diagnostic regexes once, not per call
Snider Jun 28, 2026
476593e
test(alloc): gate LSPComputeDiagnostics at <=70 allocs (locks the reg…
Snider Jun 28, 2026
6551be4
test(lsp): white-box benchmarks for the JSON-RPC server loop
Snider Jun 28, 2026
8459346
test(bench): white-box benches for unexported helpers + Println/HTTPL…
Snider Jun 28, 2026
1f59e31
perf(utils): pre-size FilterArgs result slice (was unpresized regrow …
Snider Jun 28, 2026
da65052
perf: pre-size slice builders in Data names / IPC query results / Reg…
Snider Jun 28, 2026
e2ba33a
perf: pre-size remaining slice builders (EnabledFeatures, Startables/…
Snider Jun 28, 2026
a088bc3
test(alloc): gate FilterArgs at its pre-sized floor (1 alloc)
Snider Jun 28, 2026
597d072
feat(core): add generic Pool[T] — mutex-guarded LIFO free-list
Snider Jul 5, 2026
22a06aa
feat(core): Coalesce, FirstPositive, SliceEqual, Result.Err — dedup p…
Snider Jul 5, 2026
4058238
feat(core): FirstNonBlank — whitespace-aware first-meaningful-string
Snider Jul 5, 2026
d86a36a
feat(core): MapString — safe typed string accessor for map[K]any
Snider Jul 5, 2026
15a005f
fix(core): restore library build on dev — PathWalkDir Result, lock re…
Snider Jul 5, 2026
c0ebb9e
fix(core): complete the incomplete error->Result migration + stale ex…
Snider Jul 5, 2026
fca6593
Merge fix/core-dev-build — fixed latest core dev + dedup primitives
Snider Jul 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test(api): benchmarks for API.Stream/Call + Core.RemoteAction (mock p…
…rotocol; covers extractScheme)

Co-Authored-By: Virgil <virgil@lethean.io>
  • Loading branch information
Snider and Snider committed Jun 28, 2026
commit fb959aebd893e2bc18b6aea4546851c55dcee4a7
48 changes: 48 additions & 0 deletions api_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,54 @@ func BenchmarkNewHTTPTestTLSServer(b *B) {
}
}

// --- remote-endpoint surface (Drive + protocol resolution) ---
//
// A mock protocol factory stands in for a live transport so these bench
// the resolve + scheme-extraction + call dispatch path, not the network.
// HTTPListenAndServe is omitted — it blocks serving until shut down.

var apiSinkResult Result

func apiRemoteFixture() *Core {
c := New()
c.API().RegisterProtocol("http", mockFactory("pong"))
c.Drive().New(NewOptions(
Option{Key: "name", Value: "charon"},
Option{Key: "transport", Value: "http://127.0.0.1:9101/mcp"},
))
return c
}

func BenchmarkAPI_Stream(b *B) {
c := apiRemoteFixture()
b.ReportAllocs()
for i := 0; i < b.N; i++ {
r := c.API().Stream("charon")
if r.OK {
r.Value.(Stream).Close()
}
}
}

func BenchmarkAPI_Call(b *B) {
c := apiRemoteFixture()
opts := NewOptions()
b.ReportAllocs()
for i := 0; i < b.N; i++ {
apiSinkResult = c.API().Call("charon", "agentic.status", opts)
}
}

func BenchmarkCore_RemoteAction(b *B) {
c := apiRemoteFixture()
ctx := Background()
opts := NewOptions()
b.ReportAllocs()
for i := 0; i < b.N; i++ {
apiSinkResult = c.RemoteAction("charon:agentic.status", ctx, opts)
}
}

// HTTPListenAndServe + RemoteAction are not benched — they bind a real
// socket / make a real outbound HTTP call. A unit-bench cannot do that
// deterministically. They are exercised end-to-end in api_test.go.