fix: avoid virtual auto-provision startup deadlock#73
Merged
Conversation
Replace push-based HTTP callback reset with pull-based command polling. Virtual pathway instances now poll the CP every 5s for pending commands instead of exposing a public reset endpoint. New: - CommandPoller class polls GET /api/v1/pathways/:pathwayId/commands/pending - Reports status via POST /api/v1/pathways/:pathwayId/commands/:commandId/status - Phase flow: acknowledged → execute resetPump() → running (or failed) - Auto-starts when pathwayName is configured and pump starts - Configurable via commandPollingIntervalMs (default: 5000ms) Breaking changes: - advertisedUrl, resetSecret, resetPath constructor params deprecated (accepted but ignored) - pathwayName no longer requires advertisedUrl or resetSecret - processReset() on PathwayRouter deprecated (returns no-op with warning) - virtualConfig in provision() no longer sends resetUrl or authHeaders The library reuses its existing apiKey for polling authentication (tenant-mode FRN auth on the CP side). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rl/resetSecret Remove assertThrows tests for the old validation that required advertisedUrl + resetSecret when pathwayName is set. These fields are now deprecated and ignored. Add test for the new commandPollingIntervalMs option and for pathwayName without any deprecated fields. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts: # src/pathways/builder.ts # tests/pathway-builder-config.test.ts
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
Test plan