Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "external/go"]
path = external/go
url = https://github.com/dappcore/go.git
branch = dev
42 changes: 42 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!-- SPDX-License-Identifier: EUPL-1.2 -->

# Agent Notes

This repository is the Core Go store module. Keep changes narrow, preserve the
public store contracts, and verify from the `go/` module before handing work
back.

## Code Map

- `go/store.go` owns the core SQLite-backed key-value store API and lifecycle.
- `go/events.go` contains mutation events, watchers, and callbacks.
- `go/scope.go` contains namespace isolation and quota enforcement.
- `go/journal.go` contains journal persistence and query helpers.
- `go/workspace.go` contains workspace buffering, commit flow, and orphan recovery.
- `go/compact.go` contains cold archive generation.
- `docs/` contains package docs, architecture notes, and development guidance.

## Compliance Rules

Follow the v0.9.0 Core compliance shape. Use `dappco.re/go` primitives for JSON,
errors, formatting, strings, bytes, filesystem, process, and environment helpers
whenever a wrapper exists. Do not add files named `ax7*.go`, versioned test
files, compatibility shims, or monolithic compliance dumps.

For every production source file with public symbols, keep tests and examples
beside that file. Test names use `Test<File>_<Symbol>_Good`,
`Test<File>_<Symbol>_Bad`, and `Test<File>_<Symbol>_Ugly`. Examples use
`Example<Symbol>` or a valid lowercase suffix variant.

## Before Stopping

Use the exact repository gate:

```bash
cd go
GOWORK=off GOPROXY=direct GOSUMDB=off go build ./...
GOWORK=off GOPROXY=direct GOSUMDB=off go vet ./...
GOWORK=off GOPROXY=direct GOSUMDB=off go test -count=1 -short ./...
cd ..
bash /Users/snider/Code/core/go/tests/cli/v090-upgrade/audit.sh .
```
1 change: 1 addition & 0 deletions external/go
Submodule go added at d661b7
11 changes: 11 additions & 0 deletions go.work
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
go 1.26.0

// Workspace mode for development: pulls local code from external/ checkouts.
//
// CI and release verification use GOWORK=off so go/go.mod remains the
// reproducible contract.

use (
./go
./external/go
)
24 changes: 12 additions & 12 deletions bench_test.go → go/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ func BenchmarkGetAll_VaryingSize(b *testing.B) {
for _, size := range sizes {
b.Run(core.Sprintf("size=%d", size), func(b *testing.B) {
storeInstance, err := New(testMemoryDatabasePath)
if err != nil {
b.Fatal(err)
if !err.OK {
b.Fatal(err.Error())
}
defer func() { _ = storeInstance.Close() }()

Expand All @@ -38,8 +38,8 @@ func BenchmarkGetAll_VaryingSize(b *testing.B) {

func BenchmarkSetGet_Parallel(b *testing.B) {
storeInstance, err := New(testMemoryDatabasePath)
if err != nil {
b.Fatal(err)
if !err.OK {
b.Fatal(err.Error())
}
defer func() { _ = storeInstance.Close() }()

Expand All @@ -59,8 +59,8 @@ func BenchmarkSetGet_Parallel(b *testing.B) {

func BenchmarkCount_10K(b *testing.B) {
storeInstance, err := New(testMemoryDatabasePath)
if err != nil {
b.Fatal(err)
if !err.OK {
b.Fatal(err.Error())
}
defer func() { _ = storeInstance.Close() }()

Expand All @@ -78,8 +78,8 @@ func BenchmarkCount_10K(b *testing.B) {

func BenchmarkDelete(b *testing.B) {
storeInstance, err := New(testMemoryDatabasePath)
if err != nil {
b.Fatal(err)
if !err.OK {
b.Fatal(err.Error())
}
defer func() { _ = storeInstance.Close() }()

Expand All @@ -98,8 +98,8 @@ func BenchmarkDelete(b *testing.B) {

func BenchmarkSetWithTTL(b *testing.B) {
storeInstance, err := New(testMemoryDatabasePath)
if err != nil {
b.Fatal(err)
if !err.OK {
b.Fatal(err.Error())
}
defer func() { _ = storeInstance.Close() }()

Expand All @@ -113,8 +113,8 @@ func BenchmarkSetWithTTL(b *testing.B) {

func BenchmarkRender(b *testing.B) {
storeInstance, err := New(testMemoryDatabasePath)
if err != nil {
b.Fatal(err)
if !err.OK {
b.Fatal(err.Error())
}
defer func() { _ = storeInstance.Close() }()

Expand Down
Loading
Loading