feat: add process topology validation (cycle detection, input connectivity, event matching)#212
Draft
feat: add process topology validation (cycle detection, input connectivity, event matching)#212
Conversation
…, and validation utilities - Add _graph.py with Johnson's cycle-finding algorithm (no additional dependencies) - Add _validation.py with validation utilities for process topology: - validate_all_inputs_connected: check all component inputs are connected - validate_input_events: check input events have matching output producers - validate_no_unresolved_cycles: check circular connections have initial_values - Add model validator on ProcessSpec for circular connection detection - Export new utilities from plugboard_schemas - Add comprehensive unit tests Co-authored-by: toby-coleman <13170610+toby-coleman@users.noreply.github.com>
…t filter Co-authored-by: toby-coleman <13170610+toby-coleman@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add model validation checks for Process objects
feat: add process topology validation (cycle detection, input connectivity, event matching)
Feb 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements validation checks in
plugboard-schemasforProcessSpecobjects: circular connection detection (withinitial_valuesresolution), input connectivity checking, and input event producer matching. Includes a dependency-free implementation of Johnson's algorithm for cycle finding.Changes
plugboard-schemas/plugboard_schemas/_graph.py— Johnson's algorithm for finding all simple cycles in a directed graph, backed by Tarjan's SCC. No additional dependencies.plugboard-schemas/plugboard_schemas/_validation.py— Three validation utilities:validate_no_unresolved_cycles— Rejects circular connections unlessinitial_valuesis set on a target input within the loop. Integrated as a@model_validatoronProcessSpec.validate_all_inputs_connected— Checks all component inputs have a connector targeting them. Runtime utility (requires component IO info unavailable at schema level).validate_input_events— Checks every component input event type has a corresponding output event producer in the process. Runtime utility.plugboard-schemas/plugboard_schemas/process.py— Added_validate_no_unresolved_cyclesmodel validator toProcessSpec.plugboard-schemas/plugboard_schemas/__init__.py— Exportssimple_cycles,validate_all_inputs_connected,validate_input_events,validate_no_unresolved_cycles.tests/unit/test_process_validation.py— 22 tests covering graph algorithms and all three validators.Cycle detection runs automatically at schema validation time:
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
metadata.google.internal/home/REDACTED/work/plugboard/plugboard/.venv/bin/python /home/REDACTED/work/plugboard/plugboard/.venv/bin/python /home/REDACTED/work/plugboard/plugboard/.venv/lib/python3.12/site-packages/ray/dashboard/dashboard.py --host=127.0.0.1 --port=8265 --port-retries=50 --temp-dir=/tmp/ray --log-dir=/tmp/ray/session_2026-02-15_20-02-50_710987_4556/logs --session-dir=/tmp/ray/session_2026-02-15_20-02-50_710987_4556 --logging-rotate-bytes=536870912 --logging-rotate-backup-count=5 --gcs-address=127.0.0.1:37286 --cluster-id-hex=dd8876c4aa51e44e977e6f18e99fba51b5fa9c786306671ad38becdd --node-ip-address=127.0.0.1 --stdout-filepath=/tmp/ray/session_2026-02-15_20-02-50_710987_4556/logs/dashboard.out --stderr-filepath=/tmp/ray/session_2026-02-15_20-02-50_710987_4556/logs/dashboard.err cal/bin/git(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.