Commit graph

4 commits

Author SHA1 Message Date
Snider
0911d5ad7b fix: add usage-example comments to all 37 exported functions (AX Principle 2)
core/go was violating its own RFC-025 Principle 2: every exported
function must have a comment showing HOW with real values.

37 functions had no comments — mostly one-liner accessors on Core,
Config, ServiceRuntime, IPC, and Options. Now every exported function
in every source file has a usage-example comment.

AX Principle 2 compliance: 0/37 → 37/37 (100%).

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-25 18:07:42 +00:00
Snider
94e1f405fc fix: Result.New handles (value, error) pairs correctly + embed test fixes
Root cause: Result.New didn't mark single-value results as OK=true,
breaking Mount/ReadDir/fs helpers that used Result{}.New(value, err).

Also: data_test.go and embed_test.go updated for Options struct,
doc comments updated across data.go, drive.go, command.go, contract.go.

All tests green. Coverage 82.2%.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-24 22:09:02 +00:00
Snider
a49bc46bc7 feat: Options struct + Result methods + WithOption convenience
Options is now a proper struct with New(), Set(), Get(), typed accessors.
Result gains New(), Result(), Get() methods on the struct.
WithOption("key", value) convenience for core.New().

options_test.go: 22 tests passing against the new contract.
Other test files mechanically updated for compilation.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-24 22:09:02 +00:00
Snider
fbd646456a refactor: flatten polyglot layout to standard Go module
Move source from go/core/ to root, tests from go/tests/ to tests/.
Module path dappco.re/go/core resolves cleanly — builds and tests pass.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-21 08:27:14 +00:00
Renamed from go/core/options.go (Browse further)