@debugg-ai/debugg-ai-mcp 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Fixed — concurrent callers joining a pending tunnel revoke their redundant key
|
|
11
|
+
|
|
12
|
+
- When caller B's request for a localhost URL arrives while caller A's tunnel for the same port is still provisioning, B used to silently join A's promise and throw away B's own minted ngrok key (and its `revokeKey` callback) — an orphan-key-on-backend leak. B now revokes its redundant key immediately on join. Bead `7qh` finding 2.
|
|
13
|
+
|
|
10
14
|
### Added — tunnel fault-injection + trace harness for diagnosis
|
|
11
15
|
|
|
12
16
|
- New `DEBUGG_TUNNEL_FAULT_MODE` env var (dev/test only — inert when `NODE_ENV=production`) lets developers force specific ngrok-side failures without mocking, to reproduce client-reported transient "Tunnel setup failed" incidents. Modes: `fail-connect-N:<count>`, `empty-url-N:<count>`, `delay-connect:<ms>`, combinable with commas. Bead `42g`.
|
|
@@ -213,6 +213,13 @@ class TunnelManager {
|
|
|
213
213
|
// 2. Deduplicate concurrent creation requests for the same port
|
|
214
214
|
const pending = this.pendingTunnels.get(port);
|
|
215
215
|
if (pending) {
|
|
216
|
+
// Bead 7qh Finding 2: our minted tunnelKey/keyId are now redundant — the
|
|
217
|
+
// in-flight call owns the tunnel for this port. Revoke our key up-front
|
|
218
|
+
// so it doesn't orphan on the backend. Failures are swallowed: we can't
|
|
219
|
+
// let cleanup break the join.
|
|
220
|
+
if (revokeKey) {
|
|
221
|
+
revokeKey().catch((err) => logger.warn(`Failed to revoke redundant key while joining pending tunnel for port ${port}:`, err));
|
|
222
|
+
}
|
|
216
223
|
const info = await pending;
|
|
217
224
|
return { url: info.publicUrl, tunnelId: info.tunnelId, isLocalhost: true };
|
|
218
225
|
}
|