Expand description
§K1 daemon code services
CodeServices::open constructs the daemon’s one process-owned RustCode service, one process-owned WebCode service, and the concrete first-run Web bootstrap importer. It opens the public Rust projection beneath <state_root>/rust, registers the KTO-backed versionless Web workspace subsystem from genesis, uses disposable per-user caches beneath <state_root>/rust/code-cache and <state_root>/web/code-cache, and gives WebCode the same public projection retained by the daemon’s Web HTTP composition.
The bootstrap importer uses its own disposable cache beneath <state_root>/web/bootstrap-cache, the same public Web projection, checker, Chromium, image, limits, and check-policy revisions as WebCode. web_bootstrap_importer returns a clone for Loom bootstrap; into_parts still returns the RustCode service followed by the WebCode service for Chat.
Startup requires no configuration environment variables. kcode-k1-code-tool-image finds podman on PATH and reuses one content-versioned local tool image containing Rust 1.97, Clippy, rustfmt, Chromium, and kcode-k1-web-checker; if absent, it builds the image from its embedded Containerfile. This package copies the checker executable from that image into disposable K1 state and reads Chromium’s path and version from the image. The Rust target is derived from the supported Linux host architecture.
Package-owned revision constants identify disposable cache and check policy. Rust check and command policy revisions are advanced for the ordinary default-target Cargo build-and-test pipeline. Web checks use one 225-second deadline and no explicit CPU, memory, PID, tmpfs-size, or shared-memory-size limits. Public source and durable unpublished Web work remain KTO-backed; all code-service caches and tool material are disposable.
The caller supplies the existing process Ordering, Peering, Groups, Objects, and shared Web projection. The package performs no check, publication, provider call, listener work, migration, or deployment. Startup failures preserve complete command diagnostics.