Skip to content

Add missing verify_latency.py to fix CI "Verify Closed-Loop Latency" step#6

Merged
DaScient merged 2 commits intocopilot/fix-test-collection-errorfrom
copilot/fix-verify-latency-file-path
Apr 9, 2026
Merged

Add missing verify_latency.py to fix CI "Verify Closed-Loop Latency" step#6
DaScient merged 2 commits intocopilot/fix-test-collection-errorfrom
copilot/fix-verify-latency-file-path

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

The CI workflow references src/distributed_routing/verify_latency.py but the file never existed, causing the "Verify Closed-Loop Latency" step to hard-fail on every run.

Changes

  • src/distributed_routing/verify_latency.py — new script that verifies inter-organoid routing delays satisfy τ = L / v, consistent with the formula already implemented in programmable_delay_lines.rs. Checks each path against a [0.5, 20.0] ms tolerance window and exits non-zero on any violation.
ROUTING_PATHS = [
    ("Module-A → Module-B",  5.0,  0.5),  # (label, path_length_mm, velocity_m_s)
    ("Module-B → Module-C", 10.0,  0.8),
    ...
]

def calculate_delay_ms(path_length_mm, conduction_velocity_m_s):
    """τ = L / v, returned in milliseconds."""
    return (path_length_mm / 1000.0) / conduction_velocity_m_s * 1000.0

Tolerance bounds (0.5 ms min, 20.0 ms max) reflect cultured cortical network coupling windows at representative conduction velocities of 0.1–1 m/s over millimetre-scale organoid separations.

Copilot AI changed the title [WIP] Fix verify latency script file path issue Add missing verify_latency.py to fix CI "Verify Closed-Loop Latency" step Apr 9, 2026
Copilot AI requested a review from DaScient April 9, 2026 19:09
@DaScient DaScient marked this pull request as ready for review April 9, 2026 20:46
Copilot AI review requested due to automatic review settings April 9, 2026 20:46
@DaScient DaScient merged commit b0f1ea7 into copilot/fix-test-collection-error Apr 9, 2026
2 of 4 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds the missing src/distributed_routing/verify_latency.py script so the CI workflow’s “Verify Closed-Loop Latency” step no longer fails due to a nonexistent file, and enforces a latency tolerance check using the same ( \tau = L / v ) formula as the Rust delay-line implementation.

Changes:

  • Introduces verify_latency.py to compute propagation delays from path length and conduction velocity.
  • Validates each configured routing path’s delay against a fixed [0.5, 20.0] ms tolerance window and exits non-zero on any failure.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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