test(ax): add version example coverage

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Virgil 2026-03-30 18:13:30 +00:00
parent 553d149d47
commit 3769af2513
3 changed files with 18 additions and 0 deletions

View file

@ -423,6 +423,7 @@ Every exported function MUST have a usage-example comment:
## Changelog
- 2026-03-30: `version.go` now has an example companion, closing the last build-relevant source file without example coverage.
- 2026-03-30: `pkg/agentic/commands_workspace.go` now has a matching example companion, closing the last agentic source file without example coverage.
- 2026-03-30: plan files and review queue rate-limit state now use `WriteAtomic`, keeping JSON state writes aligned with the AX safe-write convention.
- 2026-03-30: transport helpers preserve request and read causes, brain direct API calls surface upstream bodies, and review queue retry parsing no longer uses `MustCompile`.

View file

@ -423,6 +423,7 @@ Every exported function MUST have a usage-example comment:
## Changelog
- 2026-03-30: `version.go` now has an example companion, closing the last build-relevant source file without example coverage.
- 2026-03-30: `pkg/agentic/commands_workspace.go` now has a matching example companion, closing the last agentic source file without example coverage.
- 2026-03-30: plan files and review queue rate-limit state now use `WriteAtomic`, keeping JSON state writes aligned with the AX safe-write convention.
- 2026-03-30: plan create tests now assert the documented `core.ID()` shape and repeated plan creation produces unique IDs, keeping the plan contract aligned with the simplified generator.

16
version_example_test.go Normal file
View file

@ -0,0 +1,16 @@
// SPDX-License-Identifier: EUPL-1.2
package agent
import (
core "dappco.re/go/core"
)
func ExampleVersion() {
oldVersion := Version
Version = "0.15.0"
defer func() { Version = oldVersion }()
core.Println(Version)
// Output: 0.15.0
}