Files
archie/.okf/codebase/internal/agentexec/nats_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.1 KiB

description, resource, tags, timestamp, title, type
description resource tags timestamp title type
Source module internal/agentexec/nats_test.go (291 lines). internal/agentexec/nats_test.go
go
source
2026-07-21T18:36:22Z nats_test.go Module

Module nats_test.go

Path: internal/agentexec/nats_test.go
Lines: 291

Snippet Preview

package agentexec

import (
	"context"
	"encoding/json"
	"log/slog"
	"testing"
	"time"

	"github.com/nats-io/nats-server/v2/server"
	natssrv "github.com/nats-io/nats-server/v2/test"
	natsio "github.com/nats-io/nats.go"
	"github.com/nats-io/nats.go/jetstream"

	arnats "github.com/samcharles93/archie-core/internal/nats"
)

// ── helpers ──────────────────────────────────────────────────────────

type mockRunner struct{}

func (m *mockRunner) Run(_ context.Context, _ string, req Request) (Result, error) {
	return Result{
		Version:    ProtocolVersion,
		TaskID:     req.TaskID,
		Attempt:    req.Attempt,
		Stage:      req.Stage,
		Status:     StatusPassed,
		Summary:    "mock:" + req.Mission,
		TokensUsed: 10,