Files
archie/.okf/codebase/internal/agentexec/subprocess_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/agentexec/subprocess_test.go (247 lines). internal/agentexec/subprocess_test.go
go
source
2026-07-21T18:36:22Z subprocess_test.go Module

Module subprocess_test.go

Path: internal/agentexec/subprocess_test.go
Lines: 247

Snippet Preview

package agentexec

import (
	"context"
	"encoding/json"
	"errors"
	"fmt"
	"os"
	"os/exec"
	"path/filepath"
	"strings"
	"testing"
	"time"
)

func TestSubprocessRunnerRoundTrip(t *testing.T) {
	req := testRequest()
	result, err := helperRunner("success").Run(context.Background(), "/workspace", req)
	if err != nil {
		t.Fatal(err)
	}
	if result.Summary != "from child" || result.TaskID != req.TaskID || result.Attempt != req.Attempt {
		t.Fatalf("result = %#v", result)
	}
}

func TestSubprocessRunnerReturnsStampedWorkerError(t *testing.T) {
	req := testRequest()
	result, err := helperRunner("worker-error").Run(context.Background(), "/workspace", req)
	if err == nil || err.Error() != "provider unavailable" {