Skip to content

fix(install): verify archives in homes with backslashes or newlines - #25240

Open
maria-rcks wants to merge 1 commit into
mainfrom
maria/takeover-pr-22415
Open

maria-rcks wants to merge 1 commit into
mainfrom
maria/takeover-pr-22415

Conversation

@maria-rcks

@maria-rcks maria-rcks commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The installer rejects valid releases when T3CODE_HOME contains a backslash or newline. Both checksum tools escape those filenames and prefix their output with a backslash, corrupting the parsed digest.

Change

Hash stdin with sha256sum and shasum -a 256. Keep exact digest comparison and invalid-checksum rejection unchanged. Add regression cases to the existing installer test file, using each available checksum tool in isolation.

Verification

  • Reproduced on current main: valid backslash and newline homes fail with checksum mismatch; invalid digests remain rejected.
  • Blacksmith: vp test run scripts/install.test.ts, scripts typecheck, and vp run check:changed HEAD (format, lint, knip, typecheck, installer tests).
  • Real shell installer downloads local release archives, installs and launches valid releases, and rejects invalid digests with staging cleanup. Both checksum tools exercised on Linux.
  • Two independent GPT-6.1-Sol reviews approved head 6de43e878f943ba39addead9fe3c7d3fc7f9d195 with no findings.
  • GitHub CI passed, including build/typecheck, lint, tests, release smoke, and Macroscope correctness.
  • CodeRabbit reported its review rate limit; that review is unverified. Native macOS and Windows are unverified. No UI changes.

Takeover

Replaces #22415, with thanks to @Lucenx9 for the original implementation.

Built with GPT-6.1-Sol in the Codex harness on T3 Code.

Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Only developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing.

Next included review available in 14 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 53896ae and 6de43e8.

Files selected for processing: 2
  • scripts/install.sh
  • scripts/install.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Oct 26, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 6de43e8

Macroscope's review found this PR approvable — This is a small, self-contained installer fix that preserves normal checksum behavior while supporting homes with backslashes or newlines. The accompanying integration tests cover both checksum implementations and failure handling without changing production behavior outside the targeted bug fix.

You can add or adjust custom eligibility rules. Learn more.

maria-rcks commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator Author

Note

Written by gpt-6.1-sol on behalf of Maria

Verified in a real dev environment

result: the checksum fix works, but backslash-home installation is still broken end to end with the real published v0.1.3 linux-x64 executable. no code changes or pushes.

  • baseline: github/main at c3f5e363e5, installed dependencies in /home/user/main. the real shell installer downloaded the official github v0.1.3 archive. both sha256sum and shasum rejected valid archives in backslash and newline homes with checksum mismatch (exit 1).
  • pr: exact head 6de43e878f943ba39addead9fe3c7d3fc7f9d195, dependencies installed, real dev server started in the background with isolated .t3 state. main's dev server was stopped first. actual ports: web 5733, server 13773.
  • both checksum tools passed verification for both special homes. newline homes installed, launched t3 --version as t3 v0.1.3, and repeated installs reused the complete download. an installed newline-home executable also served the real web client on port 17777 (http 200).
  • backslash homes passed checksum verification and extraction, then the published executable crashed during the installer's --version probe: ERR_INVALID_MODULE_SPECIFIER, @cursor/sdk/dist/cjs/index.js, encoded %5C in its file url. both tools hit the same failure; installer exit 1 and staging cleanup succeeded. the regression test uses a shell stub executable, so it does not expose this runtime failure. changing the checksum code cannot repair the already published archive. a release/runtime fix is needed before backslash-home installs work end to end.
  • nearby behavior: ordinary homes installed and launched with both tools on main and pr. repeated installs succeeded. intentionally invalid checksum manifests, served with the unmodified real release archive through a local mirror, were rejected with exit 1 and no remaining staging/installed version for both tools on both revisions.
  • real client/provider path: repo-dependency playwright with /usr/bin/google-chrome, added a project pointing to a real git repo through the ui, selected codex gpt-6.1-sol, sent a readme/git-branch request, and saw the correct file contents and master response. a second turn returned the requested follow-up text. no replay provider, demo data, or mocked provider.
  • blacksmith: all 6 existing installer tests passed. vp run check:changed HEAD^ passed format, lint, both knip passes, scripts typecheck, and installer tests. the worker needed a depth-2 fetch of this head for the comparison. git.cafe reports 28 successful ci contexts, 0 failing, 0 pending.

short command transcript:

T3CODE_VERSION=0.1.3 T3CODE_HOME=<case> T3CODE_INSTALL_BIN_DIR=<case>/bin sh scripts/install.sh
                             sha256sum       shasum
