Skip to content

fix(docker): install git in dashboard runtime image - #131

Open
Afigreja71 wants to merge 4 commits into
evolution-foundation:mainfrom
Afigreja71:fix-dashboard-git-missing
Open

fix(docker): install git in dashboard runtime image#131
Afigreja71 wants to merge 4 commits into
evolution-foundation:mainfrom
Afigreja71:fix-dashboard-git-missing

Conversation

@Afigreja71

@Afigreja71 Afigreja71 commented Aug 25, 2026

Copy link
Copy Markdown

Problem

The embedded terminal in the EvoNexus dashboard spawns claude-code/openclaude CLI sessions that rely on git worktree for agent isolation. The dashboard runtime image (Dockerfile.swarm.dashboard) never installed git — only Dockerfile.swarm (used by the telegram/scheduler services) had it.

Every worktree-isolated agent call inside the dashboard terminal failed with:

Error: Cannot create agent worktree: not in a git repository and no WorktreeCreate hooks are configured.

regardless of working directory, because git itself was missing from $PATH.

Fix

Add git to the apt-get install line in the runtime stage of Dockerfile.swarm.dashboard, matching what Dockerfile.swarm already does.

Verification

Applied the same fix live (runtime apt-get install git + git init in the persistent workspace volume) on a running evonexus_dashboard container and confirmed git worktree add/remove works end-to-end. This PR makes that fix permanent in the image so it survives redeploys.

Summary by Sourcery

Install Git in the dashboard runtime image to restore worktree-isolated agent sessions.

Bug Fixes:

  • Install Git in the dashboard runtime image so embedded terminal agent sessions can create and manage Git worktrees.

Build:

  • Update the dashboard container build dependencies to include Git.

v0.25.0 — Knowledge Base (pgvector, multi-connection)
The embedded terminal spawns claude-code/openclaude CLI sessions that
rely on `git worktree` for agent isolation, but the dashboard runtime
image never installed git — only Dockerfile.swarm (telegram/scheduler)
had it. Every worktree-isolated agent call failed with "not in a git
repository" regardless of working directory.
@sourcery-ai

sourcery-ai Bot commented Aug 25, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The dashboard runtime image now permanently includes Git, enabling worktree-isolated claude-code/openclaude sessions to operate across redeployments.

File-Level Changes

Change Details Files
Install Git in the dashboard runtime image so embedded terminal agent sessions can create and manage Git worktrees.
  • Add git to the runtime-stage apt-get install package list.
  • Align the dashboard image dependencies with the existing swarm runtime image.
Dockerfile.swarm.dashboard

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

…tion

Installing git alone wasn't enough — .dockerignore excludes .git/ from
the build context, so /workspace itself never has git history in either
runtime image. ADWs/runner.py (used by Telegram/heartbeat-triggered
agent calls) spawns the CLI with cwd=WORKSPACE=/workspace root, which
still failed worktree creation with "not in a git repository" even
after installing the git binary.

Fix: git init + an empty root commit in /workspace after the final
COPY step in both Dockerfile.swarm and Dockerfile.swarm.dashboard, so
every container boots with a valid HEAD regardless of which entrypoint
(interactive terminal, Telegram bot, scheduler) spawns the agent CLI.
No application source is added to the commit.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sourcery assessment

Approved.

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.

1 participant