Skip to content

fix(dev): forward application arguments through sb-dev - #850

Open
MaxRink wants to merge 2 commits into
decentespresso:mainfrom
MaxRink:fix/sb-dev-app-arguments
Open

MaxRink wants to merge 2 commits into
decentespresso:mainfrom
MaxRink:fix/sb-dev-app-arguments

Conversation

@MaxRink

@MaxRink MaxRink commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Summary

sb-dev start currently accepts build-time Dart defines but cannot forward runtime arguments to the app's main(). Passing --app-arg is rejected as an unknown flag. The app already supports --serial, --no-account, and --bypass-onboarding, so the managed development loop cannot currently reproduce the headless launch used by the plugin API smoke tests.

Add one repeatable forwarding option and preserve it across sb-dev restart:

scripts/sb-dev.sh start --platform linux \
  --connect-machine MockDe1 --connect-scale MockScale \
  --app-arg --serial \
  --app-arg --no-account \
  --app-arg --bypass-onboarding

Each value becomes a separate Flutter --dart-entrypoint-args=<value> argument. Here --serial suppresses BLE discovery; it does not select a particular serial device. The other two flags use existing app behavior to avoid account services and onboarding during an isolated smoke run.

The change preserves spaces and shell metacharacters literally across launch and restart, rejects missing values and newlines, and documents the option in the existing development guide. It adds no new application flag.

This is independent developer tooling, not a runtime dependency of the Skale or grinder plugins. Those features can ship without it. Direct flutter run --dart-entrypoint-args=... is an existing alternative; forwarding through sb-dev lets the same scenario retain the project's managed start, readiness, reload, restart, and cleanup workflow.

Linked Issue

Related #856. This is independent development tooling used by the #846/#848 smoke scenarios; closed #809 is historical context only.

The new discussion issue is awaiting maintainer triage. This PR remains a draft while maintainers discuss the proposal; opening the issue does not satisfy the accepted-issue gate or imply approval of the proposed contract.

Verification

  • Combined Linux Flutter gate for the current publication stack: 4,315 passed, 1 skipped, 0 failed; analyzer clean (48.0s). Source was unchanged during the gate.

  • Managed Linux runtime passed --serial, --no-account, and --bypass-onboarding through application launch and reload; the app logs confirmed each forwarded argument.

  • Managed Linux runtime passed --serial, --no-account, and --bypass-onboarding through application launch and reload; the app logs confirmed each forwarded argument.

Impact

Developers and CI scenarios can launch the app with explicit arguments without modifying source or onboarding state. Existing invocations remain compatible; this is a development tooling change with no REST/WS contract change.

Contributor Responsibility

AI-assisted development is allowed. The submitter remains responsible for the submitted work.

  • I have reviewed and understand all changes in this PR and take responsibility for their correctness, security, behavior, licensing, and provenance, including any AI-assisted or AI-generated work.

@MaxRink
MaxRink force-pushed the fix/sb-dev-app-arguments branch from d56e530 to be286d1 Compare September 14, 2026 08:59
@MaxRink
MaxRink marked this pull request as ready for review September 15, 2026 20:30
@tadelv tadelv added this to the 0.9.0 milestone Sep 16, 2026
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.

Plugin drivers: host-owned BLE binding + plugin-backed Scale support

2 participants