From bbbb7461d19e611e6fab3f24edd5f8e0d2d45b1e Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 15 Feb 2026 08:28:43 +0200 Subject: refactor: implement context-aware network dialing Modernize network dialing to use Go's context-aware patterns for better cancellation support and connection reliability. Changes: - Update Go version from 1.24 to 1.25 in go.mod - Replace ssh.Dial with net.Dialer.DialContext + ssh.NewClientConn for SSH client connections in serverconnection.go - Add TCP KeepAlive (30s) for SSH connection health monitoring - Implement context-aware dialing for SSH agent connections in ssh.go - Improve error messages to distinguish dial vs SSH handshake failures - Update AGENTS.md with integration test requirements Benefits: - Context cancellation now properly affects connection establishment - TCP KeepAlive prevents silent connection failures - Better integration with Go's cancellation patterns - Improved reliability for distributed systems All integration tests pass with race detection enabled. Co-Authored-By: Claude Sonnet 4.5 --- AGENTS.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'AGENTS.md') diff --git a/AGENTS.md b/AGENTS.md index 845ec5b..944ea56 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -43,15 +43,20 @@ make pgo make test # Run all tests including integration tests +# IMPORTANT: Always rebuild binaries before running integration tests +make clean && make build DTAIL_INTEGRATION_TEST_RUN_MODE=yes make test +# Quick integration test workflow (recommended) +make build && DTAIL_INTEGRATION_TEST_RUN_MODE=yes make test + # Run linting make lint # Run go vet make vet -# Run integration tests individually (requires binaries built) +# Run integration tests individually (requires binaries built first) cd integrationtests && go test ``` @@ -153,7 +158,15 @@ make profile-help ## Test Execution Details -- Integration tests are run by setting DTAIL_INTEGRATION_TEST_RUN_MODE to yes, and by running 'make test'. +- Integration tests require binaries to be built before execution +- **IMPORTANT:** Always recompile binaries after code changes before running integration tests: + ```bash + make clean && make build + DTAIL_INTEGRATION_TEST_RUN_MODE=yes make test + ``` +- Integration tests are run by setting DTAIL_INTEGRATION_TEST_RUN_MODE to yes, and by running 'make test' +- Integration tests verify: DCat, DGrep, DMap (MapReduce), DServer, DTail, DTailHealth functionality +- All tests run with race detection enabled (`--race` flag) ## Known Limitations -- cgit v1.2.3