Skip to content

fix(telescope-install): drop bin/fsa hard-dependency; spawn via dart run fluttersdk_telescope#8

Merged
anilcancakir merged 3 commits into
masterfrom
fix/telescope-install-fastcli-fallback
May 28, 2026
Merged

fix(telescope-install): drop bin/fsa hard-dependency; spawn via dart run fluttersdk_telescope#8
anilcancakir merged 3 commits into
masterfrom
fix/telescope-install-fastcli-fallback

Conversation

@anilcancakir

Copy link
Copy Markdown
Contributor

Summary

telescope:install no longer depends on the AOT-compiled bin/fsa. The chained subprocess calls (install + plugin:install fluttersdk_telescope) now spawn dart run fluttersdk_telescope ... directly through the telescope CLI wrapper, mirroring the Cat C subprocess pattern landed in fluttersdk_dusk (dusk_install_command.dart Step 3.3 of the cross-repo plan dusk-cli-fixes-rename).

Bug

Before this change, telescope:install spawned ./bin/fsa plugin:install fluttersdk_telescope HARDCODED. On a clean checkout where bin/fsa has not been AOT-compiled yet, the command crashed:

✗ Unexpected error in telescope:install: ProcessException: No such file or directory
  Command: ./bin/fsa plugin:install fluttersdk_telescope
#0 _ProcessImpl._start (dart:io-patch/process_patch.dart:411:33)
#1 Process.start (dart:io-patch/process_patch.dart:42:20)
#2 _runNonInteractiveProcess (dart:io-patch/process_patch.dart:613:18)
#3 Process.run (dart:io-patch/process_patch.dart:56:12)
#4 TelescopeInstallCommand._defaultProcessRunner (lib/src/commands/telescope_install_command.dart:56:15)
#5 TelescopeInstallCommand.handle (lib/src/commands/telescope_install_command.dart:97:40)

Same class of bug as Bug 1 from dusk-cli-fixes-rename (substrate mcp:install assumed bin/fsa unconditionally), discovered during that plan's E2E verification phase on a fresh flutter create consumer.

Fix

Route both chained subprocesses through dart run fluttersdk_telescope which proxies the artisan substrate via the telescope CLI wrapper (bin/fluttersdk_telescope.dart — preloads TelescopeArtisanProvider, sets delegateToConsumer: false). The wrapper itself is Flutter-free so the chain works on a clean checkout where fsa has not been compiled.

  • lib/src/commands/telescope_install_command.dart:75-78: ['run', 'fluttersdk_artisan', 'install']['run', 'fluttersdk_telescope', 'install'].
  • lib/src/commands/telescope_install_command.dart:97-100: './bin/fsa' + ['plugin:install', 'fluttersdk_telescope']'dart' + ['run', 'fluttersdk_telescope', 'plugin:install', 'fluttersdk_telescope'].
  • Docblock at lines 5-30 updated to reflect the new behavior. The legacy claim about bin/artisan.dart wrapper rejection is removed — that constraint no longer applies once we route through the telescope-own CLI wrapper instead of fluttersdk_artisan.
  • test/src/commands/telescope_install_command_test.dart: 3 test assertions updated to match the new subprocess args (test names + expected runner.calls shapes).
  • CHANGELOG.md: ### Changed bullet under [Unreleased].

Surface unchanged for consumers who already have fsa scaffolded: the chained subprocess routes through the dart toolchain either way; ./bin/fsa is just a faster proxy when present.

Test plan

dart format --output=none --set-exit-if-changed lib/ test/ bin/    # clean
dart analyze lib/ test/ bin/                                        # No issues found
flutter test test/src/commands/telescope_install_command_test.dart  # 8 pass
flutter test --exclude-tags=integration --timeout=30s               # 249 pass

Plus E2E smoke against this branch:

# Fresh flutter create consumer, path-dep on telescope + artisan override
# bin/fsa absent (the precondition that triggered the bug):
dart run fluttersdk_telescope telescope:install
# →  Consumer wrapper missing; running install...
#    [scaffold output]
#    Registering fluttersdk_telescope via plugin:install...
#    [plugin install output]
#    Wiring TelescopePlugin into lib/main.dart...
#    ✓ telescope:install complete.

Pre-fix, the chain crashed at the second subprocess with ProcessException: No such file or directory because ./bin/fsa did not exist yet.

Companion PR cluster

This is a follow-up to the cross-repo dusk-cli-fixes-rename PR cluster:

Independent of #7; cuts cleanly from master so review and revert are isolated.

🤖 Generated with Claude Code

…run fluttersdk_telescope

Mirrors the Cat C subprocess pattern landed in fluttersdk_dusk
(dusk_install_command.dart#3) and surfaces during the E2E smoke for the
dusk-cli-fixes-rename plan.

Before this change, telescope:install spawned './bin/fsa plugin:install
fluttersdk_telescope' as a subprocess (HARDCODED to fastcli). On a clean
checkout where bin/fsa has not been AOT-compiled yet, telescope:install
crashed with 'ProcessException: No such file or directory'.

The same class of bug as Bug 1 from the dusk-cli-fixes-rename plan
(substrate mcp:install assumed bin/fsa unconditionally). Fix: route the
plugin:install subprocess through 'dart run fluttersdk_telescope' which
proxies the artisan substrate via the telescope CLI wrapper (preloads
TelescopeArtisanProvider, sets delegateToConsumer: false). Surface
unchanged for consumers who already have fsa scaffolded.

- lib/src/commands/telescope_install_command.dart:75-78,97-100 — subprocess
  args flipped from './bin/fsa' + ['plugin:install', ...] to 'dart' +
  ['run', 'fluttersdk_telescope', 'plugin:install', ...]. Docblock at
  lines 5-30 updated to reflect the new behavior; legacy claim about
  'bin/artisan.dart wrapper rejection' removed (no longer applies once we
  route through the telescope-own CLI wrapper instead of fluttersdk_artisan).
- test/src/commands/telescope_install_command_test.dart:97-115,123-147 —
  3 test assertions updated to match the new subprocess args.
- CHANGELOG: ### Changed bullet under [Unreleased].

Discovered during the dusk-cli-fixes-rename plan's E2E verification phase.
The dusk plan's plan.md notes this in Cross-Project Observations.
Copilot AI review requested due to automatic review settings May 28, 2026 08:24

Copilot AI 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.

Pull request overview

This PR updates telescope:install so it no longer assumes the consumer already has an AOT-compiled bin/fsa available, by routing the scaffold + plugin registration subprocesses through dart run fluttersdk_telescope ... instead.

Changes:

  • Switch subprocess invocations from dart run fluttersdk_artisan install / ./bin/fsa plugin:install ... to dart run fluttersdk_telescope ... for both steps.
  • Update TelescopeInstallCommand tests to assert the new subprocess executable/args and ordering.
  • Add a [Unreleased] changelog entry describing the behavior change.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
lib/src/commands/telescope_install_command.dart Routes both scaffold and plugin:install steps through dart run fluttersdk_telescope to remove the hard dependency on ./bin/fsa.
test/src/commands/telescope_install_command_test.dart Updates assertions and test text to match the new subprocess calls.
CHANGELOG.md Documents the install-chain change under [Unreleased].

Comment thread CHANGELOG.md Outdated
- dart format test/src/commands/telescope_install_command_test.dart for
  CI's format gate (Dart version drift between local and CI).
- CHANGELOG: clarify the behavior delta. Original wording 'Surface
  unchanged for consumers who already have fsa scaffolded' was inaccurate
  — fsa is now bypassed unconditionally even when present, adding a small
  startup-time delta on the single telescope:install invocation. Matches
  dusk's unconditional dart-run pattern for cross-plugin consistency.

Addresses Copilot review on CHANGELOG.md:13.
…ll-fastcli-fallback

# Conflicts:
#	CHANGELOG.md
@anilcancakir anilcancakir merged commit 6edbee7 into master May 28, 2026
1 check passed
@anilcancakir anilcancakir deleted the fix/telescope-install-fastcli-fallback branch May 28, 2026 12:58
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.

2 participants