Skip to content

[Fix] Adding all of the files in the project directory to each image. - #51

Merged
iidsample merged 6 commits into
mainfrom
feature/all-the-files
Aug 29, 2026
Merged

[Fix] Adding all of the files in the project directory to each image.#51
iidsample merged 6 commits into
mainfrom
feature/all-the-files

Conversation

@Saaketh0

Copy link
Copy Markdown
Collaborator

Currently, each image getting built only gets the relevant Ventis code, plus stubs and grpc code, but any utility files in the original workflow that were not explicitly stubbed would get excluded. Fixed that.

I have not extensively looked over this code, this is just a initial release, will push any additional comments but this should still work.

@Saaketh0
Saaketh0 requested review from iidsample and nickhuo August 26, 2026 00:30
@Saaketh0 Saaketh0 self-assigned this Aug 26, 2026
@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 967a4032-0cfc-4bb4-890c-bc144e7da754


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Saaketh0 and others added 4 commits August 25, 2026 18:23
generate_docker()/generate_workflow_docker() now recursively sweep every
.py file under the project directory into the build context, preserving
directory structure, so helper files that aren't declared as an agent
entrypoint still make it into the image. Generated dirs (docker_container/,
stubs/, grpc_stubs/) are excluded at the project root only, not at every
depth.

Stub files are placed at their agent's declared entrypoint path (mapped
from global_controller.yaml) instead of a hardcoded guess, so a stub
overwrites the exact real file it replaces. Guards against absolute and
'..'-containing entrypoints, symlinked sources, and symlinked-destination
escapes, with warnings on unsafe or unmapped stubs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
# Conflicts:
#	ventis/cli.py
#	ventis/stub_generator.py
nickhuo added a commit that referenced this pull request Aug 27, 2026
PR #51 moved each generated stub from the context root to its agent's
entrypoint path, so the stub overwrites the real implementation the new sweep
places there. That part is right, but it was a move rather than an addition,
and the flat copy is what every caller actually imports:

    ModuleNotFoundError: No module named 'joke_agent'
      File "/app/workflow_launcher.py", line 21, in <module>
        exec(open("joke_workflow.py").read())

/app is sys.path[0], so `from joke_agent import JokeAgent` needs the stub at
/app/joke_agent.py. Every example's workflow does this -- helloworld's
`from example_agent import ExampleAgent` breaks the same way.

_stub_destination becomes _stub_destinations and returns both paths, flat
first. An agent's own entrypoint is still copied afterwards and wins its flat
name back, so in an agent image /app/joke_agent.py is the real adapter while
/app/agents/joke_agent.py is the stub; in a workflow image both are the stub.

Verified end to end on examples/joke_writer against live Bedrock: the three
generate_joke calls landed on replicas 0, 1 and 2, one each.
@nickhuo
nickhuo force-pushed the feature/all-the-files branch from 01a70f2 to 69d5405 Compare August 27, 2026 23:27
@iidsample
iidsample merged commit 8844cd6 into main Aug 29, 2026
4 of 5 checks passed
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.

3 participants