main ordinary                install+launch  install+launch
main backslash/newline       mismatch        mismatch
pr ordinary/newline          install+launch  install+launch
pr backslash                 checksum passes; executable fails with ERR_INVALID_MODULE_SPECIFIER
main+pr invalid digest       reject+cleanup  reject+cleanup

full installer runtime transcript

real codex readme and git branch response

real codex follow-up turn in the pr dev client

Not verified

native macos/windows, desktop electron, ios/android, and linux arm64 were not exercised on this linux-x64 vm. a newly built release containing this pr was not published or tested; installer checks used official v0.1.3 release bytes. end-to-end backslash-home use is blocked by the published executable's loader crash described above. provider turns ran against the pr dev server in an ordinary isolated home, not a backslash home. this pr has no visual ui changes, so before/after ui screenshots do not apply. uploaded recording playback and seeking were checked in t3's browser player.

Copy link
Copy Markdown
Collaborator Author

Note

Written by gpt-6.1-sol on behalf of Maria

Verified in a real dev environment

result: checksum verification works, but backslash-home installation still fails end to end with the current published v0.1.5 linux-x64 executable. no code changes or pushes.

  • reproduced on github/main at 36dac688a17c6de1c6398e62d01546fb787c185b in /home/user/main, after vp i: valid backslash and newline homes fail with checksum mismatch using both sha256sum and shasum in isolation.
  • checked out exact pr head 6de43e878f943ba39addead9fe3c7d3fc7f9d195, ran vp i, and started the real dev server in the background with isolated .t3 state. stopped main's server first by its captured pid. pr ports: web 5733, server 13773.
  • ran the unmodified installers against official v0.1.5 release bytes, verified against the official sha256 manifest. a local release mirror served those identical bytes; negative cases changed only the manifest digest. no stub executables or mocked providers.
  • both checksum tools now verify the valid archives in both special homes. newline homes install and launch t3 v0.1.5. ordinary homes install and launch on both revisions. repeat installs reuse the completed download.
  • backslash homes pass checksum verification and extraction, then the published executable crashes during the installer's --version probe: ERR_INVALID_MODULE_SPECIFIER, loading @cursor/sdk/dist/cjs/index.js through a file url containing %5C. both checksum tools reproduce it. the installer exits 1 and cleans staging. changing checksum parsing cannot repair the published executable; a runtime/release fix remains necessary. the existing regression test's shell executable does not expose this failure.
  • neighboring behavior: both revisions and checksum tools reject deliberately invalid manifests in both special homes, leaving runtime/versions empty.
  • real client/provider: repo-dependency playwright with /usr/bin/google-chrome; added a real git project through the ui, selected codex gpt-6.1-sol, and sent a readme/git-branch request. the response contained the exact readme text and master. a second turn returned follow-up verified 25240. reloading preserved the conversation; git status stayed clean. the first turn recovered provider retries and completed within two minutes.
  • blacksmith: all 6 existing installer tests passed. vp run check:changed HEAD^ passed format, lint, both knip passes, scripts typecheck, and installer tests. git.cafe reports 28 successful ci contexts, 0 failing, 0 pending.
T3CODE_VERSION=0.1.5 T3CODE_HOME=<case> T3CODE_INSTALL_BIN_DIR=<case>/bin sh scripts/install.sh
                             sha256sum          shasum
main ordinary                install + launch   install + launch
main backslash/newline       checksum mismatch  checksum mismatch
pr ordinary/newline          install + launch   install + launch
pr backslash                 checksum passes; published executable loader crashes
main + pr invalid digest     reject + cleanup   reject + cleanup

full runtime transcript

real codex readme and branch response in the pr client

real codex follow-up submission and response

Not verified

native macos/windows, electron, ios/android, and linux arm64 were not exercised on this linux-x64 vm. no newly built release containing this pr was published or tested. provider turns ran through the pr dev server in an ordinary isolated home, not through a release installed in a special home. backslash-home use is blocked by the real published executable's loader crash above. this pr has no visual ui changes, so matching before/after ui screenshots do not apply. captures were inspected; uploaded video playback through completion and seeking were checked in t3's browser player.

GigaZoro pushed a commit to GigaZoro/CodeShip that referenced this pull request Oct 30, 2026
…upstream pingdotgg#25240)

Cherry-picked from pingdotgg#25240

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GigaZoro pushed a commit to GigaZoro/CodeShip that referenced this pull request Oct 30, 2026
Upstream pingdotgg#12025, pingdotgg#24320, pingdotgg#25181 and pingdotgg#25240 added strings and test expectations that still say T3 Code, and pingdotgg#23561/pingdotgg#24320 left issue numbers in comments that the low-value-comment lint rejects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant