Commit graph

3 commits

Author SHA1 Message Date
Snider
5be20af4b0 feat: eliminate fmt, string concat — add core.Println, use Concat/Path everywhere
New primitive: core.Println() wraps fmt.Println.

Replaced across all test + example files:
- fmt.Println → Println (17 example files)
- fmt.Sprintf → Concat + Sprint
- dir + "/file" → Path(dir, "file") (path security)
- "str" + var → Concat("str", var) (AX consistency)

"fmt" import is now zero across all test files.
String concat with + is zero across all test files.

Remaining 9 stdlib imports (all Go infrastructure):
testing, context, time, sync, embed, io/fs, bytes, gzip, base64

558 tests, 84.5% coverage.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-25 19:42:39 +00:00
Snider
8b905f3a4a feat: per-file example tests — action, registry, fs, api, string, path, service, error, array
33 new examples across 8 dedicated files. Removed phantom CleanPath
(in RFC spec but never implemented — spec drift caught by examples).

545 tests total, 84.8% coverage. Every major primitive has compilable
examples that serve as test, documentation seed, and godoc content.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-25 18:29:24 +00:00
Snider
ecf6485f95 feat: add 22 Example tests — documentation seeds + coverage + godoc
Go Example functions serve triple duty:
- Run as tests (count toward coverage)
- Show in godoc (usage documentation)
- Seed for Sonnet to write user guides

Covers: New, Options, Result, Action (register/invoke/list), Task,
Registry (Set/Get/Lock/Seal), Entitlement (default/custom/NearLimit),
Process (permission model), JSON, ID, ValidateName, SanitisePath,
Command, Config, Error.

512 tests total, 84.8% coverage.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-25 18:21:52 +00:00