From 0fa9dd56946db6e927a67685e834cf4a85bcc759 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Tue, 4 Aug 2026 11:32:09 +0200 Subject: [PATCH] fs: remove comment banners The code structure is self-evident. Banners add noise without value. --- fs/handlers.go | 24 ------------------------ fs/spec.go | 46 +++------------------------------------------- 2 files changed, 3 insertions(+), 67 deletions(-) diff --git a/fs/handlers.go b/fs/handlers.go index d0ddb3c..974d9fb 100644 --- a/fs/handlers.go +++ b/fs/handlers.go @@ -15,10 +15,6 @@ import ( "ollie/toolsrv" ) -// ════════════════════════════════════════════════════════════════════ -// ROOT-LEVEL HANDLERS -// ════════════════════════════════════════════════════════════════════ - func readBackends(_ HandlerCtx) ([]byte, error) { return []byte(strings.Join(backend.Backends(), "\n") + "\n"), nil } @@ -160,10 +156,6 @@ func readAliases(_ HandlerCtx) ([]byte, error) { return []byte(sb.String()), nil } -// ════════════════════════════════════════════════════════════════════ -// ELEVATE HANDLERS -// ════════════════════════════════════════════════════════════════════ - var errNoElevate = fmt.Errorf("elevate broker not available") func readElevatePolicy(ctx HandlerCtx) ([]byte, error) { @@ -226,10 +218,6 @@ func writeElevateRequest(ctx HandlerCtx, data []byte) error { return nil } -// ════════════════════════════════════════════════════════════════════ -// SESSION HANDLERS -// ════════════════════════════════════════════════════════════════════ - func readSessionIdx(_ HandlerCtx) ([]byte, error) { return BuildIndex(globalRootState), nil } @@ -369,10 +357,6 @@ func requestAgentNew(ctx HandlerCtx, data []byte) ([]byte, error) { return []byte(agents[len(agents)-1].ID() + "\n"), nil } -// ════════════════════════════════════════════════════════════════════ -// AGENT HANDLERS -// ════════════════════════════════════════════════════════════════════ - // agentBindings returns bindings for all agents in a session. // The Blueprint pattern clones the structure and binds ctx.Agent + ctx.AgentLog. func agentBindings(ctx HandlerCtx) ([]Binding, error) { @@ -739,10 +723,6 @@ func streamChat(al *AgentLog, cctx context.Context, base string) ([]byte, string return data, fmt.Sprintf("%d", newOffset), nil } -// ════════════════════════════════════════════════════════════════════ -// PROCESS HANDLERS -// ════════════════════════════════════════════════════════════════════ - // processBindings returns bindings for detached processes. func processBindings(ctx HandlerCtx) ([]Binding, error) { if ctx.Agent == nil { @@ -776,10 +756,6 @@ func removeProcess(ctx HandlerCtx) error { return nil } -// ════════════════════════════════════════════════════════════════════ -// HELPERS -// ════════════════════════════════════════════════════════════════════ - func nopRead(_ HandlerCtx) ([]byte, error) { return nil, nil } diff --git a/fs/spec.go b/fs/spec.go index b4d93f3..e909c0c 100644 --- a/fs/spec.go +++ b/fs/spec.go @@ -1,27 +1,12 @@ package fs -// ════════════════════════════════════════════════════════════════════ -// FILESYSTEM SPECIFICATION -// ════════════════════════════════════════════════════════════════════ -// -// This is the single source of truth for the 9P namespace structure. -// Every file and directory in the system is declared here, along with -// its documentation. The Doc() option provides human-readable descriptions -// that can be used to generate help text or documentation. -// -// treeSpecUID and treeSpecGID are set at NewRoot() time from the -// current system user so the root node inherits proper ownership. +// Filesystem specification — the single source of truth for the 9P namespace. +// Every file and directory is declared here with Doc() descriptions. +// treeSpecUID/GID are set at NewRoot() time from the current system user. var treeSpecUID, treeSpecGID string var treeSpec = DirNode("/", - // Root ownership: UID/GID set at NewRoot() time. - // Every child inherits from root unless overridden. - - // ════════════════════════════════════════════════════════════════ - // ROOT-LEVEL FILES - // ════════════════════════════════════════════════════════════════ - FileNode("backends", 0444, Doc("Available backend names, one per line (ollama, openai, anthropic, etc.)"), Read(readBackends), @@ -89,10 +74,6 @@ var treeSpec = DirNode("/", GID("agent"), ), - // ════════════════════════════════════════════════════════════════ - // ELEVATE DIRECTORY - // ════════════════════════════════════════════════════════════════ - DirNode("elevate", Doc("Elevation broker for sandboxed command approval"), GID("agent"), @@ -103,7 +84,6 @@ var treeSpec = DirNode("/", Write(writeElevatePolicy), ), - // pending/{reqid} — dynamic per-request files Each("{reqid}", elevateBindings, Doc("Pending elevation request. Read: request summary. Write: 'approve', 'deny', or 'persist'."), Bind(BindData), @@ -115,10 +95,6 @@ var treeSpec = DirNode("/", ), ), - // ════════════════════════════════════════════════════════════════ - // SESSION DIRECTORY - // ════════════════════════════════════════════════════════════════ - DirNode("session", Doc("Session management. Contains per-session subdirectories."), GID("agent"), @@ -133,10 +109,6 @@ var treeSpec = DirNode("/", Read(readSessionIdx), ), - // ──────────────────────────────────────────────────────────── - // PER-SESSION DIRECTORY (session/{sname}/) - // ──────────────────────────────────────────────────────────── - Each("{sname}", sessionBindings, Doc("Session directory. Addressable by name or immutable ID."), @@ -178,10 +150,6 @@ var treeSpec = DirNode("/", Write(writeSessionElevate), ), - // ──────────────────────────────────────────────────────── - // AGENT DIRECTORY (session/{sname}/agent/) - // ──────────────────────────────────────────────────────── - DirNode("agent", Doc("Agent management within this session."), @@ -190,10 +158,6 @@ var treeSpec = DirNode("/", Request(requestAgentNew), ), - // ──────────────────────────────────────────────────── - // PER-AGENT DIRECTORY (session/{sname}/agent/{aname}/) - // ──────────────────────────────────────────────────── - Each("{aname}", agentBindings, Doc("Agent directory. Addressable by name or immutable ID."), @@ -325,10 +289,6 @@ var treeSpec = DirNode("/", Read(readAgentID), ), - // ──────────────────────────────────────────────── - // PROC DIRECTORY (session/{sname}/agent/{aname}/proc/) - // ──────────────────────────────────────────────── - DirNode("proc", Doc("Detached background processes started by this agent."),