Skip to content

fix: support native T3 executables during setup - #9

Merged
eimexdev merged 2 commits into
masterfrom
fix/native-t3-discovery
Sep 15, 2026
Merged

eimexdev merged 2 commits into
masterfrom
fix/native-t3-discovery

Conversation

@eimexdev

Copy link
Copy Markdown
Owner

Problem

Setup reports "No supported running T3 instance found" for native T3 installations even when the server is running and the correct data directory is supplied. Native distributions launch t3 serve; discovery treats serve as a JavaScript entrypoint and fails to resolve it.

Change

Recognize a running native executable by its platform package name and binary filename, retain the data-directory and loopback-origin checks, and invoke its credential commands directly. Scan the executable bytes for the installer's existing Codex launch-argument capability marker without decoding the binary as UTF-8.

Add regression coverage for native discovery, issuance, renewal, failed-verification revocation, unrelated packages, and mismatched data directories. The fixture copies Node to emulate the native executable's argument layout without adding a compiler or downloading T3 in CI.

Validation

  • Regression tests failed with the original discovery error before the fix and pass afterward.
  • npm test: 57 passed, two Windows-only tests skipped on Linux.
  • npm run check and npm pack --dry-run passed.
  • Verified against the running Linux T3 0.0.41-nightly.20260914.1722: discovery, capability detection, credential issuance, and authenticated verification passed. The temporary credential was revoked afterward.

Native macOS and Windows installations have not been manually verified.

@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: d842f0c8-f911-4376-8697-5da79c5bcc80


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-15T04:02:39.787560Z 730abc0 New commits
🔒 Security Review Completed 2026-09-15T04:00:07.227687Z ff27b4f PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: ff27b4ff5a

ℹ️ 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".

Comment thread src/setup.ts Outdated
const pkg = JSON.parse(
readFileSync(join(dirname(executable), "package.json"), "utf8"),
);
if (pkg.name !== `@t3code/t3-${process.platform}-${process.arch}`) return;

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 Validate the target executable architecture independently

On Apple Silicon, setup can run under an x64 Node/Rosetta installation while the running T3 executable is the native arm64 package (or vice versa). process.arch describes the setup process rather than the inspected executable, so this exact package-name comparison rejects that otherwise valid local server and reports that no supported T3 instance was found. Accept the supported package architectures for the current platform or determine the target executable's architecture directly.

Useful? React with 👍 / 👎.

@eimexdev
eimexdev merged commit 86dad22 into master Sep 15, 2026
9 of 10 checks passed
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