Skip to content

feat(plugin-oracle): show login handshake phase in connection-dropped diagnostic (#1746)#1763

Merged
datlechin merged 1 commit into
mainfrom
fix/oracle-handshake-phase-diagnostics
Jun 23, 2026
Merged

feat(plugin-oracle): show login handshake phase in connection-dropped diagnostic (#1746)#1763
datlechin merged 1 commit into
mainfrom
fix/oracle-handshake-phase-diagnostics

Conversation

@datlechin

Copy link
Copy Markdown
Member

Why

The #1746 crash is fixed, but the reporter (Oracle 11.2.0.4, no encryption) still can't connect: TablePro shows "the server closed the connection during the login handshake" (.authConnectionDropped, from oracle-nio's uncleanShutdown). There's no information about where in the handshake the server dropped us, so the report is opaque.

The fork already supports 11g at the version/auth layer (TNS_VERSION_MIN_ACCEPTED = 313, 10G/11G/12C verifiers), so this is not the upstream "12.1 floor" case. The drop is somewhere in negotiation/auth, and oracle-nio already records the phase in OracleSQLError.handshakePhase (connect / advancedNegotiation / protocolNegotiation / dataTypeNegotiation / preAuthentication / authentication). The plugin was discarding it.

Note: the pcap attached to the issue is an SQLcl session, not TablePro, so it doesn't show the failure. This change captures the missing signal directly from the app.

What

Instrument-only, no fork change:

  • Log the handshake phase and oracle-nio code on connect failure.
  • Surface the phase in the "Connection Dropped During Handshake" dialog as a DiagnosticEntry (same pattern as the existing "Verifier flag" entry), plus a suggested action to file an issue with the phase.
  • Extract the connect-error string classification into a pure OracleConnectErrorClassifier in TableProPluginKit (mirrors OracleChannelFatalCode) so it's unit-testable instead of dead-gated.

Once the reporter comes back with the phase: dataTypeNegotiation points at the uncleared Oracle 23ai capability bits in adjustForServerCompileCapabilities; authentication points at a verifier issue; connect at TLS/listener.

Notes

  • Oracle is a registry-only plugin, so this ships via a plugin-oracle-v* release.
  • OracleConnectErrorClassifier is a new public PluginKit type (additive ABI, no version bump).

Tests

  • OracleConnectErrorClassifierTests: uncleanShutdown → dropped, serverVersionNotSupported → version, unsupportedVerifierType(...) → verifier (flag preserved), other → generic.
  • swiftlint lint --strict clean on changed files.

https://claude.ai/code/session_01NVomHPErfCr8FWRVywmyVP

@datlechin datlechin merged commit 4933917 into main Jun 23, 2026
1 of 2 checks passed
@datlechin datlechin deleted the fix/oracle-handshake-phase-diagnostics branch June 23, 2026 11:08
@mintlify

mintlify Bot commented Jun 23, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
TablePro 🔴 Failed Jun 23, 2026, 11:11 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ac659eb755

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

case "uncleanShutdown":
return .authConnectionDropped
case "serverVersionNotSupported":
switch OracleConnectErrorClassifier.classify(error.code.description) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid depending on an unversioned PluginKit symbol

This makes the downloadable Oracle plugin link against OracleConnectErrorClassifier, a symbol that does not exist in already-released TablePro apps whose currentPluginKitVersion is still 18. Because the Oracle plugin Info.plist still declares TableProPluginKitVersion 18 and has no TableProMinAppVersion, local zip/bundle installs are accepted by validateBundleVersions in those older apps, then the bundle can fail to load with an unresolved symbol. Keep this classifier in the Oracle plugin or add an app/version gate for the plugin binary when consuming a new PluginKit API.

Useful? React with 👍 / 👎.

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.

1 participant