The controller ended by its unassignment, so its lease key is absent for good and the healers stayed in shadow while nobody swept the artifact store (issue 1126, A4). Drop both gates and each manifest's read of mesh-controller.lease; the would bucket stays readable until its keys expire. Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
39 lines
1.6 KiB
Go
39 lines
1.6 KiB
Go
// The artifact-store-tools module's Go bundle (novox/hq ADR 0251 §1–3, ADR 0571 clause 2, to-be 51): a process the
|
||
// node's runtime launches and speaks MCP over stdio to. It says what the artifact store holds — its repositories, its
|
||
// size, and what the mesh keeps of each manifest — read from the store's own files through the store's own container,
|
||
// and it holds the seat mesh-artifact-sweep: the keep set, the sweep at each build's end, and S25's image-missing.
|
||
//
|
||
// **A module beside the store, not the store's own.** A module that provides the artifact store cannot also build an
|
||
// artifact: building publishes to the store, so the store would be needed to create itself. So these tools are a
|
||
// second module, assigned to the machine that holds the store. stdout is the protocol; what this bundle says, it says
|
||
// on stderr.
|
||
package main
|
||
|
||
import (
|
||
"fmt"
|
||
"os"
|
||
"time"
|
||
|
||
stdio "git.novox.be/novox/mesh-sdk/go"
|
||
"git.novox.be/novox/mesh-sdk/go/handacts"
|
||
)
|
||
|
||
func logf(format string, a ...any) { fmt.Fprintf(os.Stderr, format+"\n", a...) }
|
||
|
||
func main() {
|
||
s := &Store{
|
||
Container: os.Getenv("MESH_ARTIFACT_STORE_CONTAINER"),
|
||
Run: ExecRunner,
|
||
UID: os.Getuid(),
|
||
}
|
||
h := &Holder{Bus: runtimeBus{}, Door: DoorAt(os.Getenv("MESH_ARTIFACT_STORE_ADDRESS_FILE")), Listed: s.View,
|
||
Now: time.Now, Logf: logf}
|
||
h.Acts = handacts.Recorder{Ask: stdio.Ask}
|
||
go follow(h)
|
||
// An empty name serves as the module the runtime names (MESH_SERVED_MODULE): artifact-store-tools.
|
||
if err := stdio.Serve("", append(Tools(s, h, &Catalogue{Ask: stdio.Ask}), SeatTools(h, s)...)); err != nil {
|
||
fmt.Fprintln(os.Stderr, err)
|
||
os.Exit(1)
|
||
}
|
||
}
|