feat!: remove the bundled SSH tunnel in favour of the erpl_tunnel extension - #119
Merged
Conversation
…ension erpl bundled an SSH tunnel in tunnel/. It is superseded by erpl-tunnel, which does strictly more -- reverse tunnels, Tailscale and NetBird backends, peer discovery -- and has published to get.erpl.io since 2026-07-26 on more platforms than erpl itself ships, linux_arm64 included. Nothing is lost: the secret type is the same ssh_tunnel with a superset of parameters, and every function erpl had exists there. erpl_rfc never depended on the tunnel in either direction. This is a bug fix as much as a cleanup. While erpl bundled its own, it silently SHADOWED the dedicated extension: the name erpl_tunnel was already claimed, so `INSTALL erpl_tunnel; LOAD erpl_tunnel;` succeeded, changed nothing, and left the caller on the weaker implementation with no error. Nobody with erpl installed could migrate. Freeing the name is what unblocks them, and is why the stubs live in erpl_rfc rather than in a surviving erpl_tunnel extension. What remains is a stub per moved function -- tunnel_create, tunnel_close, tunnel_close_all, tunnels() -- raising a message that names the extension, the two-line install, and the repository. Each carries the original named parameters, so a realistic call reaches the message instead of a signature error. The ssh_tunnel secret type is deliberately NOT registered: RegisterSecretType throws on a duplicate, which would make LOAD erpl_tunnel fail outright. The stubs register only when the name is absent, so `LOAD erpl_tunnel` followed by `LOAD erpl` cannot displace a working implementation. Both orders are tested against a real erpl_tunnel build; both end with all nine functions present and the real implementation serving them. That needs erpl-tunnel's replace-on-conflict fix -- without it the reverse order aborts the LOAD, which is the migration path the stub message itself recommends. Also drops libssh2 from rfc/vcpkg.json (nothing else used it), sql_tests_tunnel and its docker-compose SSH mock, and the trampoline's embed/extract/load of erpl_tunnel on all three platforms. The released bundle goes from 290 MB to 242 MB. Suites after the change: rfc 28/28 and odp 24/24 on both RFC backends, smoke test green.
The plan recorded that duplicate names do not throw and that last registration wins. That came from a probe against the statically linked debug build, where extensions register through a different path, and it does not hold for real loadable extensions: LOAD erpl_tunnel aborts on the first name erpl's stubs already hold. Records what the real test showed, the half-registered state that fixing only the pragmas produces, the companion erpl-tunnel PR, and the release ordering it imposes.
The Windows smoke test failed with 'Error during extraction: Failed to find resource: LIBSSH2'. Dropping libssh2 from rfc/vcpkg.json with the bundled SSH tunnel means vcpkg no longer builds it, so attach_vcpkg_dlls_as_resources -- which globs whatever vcpkg produced -- had nothing to attach, while the extraction side still asked for it by name. zlib1.dll goes the same way; it was only there as a libssh2 dependency. The underlying trap is that the attach side globs and the extract side is a hardcoded list, so the two can drift silently and a missing resource fails the whole extraction rather than just that file. Noted in a comment at the list. Caught by CI: Linux and macOS never see this path, and the release build links fine -- only the Windows smoke test exercises resource extraction.
jrosskopf
added a commit
that referenced
this pull request
Aug 22, 2026
Covers both features that landed since v2026.08.19: the runtime-selectable RFC backend (#118), which had no changelog entry at all, and the removal of the bundled SSH tunnel (#119). Also bumps the two version constants to match the tag. Both carry a "bump on release" comment and both had drifted -- telemetry's kProductVersion still said 2026.07.02 and the feedback banner 2026.07.24, so every event and banner since has been stamped with a version that was never released.
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.
erpl bundled an SSH tunnel in
tunnel/. It is superseded by erpl-tunnel, which does strictly more. Full analysis inTUNNEL_REMOVAL_PLAN.md.Nothing is lost
tunnel/erpl-tunneltunnel_create,tunnel_close,tunnel_close_all,tunnels()ssh_tunnelsecrettunnel_peers,tunnel_self, mesh backends,bind_allerpl_rfcnever depended on the tunnel in either direction — it is a plain port forwarder.This is a bug fix, not just cleanup
While erpl bundled its own tunnel it silently shadowed the dedicated extension. Demonstrated against real artifacts:
The name was already claimed, so the second
LOADwas a no-op. Nobody with erpl installed could migrate. Freeing the name is why the stubs live inerpl_rfcrather than in a survivingerpl_tunnel.What remains
A stub per moved function, raising a message that names the extension, the two-line install, and the repo. Each carries the original named parameters so a realistic call reaches the message rather than a signature error.
The
ssh_tunnelsecret type is deliberately not registered —RegisterSecretTypethrows on a duplicate, which would makeLOAD erpl_tunnelfail outright.Stubs register only when the name is absent, so
LOAD erpl_tunnelthenLOAD erplcannot displace a working implementation.Testing found the stubs would otherwise break the migration they advertise:
RegisterFunction(PragmaFunction)and theCreateTableFunctionInfooverload leaveon_conflictatERROR_ON_CONFLICT. Fixing only the pragmas moved the abort to thetunnelstable function and left the extension half-registered (loaded = false,tunnel_peers/tunnel_selfmissing) — which looks like success unless you count the functions. erpl-tunnel#5 makes those registrations replace instead.Both load orders are now verified end-to-end: all nine functions present, real implementation serving,
PRAGMA tunnel_close_allreturns "All tunnels closed successfully".Also
libssh2dropped fromrfc/vcpkg.json; nothing else used it.sql_tests_tunneland its docker-compose SSH mock removed.erpl_tunnelon any platform.Testing
rfc 28/28 and odp 24/24 on both RFC backends; smoke test green; BICS running.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.