Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
004ba87
feat(sdk/ts): add multimodal helpers for image, audio, file inputs/ou…
santoshkumarradha Apr 1, 2026
2707c19
refactor(ui): migrate icons from Phosphor to Lucide
santoshkumarradha Apr 4, 2026
b0b9c1f
refactor(ui): remove MCP, Authorization, DID/VC, Packages pages — fea…
santoshkumarradha Apr 4, 2026
de49a9c
refactor(ui): migrate to standard shadcn design tokens, remove custom…
santoshkumarradha Apr 4, 2026
4f7de4d
Merge branch 'worktree-agent-aeca2023' into feat/ui-revamp-product-re…
santoshkumarradha Apr 4, 2026
bc9728e
refactor(ui): remove 15 duplicate components, consolidate to single v…
santoshkumarradha Apr 4, 2026
92f062e
feat(ui): new app shell — minimal sidebar, health strip, 5-item nav, …
santoshkumarradha Apr 4, 2026
729592a
feat(ui): add TanStack Query data layer with query hooks for runs, ag…
santoshkumarradha Apr 4, 2026
b948a63
feat(ui): build Runs page — unified view replacing Executions + Workf…
santoshkumarradha Apr 4, 2026
9004aa7
feat(ui): build Playground page — test reasoners with custom input, v…
santoshkumarradha Apr 4, 2026
4a14419
feat(ui): new operations-first dashboard with issues banner and recen…
santoshkumarradha Apr 4, 2026
4cedbba
feat(ui): build simplified Agents page — node cards with inline reaso…
santoshkumarradha Apr 4, 2026
413a517
feat(ui): build Settings page — tabs for General, Observability, Iden…
santoshkumarradha Apr 4, 2026
70f4e7b
feat(ui): add URL redirects from old routes to new pages
santoshkumarradha Apr 4, 2026
c0ca554
feat(ui): build Run Detail page — trace view with step detail panel
santoshkumarradha Apr 4, 2026
8f10782
fix(ui): dashboard — compact rows, stats strip, fix duration formatting
santoshkumarradha Apr 4, 2026
6ad9376
fix(ui): agents page — compact collapsed cards, dense reasoner list, …
santoshkumarradha Apr 4, 2026
9ed472c
fix(ui): runs page — compact table rows, fix duration formatting
santoshkumarradha Apr 4, 2026
c7c8b91
fix(ui): agents as clean list, fix sidebar, fix dashboard data, fix t…
santoshkumarradha Apr 4, 2026
19e4c22
fix(ui): sidebar — proper shadcn implementation, icon-rail with toolt…
santoshkumarradha Apr 4, 2026
39ef67a
feat(ui): playground — cURL copy, async cURL, schema display, better …
santoshkumarradha Apr 4, 2026
3578f7b
fix(ui): sidebar default open, settings — API info, fix DID display, …
santoshkumarradha Apr 4, 2026
10d143f
fix(ui): P0 fixes — routes, health strip data, agent filter, action b…
santoshkumarradha Apr 4, 2026
c5539fe
feat(ui): step detail — JSON syntax highlighting, cURL/input/output c…
santoshkumarradha Apr 4, 2026
f90f5c0
feat(ui): runs table — sortable columns, agent column, better column …
santoshkumarradha Apr 4, 2026
b792a69
feat(ui): run detail — integrate ReactFlow DAG as graph view toggle
santoshkumarradha Apr 4, 2026
cc02f47
feat(ui): runs table — ID copy, agent.reasoner format, I/O preview, e…
santoshkumarradha Apr 4, 2026
3fda57d
feat(ui): run detail — full height, replay, DID badge, export dropdow…
santoshkumarradha Apr 4, 2026
b86dbf9
feat(ui): trace view — step numbers, relative times, status colors, g…
santoshkumarradha Apr 4, 2026
739ce08
feat(ui): command palette — Cmd+K for navigation and quick actions
santoshkumarradha Apr 4, 2026
9807f52
feat(ui): run comparison page — side-by-side step diff with divergenc…
santoshkumarradha Apr 4, 2026
84c9f96
feat(ui): virtual scrolling for trace, HITL approval UI in step detail
santoshkumarradha Apr 4, 2026
98e6e39
feat(ui): SSE live updates, connection indicator, webhook delivery st…
santoshkumarradha Apr 4, 2026
002a41d
fix(ui): remove double scroll in trace, add I/O diff to comparison, s…
santoshkumarradha Apr 4, 2026
60c3da8
fix(ui): graph view — edges visible, node clicks populate right panel…
santoshkumarradha Apr 4, 2026
940d5a1
fix(ui): graph edges invisible — wrap HSL vars in hsl() for SVG strok…
santoshkumarradha Apr 4, 2026
790772c
web(ui): revamp layout, filters, and health strip
santoshkumarradha Apr 4, 2026
299de09
feat(web): UI revamp — components, pages, logos, and shared UI utilities
santoshkumarradha Apr 4, 2026
59a03fd
feat(ui): inset shell, unified theme tokens, runs workflow updates
santoshkumarradha Apr 4, 2026
0bdaeb3
fix(web-ui): run detail workflow graph renders with valid React Flow …
santoshkumarradha Apr 4, 2026
17630e1
feat(ui): runs/step detail, DAG polish, execution APIs, provenance card
santoshkumarradha Apr 4, 2026
32081e3
feat(web): workflow DAG controls, dashboard/settings polish, runs que…
santoshkumarradha Apr 4, 2026
797edc0
feat(web): playground and reasoner combobox updates
santoshkumarradha Apr 4, 2026
6316c57
feat: access management UI, verify provenance, governance hooks
santoshkumarradha Apr 4, 2026
bd7a33c
fix(web): app shell, navigation, run detail, verify provenance polish
santoshkumarradha Apr 4, 2026
157a015
feat(web): dashboard workload components and Figma/shadcn audit doc
santoshkumarradha Apr 4, 2026
bad21a3
style(web): broad UI polish across shell, tables, DAG, and design tokens
santoshkumarradha Apr 4, 2026
f65606f
chore: remove internal UI planning docs and stray tooling files
santoshkumarradha Apr 4, 2026
2deba7f
fix: address review findings across Go handlers, TS SDK, and web UI
santoshkumarradha Apr 4, 2026
2ae02d9
fix: simplify review fixes — stale state, import style, destructuring…
santoshkumarradha Apr 4, 2026
543ea48
refactor: extract shared handler, reuse SortableHeaderCell, consolida…
santoshkumarradha Apr 4, 2026
6afc3d1
fix: move ErrorBoundary inside Router to preserve routing context
santoshkumarradha Apr 4, 2026
a0fdcdf
style(web): redesign sign-in page with shadcn components and app bran…
santoshkumarradha Apr 4, 2026
7049ae4
merge: resolve conflicts with main
santoshkumarradha Apr 4, 2026
f46c0d5
fix: resolve all tsc -b strict build errors for CI
santoshkumarradha Apr 4, 2026
6b07be2
security: prevent SSRF in DID resolution and custom resolver endpoints
santoshkumarradha Apr 4, 2026
ca722a0
chore: stacked branch for UI live-update follow-up work
santoshkumarradha Apr 5, 2026
b021d41
feat(web): unified SSE sync and adaptive polling for live UI
santoshkumarradha Apr 5, 2026
350e5ed
fix(web): match polling and badges to the SSE channel that feeds each…
santoshkumarradha Apr 5, 2026
090b1f6
agit sync
santoshkumarradha Apr 5, 2026
5b1ad0b
agit sync
santoshkumarradha Apr 5, 2026
6183faa
fix(web): tighten live update gating
santoshkumarradha Apr 5, 2026
04cb835
feat: agent node process logs (Python NDJSON, CP proxy, UI panel)
santoshkumarradha Apr 5, 2026
2b9379c
docs: document node log proxy and agent log env vars in .env.example
santoshkumarradha Apr 5, 2026
e7569ad
fix: align .env.example log vars with Python node_logs.py
santoshkumarradha Apr 5, 2026
1f4497e
agit sync
santoshkumarradha Apr 5, 2026
afed2ce
agit sync
santoshkumarradha Apr 5, 2026
207527e
chore: log-demo compose, UI proxy functional test, example heartbeats
santoshkumarradha Apr 5, 2026
fda9986
fix(docker): wait for CP health before log-demo agents start
santoshkumarradha Apr 5, 2026
11b79a5
feat(scripts): host log-demo stack when Docker is unavailable
santoshkumarradha Apr 5, 2026
4cce125
feat(ui,sdks): process log filters, structured rows, NDJSON level/source
santoshkumarradha Apr 5, 2026
44c07c4
fix: tighten audit verification and multimodal IO
santoshkumarradha Apr 5, 2026
96195ad
feat(ui): agents page heading, nav labels, compact responsive logs
santoshkumarradha Apr 5, 2026
7ebe5c5
fix(sdk/python): drop unused Generator import (ruff F401)
santoshkumarradha Apr 5, 2026
8ed8c25
fix(sdk/ts): qualify Express Response in flush cast (TS2352)
santoshkumarradha Apr 5, 2026
b44ed42
Merge remote-tracking branch 'origin/main' into feat/ui-revamp-produc…
santoshkumarradha Apr 5, 2026
3e91b02
merge: fold live updates and node logs into ui revamp
santoshkumarradha Apr 5, 2026
95b2087
fix(ci): harden DID fetches and stabilize node log proxy test
santoshkumarradha Apr 5, 2026
9ddbdf7
agit sync
santoshkumarradha Apr 5, 2026
6adc669
fix(web): avoid format strings in node action logs
santoshkumarradha Apr 5, 2026
e9a7926
fix(cli): keep VC verification offline-only
santoshkumarradha Apr 5, 2026
969aea1
fix(tests): write node log marker into process ring
santoshkumarradha Apr 5, 2026
e57c306
docs: add execution observability RFC
santoshkumarradha Apr 5, 2026
31420b0
agit sync
santoshkumarradha Apr 5, 2026
e0950b9
agit sync
santoshkumarradha Apr 5, 2026
91b2d2b
agit sync
santoshkumarradha Apr 5, 2026
99885ff
agit sync
santoshkumarradha Apr 5, 2026
f087db6
agit sync
santoshkumarradha Apr 5, 2026
e18414e
agit sync
santoshkumarradha Apr 5, 2026
2f375ab
agit sync
santoshkumarradha Apr 5, 2026
c93d529
feat: add execution logging transport
santoshkumarradha Apr 5, 2026
b1741ed
feat(py): add structured execution logging
santoshkumarradha Apr 5, 2026
db0b50c
agit sync
santoshkumarradha Apr 5, 2026
40039e6
feat(web): unify execution observability panel
santoshkumarradha Apr 5, 2026
32638df
Remove local plandb database from repo
santoshkumarradha Apr 5, 2026
9f46d1d
fix demo execution observability flow
santoshkumarradha Apr 5, 2026
6bde0ab
refactor run detail into execution and logs tabs
santoshkumarradha Apr 5, 2026
f772213
refine execution logs density
santoshkumarradha Apr 5, 2026
e7ee815
agit sync
santoshkumarradha Apr 5, 2026
e309984
polish execution logs panel header
santoshkumarradha Apr 5, 2026
7cf61df
refine raw node log console
santoshkumarradha Apr 5, 2026
a390a5d
polish process log filter toolbar
santoshkumarradha Apr 5, 2026
4ad363b
standardize observability spacing primitives
santoshkumarradha Apr 5, 2026
2fa67be
agit sync
santoshkumarradha Apr 5, 2026
1c2f91e
test execution observability in functional harness
santoshkumarradha Apr 5, 2026
5236e69
Merge branch 'feat/execution-observability-rfc' into feat/ui-revamp-p…
santoshkumarradha Apr 5, 2026
0a4d6f2
agit sync
santoshkumarradha Apr 5, 2026
3fcfbf5
test(go-sdk): add tests for types/status, types/types, types/discover…
santoshkumarradha Apr 5, 2026
8f9d68c
test: comprehensive test coverage audit and implementation
santoshkumarradha Apr 5, 2026
d9c6616
fix(tests): address quality audit — eliminate false greens and streng…
santoshkumarradha Apr 5, 2026
ba7b422
test: add invariant and property-based tests for AI code safety
santoshkumarradha Apr 5, 2026
9f2545a
test(ts-sdk): add behavioral invariant tests for rate limiter, DID au…
santoshkumarradha Apr 5, 2026
2f907f8
test(control-plane): add behavioral invariant tests for event bus, Uo…
santoshkumarradha Apr 5, 2026
5c6fb67
agit sync
santoshkumarradha Apr 5, 2026
579bf49
agit sync
santoshkumarradha Apr 5, 2026
b437679
test(python-sdk): add behavioral invariant tests for DID auth, memory…
santoshkumarradha Apr 5, 2026
0f603ac
fix(tests): resolve CI lint failures — remove unused imports, fix f-s…
santoshkumarradha Apr 5, 2026
9dbfad0
test(go-sdk): add behavioral invariant tests for client, agent, statu…
santoshkumarradha Apr 5, 2026
1c7293d
fix(tests): add event loop fixture for Python 3.8/3.9 compatibility
santoshkumarradha Apr 5, 2026
79fe3aa
fix(tests): remove MCP test files (unused feature), restore Go SDK so…
santoshkumarradha Apr 5, 2026
3733a6d
test(ts-sdk,web-ui): add skill/reasoner registry tests and Web UI ser…
santoshkumarradha Apr 5, 2026
076dd88
test(storage): add integration tests for local.go — agent CRUD, execu…
santoshkumarradha Apr 5, 2026
7c37050
test(control-plane): add handler and service tests — agentic status, …
santoshkumarradha Apr 5, 2026
3d6b63d
fix(storage): graceful LIKE fallback when SQLite FTS5 module is unava…
santoshkumarradha Apr 5, 2026
240fdda
test: add 270 tests for critical coverage gaps — types, agent_server,…
santoshkumarradha Apr 5, 2026
c50d4bf
fix(ci): remove unused imports — os in test_agent_server.py, beforeEa…
santoshkumarradha Apr 5, 2026
cf03d42
agit sync
santoshkumarradha Apr 5, 2026
d8b3a98
merge: resolve conflicts with main, preserve bug fixes from PR #330
AbirAbbas Apr 6, 2026
a10f62a
fix(tests): align tests with main branch changes, remove .cursor files
AbirAbbas Apr 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Learned User Preferences

