Skip to content

feat(docker): support OMP execution and credentials in isolation - #872

Open
tomdps wants to merge 2 commits into
mainfrom
zeroshot/mystic-horizon-18
Open

feat(docker): support OMP execution and credentials in isolation#872
tomdps wants to merge 2 commits into
mainfrom
zeroshot/mystic-horizon-18

Conversation

@tomdps

@tomdps tomdps commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Closes #868

@tomdps
tomdps enabled auto-merge July 31, 2026 19:25
@tomdps tomdps changed the title feat: feat(docker): support OMP execution and credentials in isolation feat(docker): support OMP execution and credentials in isolation Jul 31, 2026
@greptile-apps

greptile-apps Bot commented Jul 31, 2026

Copy link
Copy Markdown

Greptile Summary

Adds OMP execution support under Docker isolation.

  • Registers the OMP image installation command, credential environment allowlist, and writable runtime-state mount paths.
  • Adds per-cluster provider-state cleanup and garbage collection.
  • Extends OMP adapter credentials, documentation, and Docker-focused unit and integration coverage.

Confidence Score: 4/5

The PR is not yet safe to merge because multi-user startup can still fail and failed Docker container creation still leaks OMP provider state.

The shared temporary root remains owned and writable only according to the first creator's ordinary permissions, while provider-state directories are created before _spawnContainer without rollback when that operation rejects.

Files Needing Attention: src/isolation-manager.js

Important Files Changed

Filename Overview
src/isolation-manager.js Adds OMP writable-state mounts, credential forwarding controls, image-tag hashing, and cleanup, but both previously reported lifecycle defects remain.
src/lib/gc.js Extends orphan collection to report and remove provider-state directories while protecting known cluster IDs.
src/agent-cli-provider/provider-registry.ts Declares OMP installation, credential environment variables, and writable runtime-state subpaths in the canonical provider registry.
src/agent-cli-provider/adapters/omp.ts Adds the OMP credentials used by provider-contract environment handling and redaction.
cli/index.js Extends garbage-collection output to include orphaned provider-state directories.

Sequence Diagram

sequenceDiagram
  participant O as Orchestrator
  participant I as IsolationManager
  participant F as Host filesystem
  participant D as Docker
  O->>I: "createContainer(clusterId, provider=omp)"
  I->>F: mount ~/.omp read-only
  I->>F: create per-cluster writable state
  I->>D: create/start OMP image
  D-->>O: isolated OMP container
  O->>I: cleanup(clusterId)
  I->>D: remove container
  I->>F: remove provider-state directory
Loading

Reviews (2): Last reviewed commit: "fix(docker): isolate OMP credential envi..." | Re-trigger Greptile

Comment thread src/isolation-manager.js
// Ancestor path components (the shared `zeroshot-provider-state` root, the per-cluster and
// per-provider dirs) get ordinary default permissions — they hold no data themselves, only
// need to stay traversable so a different host user's own clusterId subtree isn't blocked.
fs.mkdirSync(hostRoot, { recursive: true });

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Shared state root blocks users

When a second OS user starts an OMP Docker cluster after another user created the shared provider-state root, the ordinary owner-writable directory permissions make fs.mkdirSync(hostRoot, { recursive: true }) fail with EACCES, preventing the container from starting.

Context Used: CLAUDE.md (source)

Knowledge Base Used: Orchestrator: Cluster, Agent-Wrapper, and Message Bus Coordination

Comment thread src/isolation-manager.js
containerHome,
providerName
);
this._applyProviderStateMounts(args, config, clusterId, containerHome, providerName);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Failed container creation leaks state

When _spawnContainer rejects after this call creates the provider-state directories, startup exits before the cluster records its isolation manager, so the failure cleanup cannot remove those directories and each failed OMP Docker launch leaves an orphan under the temporary state root.

Context Used: CLAUDE.md (source)

Knowledge Base Used: Orchestrator: Cluster, Agent-Wrapper, and Message Bus Coordination

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(omp): add Docker distribution and broker auth

1 participant