Skip to content

Defer external resources until process initialization - #292

Open
toby-coleman wants to merge 7 commits into
mainfrom
worktree/silver-valley-213f
Open

toby-coleman wants to merge 7 commits into
mainfrom
worktree/silver-valley-213f

Conversation

@toby-coleman

Copy link
Copy Markdown
Contributor

Process construction currently truncates FileWriter destinations and starts Ray/ZMQ resources, so read-only CLI operations such as validate and diagram can mutate external state. This change adds an explicit async connector initialization phase, validates topology before that phase, and defers file truncation plus Ray component/channel/state actors and ZMQ sockets/proxies until execution initialization.

Regression coverage verifies that construction, validation, diagramming, and export preserve existing output files and make no actor, socket, or proxy calls. It also verifies that invalid topology fails before writers or connectors initialize.

Validation:

  • uv run ruff check
  • uv run ruff format --check
  • uv run ty check plugboard/ plugboard-schemas/plugboard_schemas/ tests/
  • focused process, CLI, writer, and validation suite: 87 passed, 6 skipped
  • ZMQ pub/sub suite: 6 passed

The broader unit run reached 116 passed and 6 skipped before the local Ray worker environment stalled while rebuilding the project from Ray's packaged working directory, where setuptools-scm could not find Git metadata.

paddor and others added 7 commits September 1, 2026 11:48
Add a small backend selector for ZMQ imports so existing PyZMQ behavior remains default while PLUGBOARD_ZMQ_BACKEND=pyomq can use pyomq.

Wire the ZMQ channel and proxy through the selector, add the optional plugboard[omq] extra, and cover backend selection plus pyomq socket/proxy smoke paths.
# Conflicts:
#	pyproject.toml
#	uv.lock

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 01db9f6974

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +40 to +41
self._actor: _t.Any = None
self._init_lock = asyncio.Lock()

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 Badge Preserve direct RayChannel usability after construction

When callers instantiate the public RayChannel class directly rather than obtaining it through RayConnector, the actor now remains None, so send(), recv(), close(), maxsize, and is_closed all fail with AttributeError unless the caller knows to invoke the newly added RayChannel.init() first. Channel has no initialization lifecycle in its interface, and these operations worked immediately after construction before this change; either retain that behavior for direct instances or formally expose and enforce the new lifecycle across the channel API.

AGENTS.md reference: AGENTS.md:L140-L145

Useful? React with 👍 / 👎.

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.

2 participants