Skip to content

Conversation

daryllimyt
Copy link
Contributor

@daryllimyt daryllimyt commented Jul 19, 2025

Checklist

  • Read CONTRIBUTING.md.
  • PR title is short and non-generic (see previously merged PRs for examples).
  • PR only implements a single feature or fixes a single bug.
  • Tests passing (uv run pytest tests)?
  • Lint / pre-commits passing (pre-commit run --all-files)?

Description

Related Issues

Screenshots / Recordings

Steps to QA


Summary by cubic

Improved repository isolation by running untrusted repo inspection in a subprocess and extracting action metadata without importing user code into the main process. This makes loading external actions safer and more reliable.

  • Repository Isolation
    • Added a subprocess-based inspector to extract action metadata from external repositories.
    • Actions from remote repos are now registered using metadata, not direct imports.
    • Each repo is installed in its own venv for isolation.
    • Updated SSH and executor logic to remove unnecessary session passing and optimize runtime environments for built-in actions.

@daryllimyt daryllimyt changed the title Feat/better repo isolation feat(engine): Better user registry repo isolation Jul 19, 2025
@daryllimyt daryllimyt added the engine Improvements or additions to the workflow engine label Jul 19, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

cubic analysis

2 issues found across 7 files • Review in cubic

React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.

@daryllimyt daryllimyt requested a review from topher-lo July 19, 2025 06:08
@daryllimyt
Copy link
Contributor Author

@cubic-dev-ai please re-review

Copy link
Contributor

cubic-dev-ai bot commented Jul 20, 2025

@cubic-dev-ai please re-review

@daryllimyt I've started the AI code review. It'll take a few minutes to complete.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

cubic analysis

1 issue found across 9 files • Review in cubic

React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.

daryllimyt and others added 12 commits July 21, 2025 12:53
- Split runtime environment setup into get_ray_runtime_env function
- Add is_builtin_action function to check if action origin is DEFAULT_REGISTRY_ORIGIN
- Modify run_action_on_ray_cluster to skip runtime env for builtin actions
- Add module field to BoundRegistryAction model

This optimization improves performance by avoiding unnecessary runtime
environment setup for builtin actions that don't require custom dependencies.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Add RegistryActionMetadata model for standardized action metadata
- Create new inspector.py module for subprocess-based inspection
- Add utility functions for walking modules and extracting metadata:
  - construct_module_name, walk_module_py_files, walk_module_yaml_files, walk_module_udfs
  - metadata_from_function, metadata_from_template
- Add _inspect_repo_via_subprocess method to Repository class
- Add helper functions for venv path management

This isolates repository inspection in subprocess for better security
and reliability when loading untrusted code.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Signed-off-by: Daryl Lim <[email protected]>
@daryllimyt daryllimyt force-pushed the feat/better-repo-isolation branch from b037a51 to 07cc561 Compare July 21, 2025 16:53
@topher-lo topher-lo removed their request for review July 30, 2025 01:52
@topher-lo topher-lo marked this pull request as draft July 30, 2025 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine Improvements or additions to the workflow engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant