Skip to content

fix: refresh worker container when REPO changes between runs#84

Closed
ChinmayShringi wants to merge 1 commit intoKeygraphHQ:mainfrom
ChinmayShringi:fix/repo-change-between-runs
Closed

fix: refresh worker container when REPO changes between runs#84
ChinmayShringi wants to merge 1 commit intoKeygraphHQ:mainfrom
ChinmayShringi:fix/repo-change-between-runs

Conversation

@ChinmayShringi
Copy link
Copy Markdown

Summary

When users changed REPO= between runs, the old repository content persisted because the worker container wasn't recreated with the new volume mount.

Root Cause

In ensure_containers(), if Temporal is already healthy, the function returns early without refreshing the worker container. The existing fix for OUTPUT_DIR wasn't applied to TARGET_REPO.

Solution

Add the same worker refresh logic for TARGET_REPO that already exists for OUTPUT_DIR. Docker compose will only recreate the container if the mount actually changed.

Changes

  • shannon: Added TARGET_REPO refresh logic (7 lines)

Test plan

  • Run ./shannon start URL=... REPO=/path/to/repo1
  • Run ./shannon start URL=... REPO=/path/to/repo2
  • Verify the second run uses repo2's source code

Fixes #70

When users changed REPO= between runs, the old repository content
persisted because the worker container wasn't recreated with the
new volume mount.

This adds the same refresh logic that already exists for OUTPUT_DIR
to also handle TARGET_REPO changes. Uses --force-recreate to guarantee
the container picks up the new mount.

Fixes KeygraphHQ#70
@ChinmayShringi ChinmayShringi force-pushed the fix/repo-change-between-runs branch from fc74603 to f44b058 Compare February 7, 2026 19:52
@keygraphVarun
Copy link
Copy Markdown
Collaborator

We've fixed this more comprehensively in #107

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.

Cannot Change Repo Between Runs

2 participants