From a8ed79b0971c9fc09e5d012425b20d3cd9c8e3f3 Mon Sep 17 00:00:00 2001 From: Snider Date: Sat, 25 Apr 2026 08:45:04 +0100 Subject: [PATCH] =?UTF-8?q?docs(process):=20annotate=20sync=20as=20AX-6=20?= =?UTF-8?q?structural=20exception=20per=20RFC=20=C2=A72=20(#296)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sync + sync/atomic annotations across 13 files in go-process. health.go is committed separately via #298 (combined sync annotation + fmt/strings banned-import purge). Co-authored-by: Codex Closes tasks.lthn.sh/view.php?id=296 --- buffer.go | 5 ++++- daemon.go | 1 + daemon_test.go | 1 + exec/exec_test.go | 1 + exec/logger.go | 5 ++++- global_test.go | 1 + pidfile.go | 1 + pkg/api/provider.go | 3 ++- process.go | 2 +- process_global.go | 2 ++ runner.go | 1 + service.go | 2 +- service_test.go | 1 + 13 files changed, 21 insertions(+), 5 deletions(-) diff --git a/buffer.go b/buffer.go index 88c61a2..1871916 100644 --- a/buffer.go +++ b/buffer.go @@ -1,6 +1,9 @@ package process -import "sync" +import ( + // Note: AX-6 — internal concurrency primitive; structural per RFC §2 + "sync" +) // RingBuffer is a fixed-size circular buffer that overwrites old data. // Thread-safe for concurrent reads and writes. diff --git a/daemon.go b/daemon.go index 26044b5..95dc432 100644 --- a/daemon.go +++ b/daemon.go @@ -4,6 +4,7 @@ import ( "context" "errors" "os" + // Note: AX-6 — internal concurrency primitive; structural per RFC §2 "sync" "time" diff --git a/daemon_test.go b/daemon_test.go index 0617e4f..d870637 100644 --- a/daemon_test.go +++ b/daemon_test.go @@ -5,6 +5,7 @@ import ( "net/http" "os" "path/filepath" + // Note: AX-6 — internal concurrency primitive; structural per RFC §2 "sync" "testing" "time" diff --git a/exec/exec_test.go b/exec/exec_test.go index 52b61a3..c05d74b 100644 --- a/exec/exec_test.go +++ b/exec/exec_test.go @@ -7,6 +7,7 @@ import ( "os" "path/filepath" "strings" + // Note: AX-6 — internal concurrency primitive; structural per RFC §2 "sync" "testing" "time" diff --git a/exec/logger.go b/exec/logger.go index 5ff59e6..4480961 100644 --- a/exec/logger.go +++ b/exec/logger.go @@ -1,6 +1,9 @@ package exec -import "sync" +import ( + // Note: AX-6 — internal concurrency primitive; structural per RFC §2 + "sync" +) // Logger interface for command execution logging. // Compatible with pkg/log.Logger and other structured loggers. diff --git a/global_test.go b/global_test.go index c750e3e..d7d8516 100644 --- a/global_test.go +++ b/global_test.go @@ -3,6 +3,7 @@ package process import ( "context" "os/exec" + // Note: AX-6 — internal concurrency primitive; structural per RFC §2 "sync" "syscall" "testing" diff --git a/pidfile.go b/pidfile.go index 79992b0..fd809f2 100644 --- a/pidfile.go +++ b/pidfile.go @@ -4,6 +4,7 @@ import ( "path/filepath" "strconv" "strings" + // Note: AX-6 — internal concurrency primitive; structural per RFC §2 "sync" "syscall" diff --git a/pkg/api/provider.go b/pkg/api/provider.go index a514340..a51c483 100644 --- a/pkg/api/provider.go +++ b/pkg/api/provider.go @@ -9,13 +9,14 @@ import ( "net/http" "os" "strconv" + // Note: AX-6 — internal concurrency primitive; structural per RFC §2 "sync" "syscall" "time" - "dappco.re/go/core" "dappco.re/go/api" "dappco.re/go/api/pkg/provider" + "dappco.re/go/core" coreerr "dappco.re/go/log" process "dappco.re/go/process" "dappco.re/go/ws" diff --git a/process.go b/process.go index a0c4225..e40d958 100644 --- a/process.go +++ b/process.go @@ -9,7 +9,7 @@ import ( "os" // Note: banned-imports exception: os/exec is intrinsic to process management in THE implementation of core.Process, which cannot depend on itself. "os/exec" - // Note: banned-imports exception: synchronization is intrinsic to this core.Process primitive; go-process cannot depend on downstream core.* helpers. + // Note: AX-6 — internal concurrency primitive; structural per RFC §2 "sync" // Note: banned-imports exception: syscall is intrinsic to process management in THE implementation of core.Process, which cannot depend on itself. "syscall" diff --git a/process_global.go b/process_global.go index c55ad7d..1c7f562 100644 --- a/process_global.go +++ b/process_global.go @@ -3,7 +3,9 @@ package process import ( "context" "os" + // Note: AX-6 — internal concurrency primitive; structural per RFC §2 "sync" + // Note: AX-6 — internal concurrency primitive; structural per RFC §2 "sync/atomic" "dappco.re/go/core" diff --git a/runner.go b/runner.go index 0f8eec5..9e0f1cc 100644 --- a/runner.go +++ b/runner.go @@ -2,6 +2,7 @@ package process import ( "context" + // Note: AX-6 — internal concurrency primitive; structural per RFC §2 "sync" "time" diff --git a/service.go b/service.go index ddce7b0..eb26277 100644 --- a/service.go +++ b/service.go @@ -9,7 +9,7 @@ import ( // Note: banned-imports exception: os/exec is intrinsic to process management in THE implementation of core.Process, which cannot depend on itself. "os/exec" "slices" - // Note: banned-imports exception: synchronization is intrinsic to this core.Process primitive; go-process cannot depend on downstream core.* helpers. + // Note: AX-6 — internal concurrency primitive; structural per RFC §2 "sync" // Note: banned-imports exception: syscall is intrinsic to process management in THE implementation of core.Process, which cannot depend on itself. "syscall" diff --git a/service_test.go b/service_test.go index f6ba1ec..ef60fab 100644 --- a/service_test.go +++ b/service_test.go @@ -4,6 +4,7 @@ import ( "context" "os/exec" "strings" + // Note: AX-6 — internal concurrency primitive; structural per RFC §2 "sync" "syscall" "testing"