Repository navigation
Closed
Description
Dependency
Blocked by #888.
Problem
mecak8s is file-less by default and can optionally expose one operator-mounted local workspace. That model does not provide a lightweight, durable filesystem shared safely across disposable replicas and isolated between callers.
For file-lite workloads, Redis is already part of the mecak8s deployment model and can provide persisted file contents and session read-before-write ledgers without introducing another storage technology.
Desired behavior
- mecak8s offers a Redis-backed filesystem mode for the existing Read, Edit, Write, Grep, and Glob tools.
- File contents are scoped to the session's persisted owner, using the exact issuer-and-subject identity pair.
- All sessions owned by the same principal share one filesystem; filesystem contents are not partitioned by session.
- Ownerless sessions share one internal anonymous filesystem namespace. This does not fabricate an anonymous authenticated principal.
- Read-before-write ledger entries remain scoped to the session and can be persisted in Redis across runs, restarts, and replicas.
- Ledger storage is configurable independently from file-content storage, even when both are configured to use Redis.
- Redis-backed filesystem mode and the existing mounted
--workspacemode are mutually exclusive. The remote filesystem replaces mounted-workspace mode for that deployment. - Redis file and ledger entries have no application TTL and are not intentionally evicted. Configuring Redis durability, backups, capacity, and eviction policy is the operator's responsibility and must be documented clearly.
Safety and compatibility requirements
- Preserve the current Workspace/file-tool contract, including path confinement, recursive globbing, grep behavior, atomic create-only writes, opaque versions, stale-version rejection, and conditional replacement across replicas.
- A Redis outage, missing namespace, corrupt state, or failed ledger lookup must fail closed; it must not silently expose an empty filesystem or authorize a mutation.
- Different principals must not be able to read, mutate, list, glob, grep, or infer one another's files.
- Concurrent sessions and mecak8s replicas must observe consistent create and conditional-replace outcomes.
- The environment remains shell-less: no Bash support, command runner, filesystem sandbox, fork/merge workflow, or executable-file semantics are introduced.
Acceptance criteria
- Two sessions with the same persisted owner observe the same files while retaining independent read-before-write ledgers.
- Sessions owned by different issuer/subject pairs cannot observe or affect each other's filesystem state.
- Ownerless sessions share the anonymous namespace without creating a synthetic
session.Principal. - File contents and ledger entries survive mecak8s process replacement when Redis retains its data.
- Atomic create and conditional replacement remain correct across independent mecak8s replicas.
- Redis-backed filesystem mode cannot be enabled together with mounted
--workspacemode. - The backend passes the existing Workspace and model-facing filesystem-tool conformance expectations.
- mecak8s deployment and user documentation explain the mode, its file-lite scope, its shell-less behavior, non-expiring keys, and the operator's Redis persistence/eviction responsibilities.
Out of scope
- Bash or arbitrary command execution.
- Sandboxing, worktree forks, or merge semantics.
- Session-scoped file-content namespaces.
- Redis deployment, backup, high availability, disk-persistence, or capacity management by mecatl.
- Additional remote filesystem backends.
- Large-filesystem optimization or general POSIX filesystem emulation.
Metadata
Metadata
Assignees
Labels
No labels
Activity