Files
archie/.okf/codebase/internal/gate/gateeval/yaegi_test.md
T
sam 7c34bdae5a okf: scaffold knowledge bundle and MCP server config
Adds a harvested .okf/ knowledge bundle (codebase concepts + starter
architecture/services/rules scaffolding) and .mcp.json pointing at the
shared okf MCP service (http://localhost:8765/archie-core/), which
serves multiple projects' bundles from a single process.
2026-07-22 04:36:50 +10:00

1.0 KiB

description, resource, tags, timestamp, title, type
description resource tags timestamp title type
Source module internal/gate/gateeval/yaegi_test.go (145 lines). internal/gate/gateeval/yaegi_test.go
go
source
2026-07-21T18:36:22Z yaegi_test.go Module

Module yaegi_test.go

Path: internal/gate/gateeval/yaegi_test.go
Lines: 145

Snippet Preview

package gateeval

import (
	"os"
	"path/filepath"
	"testing"

	"github.com/samcharles93/archie-core/internal/gate"
)

func writeGateScript(t *testing.T, dir, src string) {
	t.Helper()
	archieDir := filepath.Join(dir, ".archie")
	if err := os.MkdirAll(archieDir, 0o755); err != nil {
		t.Fatal(err)
	}
	if err := os.WriteFile(filepath.Join(archieDir, "gate.go"), []byte(src), 0o644); err != nil {
		t.Fatal(err)
	}
}

func TestEvaluateNoScript(t *testing.T) {
	dir := t.TempDir()
	findings, err := Evaluate(gate.GateContext{Dir: dir})
	if err != nil {
		t.Fatalf("Evaluate() error = %v, want nil (no script configured)", err)
	}
	if findings != nil {
		t.Fatalf("Evaluate() findings = %v, want nil", findings)
	}