chore(server): keep the legacy service entry point to the npm package only - #11770
Conversation
… only #11732 restored dist/bin.mjs in the t3 npm package so a boot-service launcher from before the executable can start a version it just installed. It also wrote the same shim into every archive install, cached ones included, so an old launcher could start an archive-layout version through the old path. That case never occurs: an old launcher only ever installs through npm, and the first server it starts rewrites the unit to the executable, after which nothing runs the old path. The archive write meant a permanent fake node_modules/t3 in the runtime layout and a rewrite of cached installs on every check. Only the npm shim remains, with a note on when to remove it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (5)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe compatibility launcher now resolves executables from platform npm packages only. Pinned runtime installation and publication no longer create legacy entry points before validation. Tests were updated to remove archive-launch and cached-archive coverage. ChangesLauncher and pinned runtime changes
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Refactor Suggested reviewers: Merge Risk: ⚪ Minimal · up to The compatibility launcher and pinned-runtime validation changes are ready to merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused compatibility cleanup that retains and tests the legacy npm launcher while removing unused archive-layout shim generation and cached-runtime writes. Existing service startup remains on the pinned executable path, with no schema, security, billing, or deployment changes. You can add or adjust custom eligibility rules. Learn more. |
What changes
Follow-up to #11732, which fixed a real regression: a boot-service launcher installed before the executable runs
node <versions>/<v>/node_modules/t3/dist/bin.mjs, and #11607 had removed that file from thet3npm package, so every fleet update from a pre-1700 nightly failed after a successful install.That PR fixed it in two places. This keeps one and removes the other:
dist/bin.mjsin thet3npm package, a forwarder to the platform executable that preserves arguments, stdio, the launcher's IPC channel, signals, and exit status. This is the transition an old launcher actually goes through: it npm-installs the newt3, runs the old path, the executable starts, and the first server started this way rewrites the service unit to run the executable directly. After that nothing touches the file. The doc comment now says when to delete it (after the first stable release with the executable).ensureLegacyEntryinpinnedRuntime.ts, which wrote the same shim into every archive install, including cached ones on every status check, so an old launcher could start an archive-layout version through the old path. An old launcher never installs an archive (it predates archive installs), so that case does not occur, and it left a permanent fakenode_modules/t3/distin the runtime layout plus a write to cached installs on read. The"archive"variant of the script and its two tests go with it.Net: 25 insertions, 92 deletions;
legacyCliLauncherScripthas no parameter now.Verification
legacyCliLauncher.test.ts(IPC, args, termination through the npm shim),pinnedRuntime.test.ts, andbuild-npm-platform-packages.test.ts(which exercisesdist/bin.mjsfrom the built tarball): 10 pass.apps/server,packages/shared, andscripts; knip clean.Claude Fable 5 via Claude Code.
Summary by CodeRabbit