Skip to content

feat: implement futures to better handle async IPC & probes#131

Merged
encodeous merged 3 commits into
mainfrom
ac/futures
Jul 7, 2026
Merged

feat: implement futures to better handle async IPC & probes#131
encodeous merged 3 commits into
mainfrom
ac/futures

Conversation

@encodeous

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI 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.

Pull request overview

This PR introduces a small “Future” abstraction to support non-blocking IPC operations (notably endpoint probing), adds configurable IPC dispatch/probe timeouts, and upgrades probe reporting to include status/latency and DNS resolution details.

Changes:

  • Add Future[T] + dispatch-based futures to coordinate async work between IPC handling and the main dispatch loop.
  • Extend the IPC probe API to support per-request timeouts and return structured probe results (status, resolved endpoint, latency).
  • Add integration + e2e coverage for probe timeout/resolve/latency behavior, and update the nylon probe CLI to accept --timeout.

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
state/tunables.go Adds IPCDispatchTimeout tunable and sets a default.
protocol/nylon_ipc.proto Extends probe request/response schema (timeout + richer result fields).
protocol/nylon_ipc.pb.go Regenerated IPC protobuf bindings to reflect schema changes.
integration/ipc_test.go Adds integration test ensuring probe timeouts are reported.
e2e/probe_test.go Adds e2e tests for resolved DNS, latency reporting, and error/timeout statuses.
core/nylon_scheduler.go Adds NewDispatchFuture helper for dispatch-thread async work.
core/nylon_endpoints.go Refactors probing to return futures and report status/latency/resolution.
core/ipc_handler.go Reworks IPC probe handling to use futures + timeouts; adds timeout constants.
core/ipc_handler_test.go Adds unit test for probe timeout calculation/capping.
core/future.go Introduces Future[T] and AwaitAll.
core/future_test.go Adds unit tests for future single-consumption, ordering, and timeout.
cmd/probe.go Adds --timeout flag and prints richer probe output (status/resolved/latency).
Files not reviewed (1)
  • protocol/nylon_ipc.pb.go: Generated file

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

Comment thread core/nylon_endpoints.go
Comment thread core/ipc_handler.go
Comment thread core/future.go Outdated
Comment thread protocol/nylon_ipc.proto
Comment thread protocol/nylon_ipc.pb.go
@encodeous encodeous merged commit 160c97d into main Jul 7, 2026
6 checks passed
@encodeous encodeous deleted the ac/futures branch July 7, 2026 01:04
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