Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as opaque submodule gitlinks on GitHub) into fully-tracked first-party content. AITM now merges its 7 vendored repos as first-party engines: - memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts - git: vendored C git (bundled binary) + gitnexus (in-process code intelligence) - agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess) Includes the full session's product build: Gitgram web/mobile/backend features, AITM website/CLI/MCP, the unified memory layer, engine build tooling (scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md), and extensive test suites. Build artifacts, node_modules, external/, and gemini-cli are gitignored. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
133 lines
3.2 KiB
Go
133 lines
3.2 KiB
Go
//go:build cgo && integration
|
|
// +build cgo,integration
|
|
|
|
package fixtures
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/steveyegge/beads/internal/storage/dolt"
|
|
"github.com/steveyegge/beads/internal/testutil"
|
|
"github.com/steveyegge/beads/internal/types"
|
|
)
|
|
|
|
func TestLargeDolt(t *testing.T) {
|
|
testutil.RequireDoltContainer(t)
|
|
store, err := dolt.New(context.Background(), &dolt.Config{Path: t.TempDir()})
|
|
if err != nil {
|
|
t.Fatalf("Failed to create storage: %v", err)
|
|
}
|
|
defer store.Close()
|
|
|
|
ctx := context.Background()
|
|
|
|
// Initialize database with prefix
|
|
if err := store.SetConfig(ctx, "issue_prefix", "bd-"); err != nil {
|
|
t.Fatalf("Failed to set issue_prefix: %v", err)
|
|
}
|
|
|
|
if err := LargeDolt(ctx, store); err != nil {
|
|
t.Fatalf("LargeDolt failed: %v", err)
|
|
}
|
|
|
|
// Verify issue count
|
|
allIssues, err := store.SearchIssues(ctx, "", types.IssueFilter{})
|
|
if err != nil {
|
|
t.Fatalf("Failed to search issues: %v", err)
|
|
}
|
|
|
|
if len(allIssues) != 10000 {
|
|
t.Errorf("Expected 10000 issues, got %d", len(allIssues))
|
|
}
|
|
|
|
// Verify we have epics, features, and tasks
|
|
var epics, features, tasks int
|
|
for _, issue := range allIssues {
|
|
switch issue.IssueType {
|
|
case types.TypeEpic:
|
|
epics++
|
|
case types.TypeFeature:
|
|
features++
|
|
case types.TypeTask:
|
|
tasks++
|
|
}
|
|
}
|
|
|
|
if epics == 0 || features == 0 || tasks == 0 {
|
|
t.Errorf("Missing issue types: epics=%d, features=%d, tasks=%d", epics, features, tasks)
|
|
}
|
|
|
|
t.Logf("Created %d epics, %d features, %d tasks", epics, features, tasks)
|
|
}
|
|
|
|
func TestXLargeDolt(t *testing.T) {
|
|
if testing.Short() {
|
|
t.Skip("Skipping XLarge test in short mode")
|
|
}
|
|
testutil.RequireDoltContainer(t)
|
|
|
|
store, err := dolt.New(context.Background(), &dolt.Config{Path: t.TempDir()})
|
|
if err != nil {
|
|
t.Fatalf("Failed to create storage: %v", err)
|
|
}
|
|
defer store.Close()
|
|
|
|
ctx := context.Background()
|
|
|
|
// Initialize database with prefix
|
|
if err := store.SetConfig(ctx, "issue_prefix", "bd-"); err != nil {
|
|
t.Fatalf("Failed to set issue_prefix: %v", err)
|
|
}
|
|
|
|
if err := XLargeDolt(ctx, store); err != nil {
|
|
t.Fatalf("XLargeDolt failed: %v", err)
|
|
}
|
|
|
|
// Verify issue count
|
|
allIssues, err := store.SearchIssues(ctx, "", types.IssueFilter{})
|
|
if err != nil {
|
|
t.Fatalf("Failed to search issues: %v", err)
|
|
}
|
|
|
|
if len(allIssues) != 20000 {
|
|
t.Errorf("Expected 20000 issues, got %d", len(allIssues))
|
|
}
|
|
}
|
|
|
|
func TestLargeFromJSONL(t *testing.T) {
|
|
if testing.Short() {
|
|
t.Skip("Skipping JSONL test in short mode")
|
|
}
|
|
testutil.RequireDoltContainer(t)
|
|
|
|
store, err := dolt.New(context.Background(), &dolt.Config{Path: t.TempDir()})
|
|
if err != nil {
|
|
t.Fatalf("Failed to create storage: %v", err)
|
|
}
|
|
defer store.Close()
|
|
|
|
ctx := context.Background()
|
|
|
|
// Initialize database with prefix
|
|
if err := store.SetConfig(ctx, "issue_prefix", "bd-"); err != nil {
|
|
t.Fatalf("Failed to set issue_prefix: %v", err)
|
|
}
|
|
|
|
tempDir := t.TempDir()
|
|
|
|
if err := LargeFromJSONL(ctx, store, tempDir); err != nil {
|
|
t.Fatalf("LargeFromJSONL failed: %v", err)
|
|
}
|
|
|
|
// Verify issue count
|
|
allIssues, err := store.SearchIssues(ctx, "", types.IssueFilter{})
|
|
if err != nil {
|
|
t.Fatalf("Failed to search issues: %v", err)
|
|
}
|
|
|
|
if len(allIssues) != 10000 {
|
|
t.Errorf("Expected 10000 issues, got %d", len(allIssues))
|
|
}
|
|
}
|