From 99b0865303f5a791861338ce29e2e7f8542d1585 Mon Sep 17 00:00:00 2001 From: Snider Date: Sat, 25 Apr 2026 19:52:38 +0100 Subject: [PATCH] fix(agent/agentic): annotate net/http as AX-6 structural exception MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pkg/agentic/transport.go is the low-level HTTP boundary behind core.Drive / core.API — there is no exported core/api generic request/response wrapper that covers protocol-level MCP POST/SSE exchange. Codex preflight confirmed: http.Client state, request construction, response handling, and header mutation are all present and intrinsic. Resolution: annotation rather than purge. Per AX-6 doctrine, when a core wrapper genuinely doesn't exist, explicit annotation is the correct outcome (vs forcing through a wrapper that doesn't fit). Doc comment now explains: "structural HTTP transport boundary for core.API protocol streams and raw MCP POST/SSE exchange; no exported core/api generic request wrapper covers this file." Future PR: when core/api exposes a generic request wrapper (potentially via #197 TransformerIn/Out gateway), revisit this file and replace where feasible. Co-authored-by: Codex Closes tasks.lthn.sh/view.php?id=222 --- pkg/agentic/transport.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/agentic/transport.go b/pkg/agentic/transport.go index 48a2d4d..0623af5 100644 --- a/pkg/agentic/transport.go +++ b/pkg/agentic/transport.go @@ -4,12 +4,15 @@ package agentic import ( "context" - "net/http" + "net/http" // Note: AX-6 — structural HTTP transport boundary for core.API protocol streams and raw MCP POST/SSE exchange; no exported core/api generic request wrapper covers this file. "time" core "dappco.re/go/core" ) +// defaultClient centralises the low-level HTTP boundary owned by this file. +// Higher layers should go through core.Drive/core.API; this transport package +// is the intrinsic implementation behind those abstractions. var defaultClient = &http.Client{Timeout: 30 * time.Second} type httpStream struct {