- Open-source AgentField should prioritize stable APIs and primitives so integrators can build advanced observability themselves; large packaged business or fleet observability belongs in Enterprise.
- The embedded OSS UI should stay a lightweight convenience layer, not the primary surface for org-wide analytics or governance-heavy views.
- Developer-facing observability belongs in OSS; deeper reliability and governance programs may span OSS and Enterprise.
- Avoid empty or placeholder PRs when stacking branches; prefer draft PRs with real implementation, then thorough review before marking ready.
- When designing or documenting control plane behavior, treat YAML configuration (`config/agentfield.yaml` and `AGENTFIELD_CONFIG_FILE`) as a first-class surface alongside environment variables.

## Learned Workspace Facts

- Monorepo: Go control plane in `control-plane/`, SDKs in `sdk/`, embedded admin UI in `control-plane/web/client/`.
282 changes: 282 additions & 0 deletions TEST_COVERAGE_AUDIT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,282 @@
# AgentField Test Coverage Audit

**Date:** 2026-04-05
**Branch:** `feature/test-coverage-improvements`
**Audited by:** Parallel Gemini + manual scan

---

## Executive Summary

| Component | Source Files | Test Files | Coverage % | P0 Gaps | P1 Gaps |
|-----------|-------------|-----------|-----------|---------|---------|
| Control Plane (Go) | 181 | 68 tested | 37.6% | 14 | 22 |
| Python SDK | 53 | 45 tested | 84.9% | 2 | 4 |
| Go SDK | 36 | 21 tested | 58.3% | 1 | 4 |
| TypeScript SDK | 49 | 27 tested | 55.1% | 5 | 8 |
| Web UI (React) | 326 | 0 tested | 0% | N/A | N/A |
| **TOTAL** | **645** | **161 tested** | **25%** | **22** | **38** |

