Eclipse Foundation / Eclipse Enclave
Merged upstreamFeatureMerged Oct 1, 2026

Resolve exec targets consistently across projects

Reworked named exec target selection around Enclave's shared session resolver and passed an explicit resolved target into the runtime.

eclipse-enclave/enclave · #115

CLI usability feature

Enclave exec can now target container names, container IDs, default containers, and session names from other projects using the same resolution model as attach.

Problem

enclave exec interpreted --name only as a session suffix and rebuilt a container name from the current directory and default tool. A name copied from enclave ps could therefore resolve to the wrong project, default containers could not be selected explicitly, and failures did not guide users toward valid targets.

Approach

Resolves named targets in the application layer through the shared session resolver, then passes a typed ExecTarget to the runtime. Exact container names and IDs work across directories, session names follow project-aware precedence, explicit --tool narrows matches, and ambiguous or unknown targets produce actionable errors.

Impact and scope

  • Makes the output of enclave ps directly usable with enclave exec from any directory.
  • Supports project default containers and sessions that exist in another project without changing automatic selection when --name is omitted.
  • Aligns exec with attach, stop, and theia while preserving tool-aware terminal tinting for the resolved session.
  • Documents empty, ambiguous, unknown, and cross-project target behavior in the CLI and configuration references.

Validation

  • Added focused application and runtime regressions for exact names, IDs, default containers, cross-project sessions, ambiguity, tool filters, tinting, empty names, and unchanged auto-selection.
  • All nine hosted gates passed, including Linux and Windows builds, macOS smoke tests, lint, Eclipse ECA, and Debian and Fedora package smoke tests.
  • An Eclipse Enclave collaborator approved the final authored change as working as intended, and GH-104 closed with the merge.