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>
37 lines
1.0 KiB
Go
37 lines
1.0 KiB
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
"testing"
|
|
)
|
|
|
|
// TestRunCheckHealth_UnreachableServer exercises the DSN-building branch in
|
|
// runCheckHealth (bd-h5k7). With metadata.json pointing at an unreachable
|
|
// port, the code should resolve Password via GetDoltServerPasswordForPort
|
|
// without panicking, fail the ping silently, and return.
|
|
func TestRunCheckHealth_UnreachableServer(t *testing.T) {
|
|
// Force the resolved port to 1 (guaranteed unreachable) so we don't
|
|
// depend on any real server.
|
|
t.Setenv("BEADS_DOLT_SERVER_PORT", "1")
|
|
|
|
tmpDir := t.TempDir()
|
|
beadsDir := filepath.Join(tmpDir, ".beads")
|
|
if err := os.MkdirAll(beadsDir, 0o755); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
meta := `{
|
|
"database": "beads.db",
|
|
"dolt_mode": "server",
|
|
"dolt_server_host": "127.0.0.1",
|
|
"dolt_server_user": "root",
|
|
"dolt_database": "beads"
|
|
}`
|
|
if err := os.WriteFile(filepath.Join(beadsDir, "metadata.json"), []byte(meta), 0o644); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
// Should not panic. Silent exit on ping failure is the expected path.
|
|
runCheckHealth(tmpDir)
|
|
}
|