**Highest risk areas (most likely to cause production breakage):**
1. **Storage layer** — entire storage/ package untested (CRUD for all entities)
2. **Memory handlers** — memory read/write/events with no coverage
3. **MCP subsystem** — both control plane and SDK MCP code untested
4. **Execution state validation** — state machine transitions unchecked
5. **Verification/DID** — security-critical code with gaps

---

## P0 — CRITICAL (Will Break Users)

### Control Plane Go

| File | What It Does | Risk |
|------|-------------|------|
| `storage/storage.go` | Main storage interface + initialization | All data operations route through here |
| `storage/local.go` | SQLite/BoltDB backend for local mode | Every `af dev` user hits this |
| `storage/execution_records.go` | Execution CRUD (already has tests but storage.go doesn't) | Execution tracking breaks |
| `storage/execution_state_validation.go` | State machine: pending→running→done | Invalid state transitions corrupt data |
| `storage/events.go` | Event storage for SSE streaming | UI goes blind |
| `storage/models.go` | GORM model definitions | Schema drift = silent data loss |
| `handlers/memory.go` | Memory GET/SET/DELETE endpoints | Agent memory broken |
| `handlers/memory_access_control.go` | Memory permission enforcement | Security bypass |
| `handlers/memory_events.go` | Memory change notifications | Agent coordination broken |
| `handlers/nodes_rest.go` | Node registration/heartbeat REST | Agents can't connect |
| `handlers/reasoners.go` | Reasoner registration/listing | Skill discovery broken |
| `handlers/config_storage.go` | Config persistence endpoints | Settings lost |
| `events/execution_events.go` | Execution lifecycle event emission | No UI updates |
| `events/node_events.go` | Node status change events | Dashboard stale |

### Python SDK

| File | What It Does | Risk |
|------|-------------|------|
| `verification.py` | `LocalVerifier` — signature verification, policy evaluation | **Security**: unauthorized access or DOS |
| `agent.py` (partial) | `_PauseManager`, `handle_serverless`, DID initialization | Core lifecycle failures |

### Go SDK

| File | What It Does | Risk |
|------|-------------|------|
| `agent/harness.go` | Primary `Agent.Harness()` entry point | All harness-based skills break |

### TypeScript SDK

| File | What It Does | Risk |
|------|-------------|------|
| `client/AgentFieldClient.ts` | HTTP client to control plane | All TS agent communication |
| `agent/Agent.ts` | Agent lifecycle, registration, skill routing | Core agent functionality |
| `context/ExecutionContext.ts` | Execution context propagation | Context lost in workflows |
| `memory/MemoryClient.ts` | Memory operations | Agent state management |
| `workflow/WorkflowReporter.ts` | Workflow DAG status reporting | Workflow tracking broken |

---

## P1 — HIGH PRIORITY (Core Business Logic)

### Control Plane Go

| File | What It Does |
|------|-------------|
| `handlers/ui/dashboard.go` | Dashboard summary data |
| `handlers/ui/executions.go` (partial) | Execution listing — tests exist but thin |
| `handlers/ui/nodes.go` | Node management UI endpoints |
| `handlers/ui/reasoners.go` | Reasoner listing/detail |
| `handlers/ui/execution_logs.go` | Log streaming for UI |
| `handlers/ui/execution_timeline.go` | Timeline visualization data |
| `handlers/ui/node_logs.go` | Node log proxy/streaming |
| `handlers/ui/lifecycle.go` | Execution cancel/pause/resume UI |
| `handlers/ui/did.go` | DID/VC display in UI |
| `handlers/ui/identity.go` | Identity management |
| `handlers/connector/handlers.go` | Connector system handlers |
| `handlers/agentic/query.go` | Agentic query endpoint |
| `handlers/agentic/batch.go` | Batch execution endpoint |
| `handlers/agentic/discover.go` | Agent discovery endpoint |
| `handlers/agentic/status.go` | Agentic status endpoint |
| `services/ui_service.go` | UI business logic |
| `services/executions_ui_service.go` | Execution queries for UI |
| `services/did_web_service.go` | DID:web resolution |
| `services/tag_normalization.go` | Tag normalization logic |
| `mcp/manager.go` | MCP server lifecycle |
| `mcp/process.go` | MCP process management |
| `mcp/protocol_client.go` | MCP protocol communication |

### Python SDK

| File | What It Does |
|------|-------------|
| `mcp_manager.py` | MCP server lifecycle (subprocess management) |
| `agent_mcp.py` | MCP feature orchestration in agent |
| `mcp_stdio_bridge.py` | stdio↔HTTP bridge for MCP servers |
| `node_logs.py` | `ProcessLogRing`, `install_stdio_tee` — observability |

### Go SDK

| File | What It Does |
|------|-------------|
| `types/types.go` | Core serialization for control plane communication |
| `types/discovery.go` | Discovery message types |
| `types/status.go` | `NormalizeStatus` and terminal/active categorization |
| `did/types.go` | DID identity types |

### TypeScript SDK

| File | What It Does |
|------|-------------|
| `ai/AIClient.ts` | LLM completion API |
| `ai/ToolCalling.ts` | Tool use parsing and execution |
| `ai/RateLimiter.ts` | Rate limiting for API calls |
| `mcp/MCPClient.ts` | MCP client |
| `mcp/MCPToolRegistrar.ts` | MCP tool registration |
| `did/DidManager.ts` | DID identity management |
| `harness/runner.ts` | Harness execution loop |
| `router/AgentRouter.ts` | Request routing |

---

## P2 — MEDIUM PRIORITY (Utilities, Helpers, Infrastructure)

### Control Plane Go

- `cli/*` — 15 CLI command files with no tests (except init, root, vc, verify)
- `config/config.go` — Configuration loading
- `infrastructure/storage/*` — Filesystem config storage
- `mcp/capability_discovery.go`, `skill_generator.go`, `template.go`, `storage.go`
- `packages/*` — Package installer, git operations, runner
- `server/middleware/connector_capability.go`, `permission.go`
- `server/config_db.go`, `knowledgebase/*`
- `storage/migrations.go`, `sql_helpers.go`, `gorm_helpers.go`, `tx_utils.go`, `utils.go`
- `storage/vector_store*.go` — Vector memory backends
- `templates/templates.go` — Code generation templates
- `utils/*` — ID generator, path helpers
- `logger/helpers.go` — Logging utilities

### Python SDK

- `harness/_cli.py` — CLI helpers for harness
- `harness/providers/_factory.py` — Provider selection
- `logger.py` — Logging utilities

### Go SDK

- `ai/multimodal.go` — MIME detection
- `agent/process_logs.go` — Log streaming
- `agent/verification.go` — Local verification
- `harness/claudecode.go`, `codex.go`, `gemini.go`, `opencode.go` — Provider implementations
- `harness/factory.go`, `cli.go`, `result.go`, `provider.go` — Harness infrastructure

### TypeScript SDK

- `utils/*.ts` — HTTP agents, pattern matching, schema helpers
- `status/ExecutionStatus.ts` — Status tracking
- `types/*.ts` — Type definitions
- `harness/providers/*.ts` — Provider implementations

---

## Implementation Plan — Prioritized Work Packages

### WP1: Storage Layer Tests (P0, highest risk)
**Scope:** `control-plane/internal/storage/`
**Effort:** Large — 12+ test files needed
**Strategy:** Test against SQLite (local mode) for speed. Cover all CRUD operations.
**Files to test:**
- `storage.go` — Initialization, backend selection
- `local.go` — SQLite CRUD for nodes, reasoners, executions, workflows
- `execution_state_validation.go` — State machine transitions
- `events.go` — Event persistence
- `models.go` — GORM model validation
- `vector_store_sqlite.go` — Vector memory
- `sql_helpers.go`, `tx_utils.go` — Transaction helpers

### WP2: Memory & Event Handler Tests (P0)
**Scope:** `control-plane/internal/handlers/memory*.go`, `events/`
**Effort:** Medium — 5 test files
**Files:**
- `handlers/memory.go` — Memory CRUD endpoint tests
- `handlers/memory_access_control.go` — Permission checks
- `handlers/memory_events.go` — SSE event delivery
- `events/execution_events.go` — Event emission
- `events/node_events.go` — Node event lifecycle

### WP3: Core REST Handler Tests (P0)
**Scope:** `control-plane/internal/handlers/`
**Effort:** Medium — 4 test files
**Files:**
- `handlers/nodes_rest.go` — Node registration/heartbeat
- `handlers/reasoners.go` — Reasoner CRUD
- `handlers/config_storage.go` — Config persistence

### WP4: Python SDK Security & MCP Tests (P0+P1)
**Scope:** `sdk/python/agentfield/`
**Effort:** Medium — 6 test files
**Files:**
- `verification.py` → `test_verification.py`
- `agent.py` (serverless + pause) → `test_agent_serverless.py`
- `mcp_manager.py` → `test_mcp_manager.py`
- `agent_mcp.py` → `test_agent_mcp.py`
- `mcp_stdio_bridge.py` → `test_mcp_stdio_bridge.py`
- `node_logs.py` → `test_node_logs.py`

### WP5: Go SDK Type & Harness Tests (P0+P1)
**Scope:** `sdk/go/`
**Effort:** Small-Medium — 5 test files
**Files:**
- `agent/harness.go` → `agent/harness_test.go`
- `types/types.go` → `types/types_test.go`
- `types/status.go` → `types/status_test.go`
- `types/discovery.go` → `types/discovery_test.go`
- `did/types.go` → `did/types_test.go`

### WP6: TypeScript SDK Core Tests (P0+P1)
**Scope:** `sdk/typescript/`
**Effort:** Medium — 8 test files
**Files:**
- `client/AgentFieldClient.ts` → `agentfield_client.test.ts`
- `agent/Agent.ts` (expand existing) → `agent_lifecycle.test.ts`
- `context/ExecutionContext.ts` → `execution_context.test.ts`
- `memory/MemoryClient.ts` → `memory_client.test.ts`
- `workflow/WorkflowReporter.ts` → `workflow_reporter.test.ts`
- `ai/ToolCalling.ts` → `tool_calling_advanced.test.ts`
- `mcp/MCPClient.ts` → `mcp_client.test.ts`
- `router/AgentRouter.ts` → `agent_router.test.ts`

### WP7: UI Handler Tests (P1)
**Scope:** `control-plane/internal/handlers/ui/`
**Effort:** Large — 12+ test files
**Files:** All UI handlers (dashboard, executions, nodes, reasoners, logs, timeline, lifecycle, DID, identity, MCP, node_logs, node_log_settings, packages, recent_activity, workflow_runs, env, authorization, config)

### WP8: Agentic & Connector Handler Tests (P1)
**Scope:** `control-plane/internal/handlers/agentic/`, `connector/`
**Effort:** Medium — 7 test files

### WP9: MCP Subsystem Tests (P1)
**Scope:** `control-plane/internal/mcp/`
**Effort:** Medium — 6 test files
**Files:** manager, process, protocol_client, capability_discovery, skill_generator, storage

### WP10: Service Layer Tests (P1)
**Scope:** `control-plane/internal/services/`
**Effort:** Medium — 4 test files
**Files:** ui_service, executions_ui_service, did_web_service, tag_normalization

---

## Execution Strategy

**Phase 1 (This PR):** WP1-WP6 (all P0 + critical P1) — use git worktrees for parallel work
**Phase 2 (Follow-up):** WP7-WP10 (remaining P1 + P2)
**Phase 3 (Later):** Web UI tests (requires test framework setup first)

**Parallelization plan:**
- Worktree A: WP1 (Storage tests) — Codex CLI
- Worktree B: WP2+WP3 (Handler tests) — Codex CLI
- Worktree C: WP4 (Python SDK) — Gemini CLI
- Worktree D: WP5 (Go SDK) — Gemini CLI
- Worktree E: WP6 (TS SDK) — Gemini CLI
- Orchestrator merges worktree branches sequentially

**Test patterns to follow:**
- Go: Table-driven tests, `httptest.NewServer` for HTTP mocks, testify assertions
- Python: pytest fixtures, `unittest.mock`, async test support
- TypeScript: vitest, mock fetch, spy patterns
Loading
Loading