Conversation
EclipseSourceAI
left a comment
There was a problem hiding this comment.
Note
Autonomous AI review.
This review was done by an AI agent and therefore may contain mistakes. Feel free to ignore any comment you disagree with. A thumbs-down reaction on a comment marks it as rejected for follow-up reviews. Noting why in a reply helps, since replies are read too.
Resolving all AI comments does not lead to an automatic approval. A maintainer still needs to review and sign off on the overall architecture and design.
To get an updated review after pushing changes, a maintainer may re-request a review from this account.
Running in Eclipse Enclave, submitted via review-guard-mcp
Adds a declarative caches field to tool and feature specs so extensions can persist directories of the container home per project, replacing the hard-coded list in addCacheMounts with model.BuiltinProjectCaches plus spec-declared entries.
The approach looks sound: specs only name a cache subdirectory and a $HOME-relative target (never a host path), per-spec validation happens at load (validateAndNormalizeCaches), cross-extension conflicts are resolved at session start (projectCaches), and the new entries show up in the features|tools add capability summary and diff. Refactoring the shell-history, SSH, and home-config-file paths into model constants so they can serve as reserved targets is a reasonable side effect rather than an unrelated drive-by. Tests cover the load-time rules, the dedupe/conflict matrix, and --no-cache, and go build plus the tests for the touched packages pass here.
Worth a closer look:
CacheTargetsOverlapreimplementsutil.PathWithinbecausemodelcannot importutil, which suggests the helper and the built-in list belong inconfig.- Feature-declared caches are keyed per tool, so a tool-independent feature cache (the motivating Maven case) is duplicated across tools in one project.
docs/ARCHITECTURE.mdstill documents the cache directory as a fixed list.
Nothing blocking found in the validation logic itself. The reserved-target set covers the auth stores, shell history, SSH mount, home config files, and built-in caches, and the tool config/memory store targets are checked at session start, which closes the collisions that would otherwise surface as raw container-start errors.
- Add a declarative caches field to tool and feature specs: each entry names an enclave-managed subdirectory of the host project cache dir and the container-home target it is bind-mounted at - Validate at load time (name charset, target containment, overlap with built-in caches and reserved mounts) and at session start (cross-extension conflicts, the tool's own config/memory store mounts); identical name+target declarations dedupe - Surface declared caches in the capability summary and update diff of features/tools add
EclipseSourceAI
left a comment
There was a problem hiding this comment.
Note
Autonomous AI review.
This review was done by an AI agent and therefore may contain mistakes. Feel free to ignore any comment you disagree with. A thumbs-down reaction on a comment marks it as rejected for follow-up reviews. Noting why in a reply helps, since replies are read too.
Resolving all AI comments does not lead to an automatic approval. A maintainer still needs to review and sign off on the overall architecture and design.
To get an updated review after pushing changes, a maintainer may re-request a review from this account.
Running in Eclipse Enclave, submitted via review-guard-mcp
Follow-up review. The only change since my last pass (238157f → 0e0f6e3) is the refactor addressing my earlier comments: CacheTargetsOverlap/BuiltinProjectCaches moved from model to config, the cache-mount logic moved from runtime.go into cache_mounts.go, and docs/ARCHITECTURE.md now lists nvm/ and points at extension-declared caches. I checked the diff and it's a clean move, go build and the runtime/config/model tests pass. No new issues found.
These previous comments can be resolved as they are now handled:
- move
CacheTargetsOverlap/BuiltinProjectCachesintoconfig - split cache-mount logic into its own
cache_mounts.gofile - document
nvm/and extension-declared caches in ARCHITECTURE.md
I can't resolve them myself as I would need write permission on this repository.
What it does
The persistent per-project package caches were hard-coded in
addCacheMounts, so extensions had no way to persist their own directories — ajava-devfeature, for example, re-downloads the whole Maven repository in every fresh container.cachesfield to extension specs (kind: sandboxandkind: mixin): each entry names a subdirectory under the enclave-managed project cache dir and a container target inside$HOME— a spec can never name a host pathaddCacheMounts, respecting--no-cachename+targetdeclarations dedupe; the same name with a different target — or the same target under a different name — fails with an error naming both claimantsenclave features|tools addcachesfield, including that an empty cache mount shadows image-baked content at the target (seed fromfeature-entrypoint.d, as node-dev does for nvm)Fixes #82
How to test
Declare a cache in a feature spec, e.g. in
extensions/features/devtools/spec.yaml:Start a session and verify
~/.cache/enclave/<tool>/<project-hash>/m2exists on the host and is mounted at~/.m2/repositoryin the container; files written there survive a fresh container--no-cachestarts the session without the mountTwo features declaring the same name with different targets fail session start with an error naming both features
enclave features addagainst an extension repo with acachesentry lists it in the capability summaryVerified locally:
make build,make test,make lint,make check-license-headersFollow-ups
Migrate the feature-specific built-in entries (nvm, uv, pip, pnpm, yarn) into their features' specs, keeping the same
namevalues so existing host cache directories stay valid.Breaking changes
Review checklist