Add Flutter integration packages, tests, and CI#24
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 39 minutes and 53 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (43)
📝 WalkthroughWalkthroughAdds two Flutter packages (stem_flutter, stem_flutter_sqlite), a full multi-platform Flutter example app (Android/iOS/Linux/macOS/Windows), CI workflows for Flutter testing, numerous example library stubs, and SQLite connection/sweeper reliability fixes. Changes
Sequence Diagram(s)sequenceDiagram
participant UI as UI Isolate
participant Host as StemFlutterWorkerHost
participant Worker as Worker Isolate
participant Broker as SqliteBroker
participant Backend as SqliteResultBackend
UI->>UI: preload assets & initialize deps
UI->>Broker: open broker (file)
UI->>Backend: open backend (file)
UI->>Host: spawn(entrypoint, bootstrap message)
Host->>Worker: spawn isolate with bootstrap
Worker->>Worker: initialize background deps (TimeMachine)
Worker->>Broker: open broker (worker-side)
Worker->>Backend: open backend (worker-side)
Worker->>Host: send ready signal (includes commandPort)
Host-->>UI: emit ready via signals stream
loop enqueue & monitoring
UI->>Broker: enqueue task
Host->>Broker: get pending/inflight counts
Host->>Backend: list task statuses
Host-->>UI: emit snapshot (via StemFlutterQueueMonitor)
end
UI->>Host: requestShutdown()
Host->>Worker: send shutdown command (commandPort)
Worker->>Backend: close backend
Worker->>Broker: close broker
Worker->>Host: send stopped signal
Host-->>UI: emit stopped
sequenceDiagram
participant Monitor as StemFlutterQueueMonitor
participant Broker as Broker
participant Backend as ResultBackend
participant WorkerSignals as Worker Signal Stream
Monitor->>Monitor: start() -> immediate refresh()
loop every pollInterval
Monitor->>Broker: pending/inflight counts
Monitor->>Backend: list task statuses (limit)
Monitor->>Backend: latest worker heartbeat
Monitor->>Monitor: build/sort tracked jobs
Monitor-->>UI: emit snapshot if changed
end
alt worker signal arrives
WorkerSignals->>Monitor: status/warning/fatal
Monitor->>Monitor: apply sticky signal state
Monitor-->>UI: emit updated snapshot
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f1891a1bdd
ℹ️ 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".
| taskId: status.id, | ||
| label: _labelResolver(status), | ||
| state: status.state, | ||
| result: status.payloadValue<String>(), |
There was a problem hiding this comment.
Avoid hard-casting monitor payloads to String
StemFlutterQueueMonitor.refresh currently maps each task result with status.payloadValue<String>(), which is an unchecked cast in TaskStatus and throws when the stored payload is any non-string type (for example JSON/map results). In queues with mixed task result types, a single non-string payload causes refresh() to fail, and because periodic polling calls refresh() unawaited, this turns into recurring unhandled errors and stale UI snapshots.
Useful? React with 👍 / 👎.
| _started = true; | ||
| await refresh(); |
There was a problem hiding this comment.
Reset start state when initial refresh fails
start() sets _started = true before awaiting the first refresh(), so if that initial refresh throws (for example due to a transient backend/broker failure), the method exits before creating the timer but leaves _started latched to true. Subsequent start() calls then return immediately, so the monitor cannot recover unless callers construct a new instance.
Useful? React with 👍 / 👎.
| status: StemFlutterWorkerStatus.values.byName( | ||
| raw['state']?.toString() ?? StemFlutterWorkerStatus.starting.name, | ||
| ), |
There was a problem hiding this comment.
Guard worker status parsing against unknown enum names
StemFlutterWorkerSignal.tryParse uses StemFlutterWorkerStatus.values.byName(...) directly for 'status' messages, which throws ArgumentError for unknown state strings. Any malformed or forward-compatible worker message with a new status value will raise during parsing instead of being ignored/fallback-handled, which can break signal processing in the host listener.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Actionable comments posted: 32
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@packages/stem_flutter_sqlite/lib/src/runtime/stem_flutter_storage_layout.dart`:
- Around line 49-50: The forRoot async factory currently uses blocking
filesystem calls (root.existsSync() and root.createSync()), so replace the
check-and-sync creation with a single non-blocking call: call await
root.create(recursive: true) directly (remove existsSync/createSync) so
Directory creation is asynchronous and race-safe; update references in the
forRoot method where Directory root is used to reflect the awaited create.
In `@packages/stem_flutter_sqlite/pubspec.yaml`:
- Line 4: Update the pubspec.yaml metadata to point repository and issue_tracker
at the package subpath in the monorepo (change the repository key and
issue_tracker key in this package's pubspec.yaml to the package-specific URL,
e.g. use the GitHub URL with /tree/main/packages/stem_flutter_sqlite for
repository and the repo issues URL for issue_tracker) so pub.dev clearly links
to the stem_flutter_sqlite subpath (match the approach used in stem_flutter's
pubspec.yaml).
- Around line 14-16: The pubspec constraint for stem_sqlite is too high
(requires >=0.1.2) while the package is currently at 0.1.1; update the
dependency constraint in packages/stem_flutter_sqlite/pubspec.yaml to match the
published version (change stem_sqlite to ">=0.1.1 <0.2.0") or bump the
stem_sqlite package to 0.1.2 and keep the existing constraint, and also confirm
stem_flutter's constraint (">=0.1.0 <0.2.0") matches the actual stem_flutter
release (bump either the constraint or the package version so both stay in
lockstep).
In `@packages/stem_flutter_sqlite/README.md`:
- Around line 117-145: The README snippet must ensure worker and resource
cleanup by wrapping the lifecycle in a try/finally: after opening
StemFlutterSqliteWorkerStores.open and creating the Worker
(broker/backend/tasks/queue/consumerName), call worker.start() and send the
ready signal, then run the command handling loop inside a try block, and in the
finally block always call worker.shutdown(), await stores.close(), and
commands.close(); reference the symbols Worker.start,
StemFlutterSqliteWorkerStores.open, worker.shutdown, stores.close, and
commands.close to locate where to add the try/finally.
In `@packages/stem_flutter_sqlite/test/stem_flutter_sqlite_runtime_test.dart`:
- Around line 89-108: The test currently awaits host.signals.firstWhere for the
ready signal and only then subscribes for the running status, which can miss the
back-to-back status event; change the test to create both futures up-front by
capturing the two subscriptions on host.signals (filtering for
StemFlutterWorkerSignalType.ready and for the status ==
StemFlutterWorkerStatus.running) before awaiting either, then await both futures
(or await the ready future and then await the already-created running future);
reference host.signals, StemFlutterWorkerSignalType.ready,
StemFlutterWorkerSignalType.status, and StemFlutterWorkerStatus.running when
locating where to create the two futures so both listeners are active before the
worker sends signals.
In `@packages/stem_flutter/analysis_options.yaml`:
- Line 7: Remove the trailing blank line at the end of
packages/stem_flutter/analysis_options.yaml so the file ends immediately after
the final YAML content (no extra newline or blank line at EOF); simply delete
the extra empty line flagged by YAMLlint to resolve the lint error.
In `@packages/stem_flutter/lib/src/monitor/stem_flutter_queue_monitor.dart`:
- Around line 69-72: bindWorkerSignals currently calls
unawaited(_workerSignalsSub?.cancel()) which can allow the new subscription to
be created before the old one is fully cancelled; change bindWorkerSignals to
return Future<void> and make it async, await _workerSignalsSub?.cancel() before
assigning _workerSignalsSub = signals.listen(_applyWorkerSignal), and ensure you
still handle nulls safely so the previous subscription is awaited when present
(refer to bindWorkerSignals, _workerSignalsSub, and _applyWorkerSignal).
In `@packages/stem_flutter/lib/src/monitor/stem_flutter_queue_snapshot.dart`:
- Around line 72-91: The copyWith on StemFlutterQueueSnapshot only supports
clearing workerDetail via clearWorkerDetail, so add explicit clear flags for the
other nullable fields (for example clearLastHeartbeatAt, clearPendingCount,
clearInflightCount) to the copyWith signature and implementation so callers can
force those fields to null; update the assignments in copyWith to set
lastHeartbeatAt/pendingCount/inflightCount to null when their corresponding
clear* flag is true, otherwise fall back to the provided param or this.*. Also
update call sites (notably StemFlutterQueueMonitor._applyWorkerSignal handling
StemFlutterWorkerSignalType.status and any other callers) to pass the new clear
flags where invalidation is required so behavior is consistent with
clearWorkerDetail.
In
`@packages/stem_flutter/lib/src/runtime/stem_flutter_dependency_bootstrap.dart`:
- Around line 7-14: The current implementation caches the Future returned by
tm.TimeMachine.initialize in _foregroundInitialization which means a failed
initialization is permanently stored; change
ensureStemFlutterDependenciesInitialized so it does not memoize a failing Future
by performing the initialization into a local Future (or awaiting it inside a
try/catch) and only assign the successful completion to
_foregroundInitialization, and on error reset _foregroundInitialization to null
(or avoid assigning until success) then rethrow the error so transient failures
can be retried; update references to _foregroundInitialization and
tm.TimeMachine.initialize in ensureStemFlutterDependenciesInitialized
accordingly.
- Around line 42-69: Change _StemFlutterDependencyAssetBundle to extend
AssetBundle (or CachingAssetBundle) so it formally implements the asset bundle
interface: declare "class _StemFlutterDependencyAssetBundle extends AssetBundle"
(or extends CachingAssetBundle), keep the existing implementations of load,
loadString and loadStructuredBinaryData, and add/override the other AssetBundle
members (e.g., evict, clear, loadBuffer or loadStructuredData as required) to
delegate to the existing assets map or be no-ops if appropriate; ensure
signatures match AssetBundle so the class satisfies the interface and compiles.
In `@packages/stem_flutter/lib/src/runtime/stem_flutter_worker_host.dart`:
- Around line 45-105: The host currently uses a broadcast StreamController
(StemFlutterWorkerHost._controller) and can lose the initial ready/status
signals before callers subscribe; add a Completable-backed accessor (e.g.,
Future<SendPort> get commandPortReady or Future<StemFlutterWorkerSignal> get
ready) on StemFlutterWorkerHost and complete its Completer when the messages
listener observes a ready signal (i.e., inside the messages.listen block where
you set host._commandPort), also complete immediately if _commandPort is already
set so late callers still get the value; ensure the Completer is completed with
an error or canceled in dispose to avoid leaks.
In `@packages/stem_flutter/lib/src/runtime/stem_flutter_worker_signal.dart`:
- Around line 121-126: The code calls StemFlutterWorkerStatus.values.byName(...)
which throws on unknown names and breaks the safe tryParse behavior; change the
lookup in StemFlutterWorkerSignal.status to perform a safe lookup (e.g., read
raw['state']?.toString() into a local string and resolve the enum via a
non-throwing search like values.firstWhere(..., orElse:
()=>StemFlutterWorkerStatus.starting) or catch ArgumentError and fall back) so
unknown/misspelled/newer enum names default to StemFlutterWorkerStatus.starting
instead of throwing; update the StemFlutterWorkerSignal.status construction to
use this safe lookup in place of values.byName.
In `@packages/stem_flutter/pubspec.yaml`:
- Line 4: Update the package metadata to point the repository field at the
package subpath and add an issue_tracker entry: change the repository value (the
repository key in pubspec.yaml) to
"https://github.com/kingwill101/stem/tree/master/packages/stem_flutter" and add
an issue_tracker key with "https://github.com/kingwill101/stem/issues" so the
pubspec (repository and issue_tracker) correctly reference the package directory
and issue tracker for this monorepo package.
In `@packages/stem_flutter/README.md`:
- Around line 75-92: The example drops the spawned host and monitor when
startMobileWorker returns, preventing callers from shutting down the worker or
disposing the monitor; change startMobileWorker to expose lifecycle handles by
returning (or accepting and storing) the StemFlutterWorkerHost returned by
StemFlutterWorkerHost.spawn and the StemFlutterQueueMonitor instance so callers
can call host.close()/host.signals and monitor.stop()/monitor.dispose() as
needed—update the startMobileWorker signature to return a struct/tuple/object
containing host and monitor (or accept an out/owner-owned storage) and propagate
those handles to callers.
In `@packages/stem_flutter/test/stem_flutter_queue_monitor_test.dart`:
- Around line 82-100: The test's fresh-heartbeat window is too narrow causing
flakiness; update the StemFlutterQueueMonitor instantiation(s) used for
fresh-heartbeat assertions (e.g., the monitor created with
StemFlutterQueueMonitor, properties broker, queueName 'jobs', workerId
'worker-a') to use a much larger heartbeatInterval (for example increase from 1s
to 5s or more) or, if the monitor supports it, inject a deterministic clock and
call refresh() with controlled time; apply the same change to the other test
block referenced (around the second occurrence at lines 157-175) so workerStatus
remains stable during CI scheduling.
- Around line 176-184: The test is racing on a fixed 10ms delay after
signals.add; make the StreamController synchronous or otherwise await a
deterministic monitor update to avoid flakiness: construct the controller with
sync behavior (e.g., StreamController.sync) so
monitor.bindWorkerSignals(signals.stream) receives the event synchronously when
you call signals.add(const StemFlutterWorkerSignal.fatal('database locked')), or
replace the arbitrary delay with awaiting a concrete monitor signal/update (a
Future that completes when the monitor processes the signal) to ensure the
snapshot reflects the posted signal.
In `@packages/stem_flutter/test/stem_flutter_worker_host_test.dart`:
- Around line 30-33: The parameter sendPort in _failingWorkerEntry is unused and
confuses readers; either rename the parameter to _ (i.e.,
_failingWorkerEntry(SendPort _)) or add a one-line comment inside
_failingWorkerEntry explaining that the function intentionally throws and the
host observes the failure via the isolate error port rather than using sendPort;
update the signature or add the comment in the _failingWorkerEntry function to
make the intent explicit.
In `@packages/stem_sqlite/lib/src/connection.dart`:
- Around line 119-123: Move the SchemaDriver type check before any SQLite PRAGMA
executeRaw calls: in connection.dart retrieve dataSource.connection.driver,
assert `driver is SchemaDriver` and throw the intended StateError if not before
calling `driver.executeRaw('PRAGMA busy_timeout = ...')`,
`driver.executeRaw('PRAGMA journal_mode=WAL')` and `driver.executeRaw('PRAGMA
synchronous=NORMAL')`; update the guard around `driver` (the `SchemaDriver`
check) so the PRAGMA statements only run when the driver is confirmed valid and
add a unit test that supplies a non-SchemaDriver to the connection
initialization to assert that the StateError is thrown.
In `@packages/stem/example/flutter_stem_example/android/app/build.gradle.kts`:
- Around line 22-39: The build.gradle.kts contains example-only placeholders:
defaultConfig.applicationId is set to "com.example.flutter_stem_example" and
buildTypes.release uses signingConfig = signingConfigs.getByName("debug"); if
you ever convert this example into a real CI/release flow, replace the
placeholder applicationId with your unique applicationId and configure a proper
release signingConfig (create or reference a release keystore and use that
signingConfig in buildTypes.release instead of
signingConfigs.getByName("debug")), ensuring keys are loaded from secure CI
secrets rather than checked-in files.
In `@packages/stem/example/flutter_stem_example/android/gradle.properties`:
- Around line 1-2: The gradle JVM args currently set via org.gradle.jvmargs use
excessively large heap values (-Xmx8G and -XX:MaxMetaspaceSize=4G); update the
org.gradle.jvmargs entry to use more conservative Flutter defaults (for example
-Xmx4G -XX:MaxMetaspaceSize=2G -XX:ReservedCodeCacheSize=512m
-XX:+HeapDumpOnOutOfMemoryError) or remove the custom sizing so CI and low-RAM
developer machines can build reliably.
In
`@packages/stem/example/flutter_stem_example/android/gradle/wrapper/gradle-wrapper.properties`:
- Around line 1-5: Add a distributionSha256Sum property to the Gradle wrapper
properties to pin the distribution zip integrity: compute the SHA-256 checksum
of the gradle distribution referenced by distributionUrl (gradle-8.14-all.zip)
and add a line distributionSha256Sum=<sha256> to the file so the Gradle wrapper
verifies the downloaded archive; ensure the checksum string matches the exact
zip referenced by distributionUrl.
In
`@packages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md`:
- Line 5: The README.md in the LaunchImage.imageset is missing a trailing
newline; update the README.md (LaunchImage.imageset/README.md) to ensure the
file ends with exactly one newline character (add a single trailing newline and
remove any extra blank lines) to satisfy MD047.
In `@packages/stem/example/flutter_stem_example/lib/main.dart`:
- Around line 477-485: The finally block can call worker.shutdown() even if
worker.start() failed; modify the cleanup to track successful startup (e.g., set
a started boolean right after await worker.start() in the same scope where
worker is created) and only call worker.shutdown(mode: WorkerShutdownMode.warm)
if started is true, or alternatively wrap the shutdown call in its own try/catch
that logs errors (using stemLogger.warning/error) and does not rethrow so a
failed shutdown won't mask the original exception; reference the worker.start()
invocation and worker.shutdown(...) call as the points to change, and also
ensure eventsSub?.cancel(), stores?.close(), and commands?.close() remain in
finally regardless.
- Around line 149-190: The monitor may miss an early "ready" signal because
StemFlutterWorkerHost exposes signals via a plain broadcast StreamController;
update StemFlutterWorkerHost so its signals stream buffers and replays the
latest signal to new subscribers (e.g., keep a lastSignal/state and emit it
immediately when a listener subscribes), ensuring
bindWorkerSignals(workerHost.signals) receives any prior ready/status events;
adjust the StreamController/stream getter and any emit logic in
StemFlutterWorkerHost to maintain and replay the most recent signal while
preserving broadcast behavior.
In
`@packages/stem/example/flutter_stem_example/macos/Runner/MainFlutterWindow.swift`:
- Around line 1-15: The SwiftLint required_deinit warning on the generated
MainFlutterWindow subclass of NSWindow is a known false positive; suppress it
either globally by adding required_deinit to disabled_rules in the repo
.swiftlint.yml, or locally by adding an inline suppression directly above the
class declaration for MainFlutterWindow (e.g., a swiftlint:disable:next
required_deinit) so you don't modify the generated awakeFromNib or diverge from
the Flutter scaffold.
In `@packages/stem/example/flutter_stem_example/pubspec.yaml`:
- Around line 21-22: The SDK constraint in the pubspec.yaml environment block is
too strict (sdk: ^3.11.4) and should be aligned with workspace packages; update
the environment.sdk entry in this pubspec.yaml to use either ^3.9.2 or the range
>=3.9.2 <4.0.0 so it matches stem and other examples and avoids pub get failures
for users on Dart 3.9–3.10.
- Around line 55-66: Replace the exact pinned meta: 1.17.0 in the
dependency_overrides with a compatible range (e.g., meta: ^1.18.0) or remove the
meta override entirely so the workspace/transitive constraint can be satisfied,
and remove the redundant dependency_overrides entries for stem, stem_flutter,
and stem_flutter_sqlite (they are already declared as path: dependencies); keep
only the necessary overrides for stem_memory and stem_sqlite in the
dependency_overrides block.
In `@packages/stem/example/flutter_stem_example/README.md`:
- Around line 65-68: The README's example uses a non-repo-relative path ("cd
stem/packages/stem/example/flutter_stem_example") which breaks if the checkout
folder isn't named "stem"; update the command block in README.md to use a
repo-root relative path (e.g., "cd packages/stem/example/flutter_stem_example")
so the three-step sequence (cd, flutter pub get, flutter run -d android) is
copy-paste safe; locate the code block in the README.md file and replace the cd
line accordingly.
In `@packages/stem/example/flutter_stem_example/web/index.html`:
- Line 2: The <html> root element in index.html is missing a lang attribute;
update the opening <html> tag to include an appropriate language declaration
(e.g., lang="en" or the correct locale) so screen readers and i18n tools can
detect the page language—modify the <html> tag in the file accordingly.
In `@pubspec.yaml`:
- Line 21: Update the exact pin for the meta dependency to a caret constraint
for forward compatibility: replace the exact version entry "meta: 1.17.0" with a
caret range such as "meta: ^1.17.0" in the dependency_overrides (the meta entry
in pubspec.yaml) so the package can accept compatible future patch/minor
SDK-bundled updates without breaking.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 945f4292-ab2d-497b-a988-a7620c3a72b8
⛔ Files ignored due to path filters (36)
packages/stem/example/flutter_stem_example/android/app/src/main/res/mipmap-hdpi/ic_launcher.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/android/app/src/main/res/mipmap-mdpi/ic_launcher.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/web/favicon.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/web/icons/Icon-192.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/web/icons/Icon-512.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/web/icons/Icon-maskable-192.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/web/icons/Icon-maskable-512.pngis excluded by!**/*.pngpackages/stem/example/flutter_stem_example/windows/runner/resources/app_icon.icois excluded by!**/*.ico
📒 Files selected for processing (142)
.github/workflows/stem_flutter.yaml.github/workflows/stem_flutter_sqlite.yaml.gitignorepackages/stem/example/email_service/lib/stem_email_service_example.dartpackages/stem/example/encrypted_payload/enqueuer/lib/stem_encrypted_enqueuer.dartpackages/stem/example/encrypted_payload/worker/lib/stem_encrypted_worker.dartpackages/stem/example/flutter_stem_example/.gitignorepackages/stem/example/flutter_stem_example/.metadatapackages/stem/example/flutter_stem_example/README.mdpackages/stem/example/flutter_stem_example/analysis_options.yamlpackages/stem/example/flutter_stem_example/android/.gitignorepackages/stem/example/flutter_stem_example/android/app/build.gradle.ktspackages/stem/example/flutter_stem_example/android/app/src/debug/AndroidManifest.xmlpackages/stem/example/flutter_stem_example/android/app/src/main/AndroidManifest.xmlpackages/stem/example/flutter_stem_example/android/app/src/main/kotlin/com/example/flutter_stem_example/MainActivity.ktpackages/stem/example/flutter_stem_example/android/app/src/main/res/drawable-v21/launch_background.xmlpackages/stem/example/flutter_stem_example/android/app/src/main/res/drawable/launch_background.xmlpackages/stem/example/flutter_stem_example/android/app/src/main/res/values-night/styles.xmlpackages/stem/example/flutter_stem_example/android/app/src/main/res/values/styles.xmlpackages/stem/example/flutter_stem_example/android/app/src/profile/AndroidManifest.xmlpackages/stem/example/flutter_stem_example/android/build.gradle.ktspackages/stem/example/flutter_stem_example/android/gradle.propertiespackages/stem/example/flutter_stem_example/android/gradle/wrapper/gradle-wrapper.propertiespackages/stem/example/flutter_stem_example/android/settings.gradle.ktspackages/stem/example/flutter_stem_example/ios/.gitignorepackages/stem/example/flutter_stem_example/ios/Flutter/AppFrameworkInfo.plistpackages/stem/example/flutter_stem_example/ios/Flutter/Debug.xcconfigpackages/stem/example/flutter_stem_example/ios/Flutter/Release.xcconfigpackages/stem/example/flutter_stem_example/ios/Runner.xcodeproj/project.pbxprojpackages/stem/example/flutter_stem_example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedatapackages/stem/example/flutter_stem_example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plistpackages/stem/example/flutter_stem_example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettingspackages/stem/example/flutter_stem_example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcschemepackages/stem/example/flutter_stem_example/ios/Runner.xcworkspace/contents.xcworkspacedatapackages/stem/example/flutter_stem_example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plistpackages/stem/example/flutter_stem_example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettingspackages/stem/example/flutter_stem_example/ios/Runner/AppDelegate.swiftpackages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.jsonpackages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.jsonpackages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.mdpackages/stem/example/flutter_stem_example/ios/Runner/Base.lproj/LaunchScreen.storyboardpackages/stem/example/flutter_stem_example/ios/Runner/Base.lproj/Main.storyboardpackages/stem/example/flutter_stem_example/ios/Runner/Info.plistpackages/stem/example/flutter_stem_example/ios/Runner/Runner-Bridging-Header.hpackages/stem/example/flutter_stem_example/ios/Runner/SceneDelegate.swiftpackages/stem/example/flutter_stem_example/ios/RunnerTests/RunnerTests.swiftpackages/stem/example/flutter_stem_example/lib/main.dartpackages/stem/example/flutter_stem_example/linux/.gitignorepackages/stem/example/flutter_stem_example/linux/CMakeLists.txtpackages/stem/example/flutter_stem_example/linux/flutter/CMakeLists.txtpackages/stem/example/flutter_stem_example/linux/flutter/generated_plugin_registrant.ccpackages/stem/example/flutter_stem_example/linux/flutter/generated_plugin_registrant.hpackages/stem/example/flutter_stem_example/linux/flutter/generated_plugins.cmakepackages/stem/example/flutter_stem_example/linux/runner/CMakeLists.txtpackages/stem/example/flutter_stem_example/linux/runner/main.ccpackages/stem/example/flutter_stem_example/linux/runner/my_application.ccpackages/stem/example/flutter_stem_example/linux/runner/my_application.hpackages/stem/example/flutter_stem_example/macos/.gitignorepackages/stem/example/flutter_stem_example/macos/Flutter/Flutter-Debug.xcconfigpackages/stem/example/flutter_stem_example/macos/Flutter/Flutter-Release.xcconfigpackages/stem/example/flutter_stem_example/macos/Flutter/GeneratedPluginRegistrant.swiftpackages/stem/example/flutter_stem_example/macos/Runner.xcodeproj/project.pbxprojpackages/stem/example/flutter_stem_example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plistpackages/stem/example/flutter_stem_example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcschemepackages/stem/example/flutter_stem_example/macos/Runner.xcworkspace/contents.xcworkspacedatapackages/stem/example/flutter_stem_example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plistpackages/stem/example/flutter_stem_example/macos/Runner/AppDelegate.swiftpackages/stem/example/flutter_stem_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.jsonpackages/stem/example/flutter_stem_example/macos/Runner/Base.lproj/MainMenu.xibpackages/stem/example/flutter_stem_example/macos/Runner/Configs/AppInfo.xcconfigpackages/stem/example/flutter_stem_example/macos/Runner/Configs/Debug.xcconfigpackages/stem/example/flutter_stem_example/macos/Runner/Configs/Release.xcconfigpackages/stem/example/flutter_stem_example/macos/Runner/Configs/Warnings.xcconfigpackages/stem/example/flutter_stem_example/macos/Runner/DebugProfile.entitlementspackages/stem/example/flutter_stem_example/macos/Runner/Info.plistpackages/stem/example/flutter_stem_example/macos/Runner/MainFlutterWindow.swiftpackages/stem/example/flutter_stem_example/macos/Runner/Release.entitlementspackages/stem/example/flutter_stem_example/macos/RunnerTests/RunnerTests.swiftpackages/stem/example/flutter_stem_example/pubspec.yamlpackages/stem/example/flutter_stem_example/test/widget_test.dartpackages/stem/example/flutter_stem_example/web/index.htmlpackages/stem/example/flutter_stem_example/web/manifest.jsonpackages/stem/example/flutter_stem_example/windows/.gitignorepackages/stem/example/flutter_stem_example/windows/CMakeLists.txtpackages/stem/example/flutter_stem_example/windows/flutter/CMakeLists.txtpackages/stem/example/flutter_stem_example/windows/flutter/generated_plugin_registrant.ccpackages/stem/example/flutter_stem_example/windows/flutter/generated_plugin_registrant.hpackages/stem/example/flutter_stem_example/windows/flutter/generated_plugins.cmakepackages/stem/example/flutter_stem_example/windows/runner/CMakeLists.txtpackages/stem/example/flutter_stem_example/windows/runner/Runner.rcpackages/stem/example/flutter_stem_example/windows/runner/flutter_window.cpppackages/stem/example/flutter_stem_example/windows/runner/flutter_window.hpackages/stem/example/flutter_stem_example/windows/runner/main.cpppackages/stem/example/flutter_stem_example/windows/runner/resource.hpackages/stem/example/flutter_stem_example/windows/runner/runner.exe.manifestpackages/stem/example/flutter_stem_example/windows/runner/utils.cpppackages/stem/example/flutter_stem_example/windows/runner/utils.hpackages/stem/example/flutter_stem_example/windows/runner/win32_window.cpppackages/stem/example/flutter_stem_example/windows/runner/win32_window.hpackages/stem/example/image_processor/lib/stem_image_processor_example.dartpackages/stem/example/microservice/beat/lib/stem_microservice_beat.dartpackages/stem/example/microservice/enqueuer/lib/stem_microservice_enqueuer.dartpackages/stem/example/microservice/worker/lib/stem_microservice_worker.dartpackages/stem/example/mixed_cluster/enqueuer/lib/stem_mixed_enqueuer.dartpackages/stem/example/mixed_cluster/postgres_worker/lib/stem_mixed_postgres_worker.dartpackages/stem/example/mixed_cluster/redis_worker/lib/stem_mixed_redis_worker.dartpackages/stem/example/monolith_service/lib/stem_monolith_example.dartpackages/stem/example/otel_metrics/lib/stem_otel_metrics_example.dartpackages/stem/example/postgres_worker/enqueuer/lib/stem_postgres_enqueuer.dartpackages/stem/example/postgres_worker/worker/lib/stem_postgres_worker.dartpackages/stem/example/redis_postgres_worker/enqueuer/lib/stem_redis_postgres_enqueuer.dartpackages/stem/example/redis_postgres_worker/worker/lib/stem_redis_postgres_worker.dartpackages/stem_cli/lib/stem_cli.dartpackages/stem_flutter/CHANGELOG.mdpackages/stem_flutter/README.mdpackages/stem_flutter/analysis_options.yamlpackages/stem_flutter/lib/src/monitor/stem_flutter_queue_monitor.dartpackages/stem_flutter/lib/src/monitor/stem_flutter_queue_snapshot.dartpackages/stem_flutter/lib/src/runtime/stem_flutter_dependency_bootstrap.dartpackages/stem_flutter/lib/src/runtime/stem_flutter_worker_host.dartpackages/stem_flutter/lib/src/runtime/stem_flutter_worker_signal.dartpackages/stem_flutter/lib/stem_flutter.dartpackages/stem_flutter/pubspec.yamlpackages/stem_flutter/test/stem_flutter_queue_monitor_test.dartpackages/stem_flutter/test/stem_flutter_queue_snapshot_test.dartpackages/stem_flutter/test/stem_flutter_worker_host_test.dartpackages/stem_flutter/test/stem_flutter_worker_signal_test.dartpackages/stem_flutter_sqlite/CHANGELOG.mdpackages/stem_flutter_sqlite/README.mdpackages/stem_flutter_sqlite/analysis_options.yamlpackages/stem_flutter_sqlite/lib/src/runtime/stem_flutter_sqlite_runtime.dartpackages/stem_flutter_sqlite/lib/src/runtime/stem_flutter_sqlite_worker_bootstrap.dartpackages/stem_flutter_sqlite/lib/src/runtime/stem_flutter_sqlite_worker_launcher.dartpackages/stem_flutter_sqlite/lib/src/runtime/stem_flutter_storage_layout.dartpackages/stem_flutter_sqlite/lib/stem_flutter_sqlite.dartpackages/stem_flutter_sqlite/pubspec.yamlpackages/stem_flutter_sqlite/test/stem_flutter_sqlite_runtime_test.dartpackages/stem_flutter_sqlite/test/stem_flutter_sqlite_worker_bootstrap_test.dartpackages/stem_flutter_sqlite/test/stem_flutter_storage_layout_test.dartpackages/stem_sqlite/lib/src/broker/sqlite_broker.dartpackages/stem_sqlite/lib/src/connection.dartpubspec.yaml
📜 Review details
🧰 Additional context used
🪛 Clang (14.0.6)
packages/stem/example/flutter_stem_example/ios/Runner/Runner-Bridging-Header.h
[error] 1-1: 'GeneratedPluginRegistrant.h' file not found
(clang-diagnostic-error)
packages/stem/example/flutter_stem_example/linux/flutter/generated_plugin_registrant.h
[error] 10-10: 'flutter_linux/flutter_linux.h' file not found
(clang-diagnostic-error)
packages/stem/example/flutter_stem_example/linux/runner/main.cc
[warning] 3-3: use a trailing return type for this function
(modernize-use-trailing-return-type)
packages/stem/example/flutter_stem_example/linux/runner/my_application.h
[error] 4-4: 'gtk/gtk.h' file not found
(clang-diagnostic-error)
packages/stem/example/flutter_stem_example/windows/runner/main.cpp
[error] 1-1: 'flutter/dart_project.h' file not found
(clang-diagnostic-error)
[warning] 8-8: variable 'APIENTRY' is non-const and globally accessible, consider making it const
(cppcoreguidelines-avoid-non-const-global-variables)
packages/stem/example/flutter_stem_example/windows/runner/utils.h
[error] 4-4: 'string' file not found
(clang-diagnostic-error)
packages/stem/example/flutter_stem_example/windows/flutter/generated_plugin_registrant.h
[error] 10-10: 'flutter/plugin_registry.h' file not found
(clang-diagnostic-error)
packages/stem/example/flutter_stem_example/linux/runner/my_application.cc
[warning] 10-10: declaration uses identifier '_MyApplication', which is a reserved identifier
(bugprone-reserved-identifier)
[warning] 10-10: constructor does not initialize these fields: parent_instance, dart_entrypoint_arguments
(cppcoreguidelines-pro-type-member-init)
[warning] 15-15: use a trailing return type for this function
(modernize-use-trailing-return-type)
[warning] 18-18: 2 adjacent parameters of 'first_frame_cb' of similar type ('int *') are easily swapped by mistake
(bugprone-easily-swappable-parameters)
[note] 18-18: the first parameter in the range is 'self'
(clang)
[note] 18-18: the last parameter in the range is 'view'
(clang)
[warning] 24-24: variable 'self' is not initialized
(cppcoreguidelines-init-variables)
[warning] 25-25: variable 'window' is not initialized
(cppcoreguidelines-init-variables)
[warning] 35-35: variable 'use_header_bar' is not initialized
(cppcoreguidelines-init-variables)
[warning] 46-46: variable 'header_bar' is not initialized
(cppcoreguidelines-init-variables)
[warning] 61-61: variable 'view' is not initialized
(cppcoreguidelines-init-variables)
[warning] 62-62: variable 'background_color' is not initialized
(cppcoreguidelines-init-variables)
[warning] 82-82: use a trailing return type for this function
(modernize-use-trailing-return-type)
[warning] 85-85: variable 'self' is not initialized
(cppcoreguidelines-init-variables)
[warning] 122-122: variable 'self' is not initialized
(cppcoreguidelines-init-variables)
[warning] 138-138: use a trailing return type for this function
(modernize-use-trailing-return-type)
packages/stem/example/flutter_stem_example/windows/runner/flutter_window.cpp
[warning] 7-7: constructor does not initialize these fields: project_, flutter_controller_
(cppcoreguidelines-pro-type-member-init)
[warning] 10-10: use '= default' to define a trivial destructor
(modernize-use-equals-default)
[warning] 12-12: use a trailing return type for this function
(modernize-use-trailing-return-type)
[warning] 17-17: variable 'frame' is not initialized
(cppcoreguidelines-init-variables)
[warning] 25-25: redundant boolean literal in conditional return statement
(readability-simplify-boolean-expr)
[warning] 51-51: use a trailing return type for this function
(modernize-use-trailing-return-type)
[warning] 51-51: 2 adjacent parameters of 'MessageHandler' of similar type ('const int') are easily swapped by mistake
(bugprone-easily-swappable-parameters)
[note] 51-51: the first parameter in the range is 'message'
(clang)
[note] 52-52: the last parameter in the range is 'wparam'
(clang)
packages/stem/example/flutter_stem_example/windows/runner/utils.cpp
[warning] 5-5: inclusion of deprecated C++ header 'stdio.h'; consider using 'cstdio' instead
(modernize-deprecated-headers)
[warning] 12-12: variable 'unused' is not initialized
(cppcoreguidelines-init-variables)
[warning] 24-24: use a trailing return type for this function
(modernize-use-trailing-return-type)
[warning] 26-26: variable 'argc' is not initialized
(cppcoreguidelines-init-variables)
[warning] 27-27: variable 'argv' is not initialized
(cppcoreguidelines-init-variables)
[warning] 39-39: variable 'argv' is not initialized
(cppcoreguidelines-init-variables)
[warning] 44-44: use a trailing return type for this function
(modernize-use-trailing-return-type)
[warning] 48-48: variable 'target_length' is not initialized
(cppcoreguidelines-init-variables)
[warning] 53-53: variable 'utf8_string' is not initialized
(cppcoreguidelines-init-variables)
[warning] 58-58: variable 'converted_length' is not initialized
(cppcoreguidelines-init-variables)
packages/stem/example/flutter_stem_example/windows/runner/win32_window.cpp
[warning] 16-16: macro 'DWMWA_USE_IMMERSIVE_DARK_MODE' used to declare a constant; consider using a 'constexpr' constant
(cppcoreguidelines-macro-usage)
[warning] 19-19: do not declare C-style arrays, use std::array<> instead
(modernize-avoid-c-arrays)
[warning] 25-25: do not declare C-style arrays, use std::array<> instead
(modernize-avoid-c-arrays)
[warning] 27-27: do not declare C-style arrays, use std::array<> instead
(modernize-avoid-c-arrays)
[warning] 30-30: variable 'g_active_window_count' is non-const and globally accessible, consider making it const
(cppcoreguidelines-avoid-non-const-global-variables)
[warning] 30-30: 'g_active_window_count' is a static definition in anonymous namespace; static is redundant here
(readability-static-definition-in-anonymous-namespace)
[warning] 36-36: use a trailing return type for this function
(modernize-use-trailing-return-type)
[warning] 43-43: variable 'user32_module' is not initialized
(cppcoreguidelines-init-variables)
[warning] 64-64: use a trailing return type for this function
(modernize-use-trailing-return-type)
[warning] 65-65: implicit conversion 'WindowClassRegistrar *' -> bool
(readability-implicit-bool-conversion)
[warning] 73-73: use a trailing return type for this function
(modernize-use-trailing-return-type)
[warning] 82-82: variable 'instance_' is non-const and globally accessible, consider making it const
(cppcoreguidelines-avoid-non-const-global-variables)
[warning] 82-82: variable 'instance_' provides global access to a non-const object; consider making the pointed-to data 'const'
(cppcoreguidelines-avoid-non-const-global-variables)
[warning] 87-87: variable 'instance_' is non-const and globally accessible, consider making it const
(cppcoreguidelines-avoid-non-const-global-variables)
[warning] 87-87: variable 'instance_' provides global access to a non-const object; consider making the pointed-to data 'const'
(cppcoreguidelines-avoid-non-const-global-variables)
[warning] 89-89: use a trailing return type for this function
(modernize-use-trailing-return-type)
[warning] 91-91: variable 'window_class' is not initialized
(cppcoreguidelines-init-variables)
[warning] 123-123: use a trailing return type for this function
(modernize-use-trailing-return-type)
[warning] 131-131: variable 'target_point' is not initialized
(cppcoreguidelines-init-variables)
[warning] 133-133: variable 'monitor' is not initialized
(cppcoreguidelines-init-variables)
[warning] 134-134: variable 'dpi' is not initialized
(cppcoreguidelines-init-variables)
[warning] 135-135: variable 'scale_factor' is not initialized
(cppcoreguidelines-init-variables)
[warning] 137-137: variable 'window' is not initialized
(cppcoreguidelines-init-variables)
[warning] 152-152: use a trailing return type for this function
(modernize-use-trailing-return-type)
[warning] 157-157: variable 'CALLBACK' is non-const and globally accessible, consider making it const
(cppcoreguidelines-avoid-non-const-global-variables)
packages/stem/example/flutter_stem_example/windows/runner/flutter_window.h
[error] 4-4: 'flutter/dart_project.h' file not found
(clang-diagnostic-error)
packages/stem/example/flutter_stem_example/windows/runner/win32_window.h
[error] 4-4: 'windows.h' file not found
(clang-diagnostic-error)
🪛 Cppcheck (2.20.0)
packages/stem/example/flutter_stem_example/windows/flutter/generated_plugin_registrant.cc
[style] 10-10: The function 'RegisterPlugins' is never used.
(unusedFunction)
packages/stem/example/flutter_stem_example/linux/flutter/generated_plugin_registrant.cc
[style] 10-10: The function 'fl_register_plugins' is never used.
(unusedFunction)
packages/stem/example/flutter_stem_example/linux/runner/main.cc
[error] 6-6: There is an unknown macro here somewhere. Configuration is required. If G_DECLARE_FINAL_TYPE is a macro then please configure it.
(unknownMacro)
packages/stem/example/flutter_stem_example/windows/runner/main.cpp
[style] 8-8: The function 'wWinMain' is never used.
(unusedFunction)
packages/stem/example/flutter_stem_example/linux/runner/my_application.cc
[error] 6-6: There is an unknown macro here somewhere. Configuration is required. If G_DECLARE_FINAL_TYPE is a macro then please configure it.
(unknownMacro)
packages/stem/example/flutter_stem_example/windows/runner/utils.cpp
[style] 10-10: The function 'CreateAndAttachConsole' is never used.
(unusedFunction)
[style] 24-24: The function 'GetCommandLineArguments' is never used.
(unusedFunction)
packages/stem/example/flutter_stem_example/windows/runner/win32_window.cpp
[style] 123-123: The function 'Create' is never used.
(unusedFunction)
[style] 152-152: The function 'Show' is never used.
(unusedFunction)
[style] 241-241: The function 'SetChildContent' is never used.
(unusedFunction)
[style] 258-258: The function 'GetHandle' is never used.
(unusedFunction)
[style] 262-262: The function 'SetQuitOnClose' is never used.
(unusedFunction)
🪛 HTMLHint (1.9.2)
packages/stem/example/flutter_stem_example/web/index.html
[warning] 2-2: An lang attribute must be present on elements.
(html-lang-require)
🪛 markdownlint-cli2 (0.22.0)
packages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
[warning] 5-5: Files should end with a single newline character
(MD047, single-trailing-newline)
🪛 SwiftLint (0.63.2)
packages/stem/example/flutter_stem_example/ios/RunnerTests/RunnerTests.swift
[Warning] 5-5: Classes should have an explicit deinit method
(required_deinit)
packages/stem/example/flutter_stem_example/ios/Runner/SceneDelegate.swift
[Warning] 4-4: Classes should have an explicit deinit method
(required_deinit)
packages/stem/example/flutter_stem_example/macos/RunnerTests/RunnerTests.swift
[Warning] 5-5: Classes should have an explicit deinit method
(required_deinit)
packages/stem/example/flutter_stem_example/macos/Runner/MainFlutterWindow.swift
[Warning] 4-4: Classes should have an explicit deinit method
(required_deinit)
packages/stem/example/flutter_stem_example/macos/Runner/AppDelegate.swift
[Warning] 5-5: Classes should have an explicit deinit method
(required_deinit)
packages/stem/example/flutter_stem_example/ios/Runner/AppDelegate.swift
[Warning] 8-8: Prefer empty collection over optional collection
(discouraged_optional_collection)
[Warning] 5-5: Classes should have an explicit deinit method
(required_deinit)
🪛 YAMLlint (1.38.0)
packages/stem_flutter/analysis_options.yaml
[error] 7-7: too many blank lines (1 > 0)
(empty-lines)
Package publishing
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
There was a problem hiding this comment.
Actionable comments posted: 7
♻️ Duplicate comments (1)
packages/stem_flutter/lib/src/runtime/stem_flutter_worker_host.dart (1)
135-147:⚠️ Potential issue | 🟡 MinorFixed 400 ms grace before
Isolate.immediatekill is still insufficient for SQLite cleanup.
dispose()unconditionally kills the isolate withIsolate.immediateafter the default 400 msrequestShutdowndelay. Warm shutdown (worker.shutdown,backend.close,broker.close, in-flight job teardown) on mobile SQLite routinely exceeds this, risking truncated writes and lost heartbeats on teardown. Prefer awaiting astopped/exitsignal up to a longer timeout before falling back tokill.🔧 Suggested direction
Future<void> dispose() async { if (_disposed) return; _disposed = true; - await requestShutdown(); - _isolate.kill(priority: Isolate.immediate); + await requestShutdown(); + // Give the worker a chance to finish warm shutdown before killing. + try { + await _exit.first.timeout(const Duration(seconds: 5)); + } on TimeoutException { + _isolate.kill(priority: Isolate.immediate); + } await _messagesSub.cancel();🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/stem_flutter/lib/src/runtime/stem_flutter_worker_host.dart` around lines 135 - 147, dispose() currently kills the isolate immediately after requestShutdown() and the default 400ms grace, which is insufficient for mobile SQLite cleanup; modify dispose() (the method using requestShutdown(), _isolate.kill, _exitSub and the _exit stream/controller) to instead await a stop/exit signal from the worker (e.g., listen for an exit/stopped event on the _exit stream or _exit controller or wait on _exitSub) with a longer configurable timeout (several seconds), and only call _isolate.kill(Isolate.immediate) as a fallback after that timeout elapses; ensure subscriptions (_messagesSub, _errorsSub, _exitSub) and stream/controller closures remain properly cleaned up whether the isolate exits gracefully or is force-killed.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/stem_flutter.yaml:
- Around line 28-36: The cache key in the "Get Dart packages cache" step uses
hashFiles('**/pubspec.lock') which is ineffective because pubspec.lock is
gitignored; update the cache key to hash the committed files instead (e.g.,
hashFiles('**/pubspec.yaml') or combine both hashFiles('**/pubspec.yaml') and
hashFiles('**/pubspec.lock')) so dependency changes invalidate the cache;
specifically modify the key expression used in the Get Dart packages cache step
to reference pubspec.yaml (or both files) instead of only pubspec.lock.
In
`@packages/stem_flutter_sqlite/lib/src/runtime/stem_flutter_storage_layout.dart`:
- Around line 46-55: Before returning the StemFlutterStorageLayout, validate
that the broker and backend files do not collide: after constructing the File
objects (brokerFile and backendFile) or by comparing brokerFileName vs
backendFileName (and resolving with root.path/Platform.pathSeparator) ensure the
two paths are distinct and if they are equal throw/raise an ArgumentError (or
similar) with a clear message rejecting identical broker/backend filenames; add
this check in the same factory function that builds and returns
StemFlutterStorageLayout so callers cannot create a layout that points both
stores at the same SQLite file.
In `@packages/stem_flutter_sqlite/pubspec.yaml`:
- Line 15: The private import
stem_flutter/src/runtime/stem_flutter_dependency_bootstrap.dart creates a semver
break risk because stem_flutter_sqlite declares stem_flutter: ">=0.1.0 <0.2.0";
either pin the dependency to the exact intended workspace version (e.g., change
the version string in packages/stem_flutter_sqlite/pubspec.yaml from ">=0.1.0
<0.2.0" to the specific version you control, e.g., "0.1.0") or instead make the
bootstrap helper a public export in stem_flutter (move or re-export the symbol
from src/runtime in stem_flutter's public API) and update the import in
stem_flutter_sqlite to the public path; reference the private import path
stem_flutter/src/runtime/stem_flutter_dependency_bootstrap.dart and the pubspec
dependency entry when making the change.
In `@packages/stem_flutter/lib/src/runtime/stem_flutter_worker_host.dart`:
- Around line 84-104: The existing non-standard inline ignores on the three
subscriptions (messagesSub, errorsSub, exitSub) use a `reason:` field which Dart
ignores; update each to follow the document_ignores convention by placing a
normal comment with the justification immediately above the subscription, then
put a standalone `// ignore: cancel_subscriptions` on its own line directly
above the subscription declaration; apply this pattern to the messagesSub,
errorsSub, and exitSub declarations and remove the `reason:` text from the
ignore lines.
In `@packages/stem_flutter/lib/src/runtime/stem_flutter_worker_signal.dart`:
- Around line 117-127: The ready branch in tryParse uses a checked cast
'raw['sendPort'] as SendPort?' which will throw if the payload contains a
non-SendPort value; change it to a safe runtime-type check and only accept a
SendPort when it actually is one (e.g., extract raw['sendPort'] into a local,
check 'is SendPort', and pass the SendPort or null into
StemFlutterWorkerSignal.ready), updating the ready mapping in tryParse
accordingly so malformed payloads don't raise TypeError.
In `@packages/stem/example/flutter_stem_example/lib/main.dart`:
- Around line 201-211: In _shutdownResources: change the teardown order so you
cancel the monitor subscription (_monitorSub?.cancel()) and dispose the monitor
(_monitor?.dispose()) before disposing the worker host (_workerHost?.dispose())
and closing the runtime (_runtime?.close()) to avoid the monitor firing
refresh() while the runtime is closing; also simplify awaits by removing the
redundant "?? Future<void>.value()" and just await the nullable futures
directly, and finally null out _workerHost, _monitor, _runtime, and _monitorSub
as before.
In `@packages/stem/example/flutter_stem_example/web/index.html`:
- Around line 19-32: Add a mobile viewport meta (e.g., meta name="viewport"
content="width=device-width, initial-scale=1") to the head to ensure proper
mobile rendering, and replace placeholder project labels used in the page
metadata and PWA fields—specifically update the title element, the meta
name="apple-mobile-web-app-title" value, and the meta name="description" to a
concise, user-facing app name/description (for example "Stem Example" or
"Flutter Stem Example") so the browser and PWA UI no longer show the default
project-id placeholder.
---
Duplicate comments:
In `@packages/stem_flutter/lib/src/runtime/stem_flutter_worker_host.dart`:
- Around line 135-147: dispose() currently kills the isolate immediately after
requestShutdown() and the default 400ms grace, which is insufficient for mobile
SQLite cleanup; modify dispose() (the method using requestShutdown(),
_isolate.kill, _exitSub and the _exit stream/controller) to instead await a
stop/exit signal from the worker (e.g., listen for an exit/stopped event on the
_exit stream or _exit controller or wait on _exitSub) with a longer configurable
timeout (several seconds), and only call _isolate.kill(Isolate.immediate) as a
fallback after that timeout elapses; ensure subscriptions (_messagesSub,
_errorsSub, _exitSub) and stream/controller closures remain properly cleaned up
whether the isolate exits gracefully or is force-killed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 676e8769-5a5d-4b49-ab4e-ffe7f2343308
📒 Files selected for processing (31)
.github/workflows/dashboard.yaml.github/workflows/publish.yaml.github/workflows/stem.yaml.github/workflows/stem_cli.yaml.github/workflows/stem_flutter.yaml.github/workflows/stem_flutter_sqlite.yaml.github/workflows/stem_memory.yaml.github/workflows/stem_postgres.yaml.github/workflows/stem_redis.yaml.github/workflows/stem_sqlite.yamlpackages/stem/example/flutter_stem_example/README.mdpackages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.mdpackages/stem/example/flutter_stem_example/lib/main.dartpackages/stem/example/flutter_stem_example/pubspec.yamlpackages/stem/example/flutter_stem_example/web/index.htmlpackages/stem_flutter/CHANGELOG.mdpackages/stem_flutter/README.mdpackages/stem_flutter/analysis_options.yamlpackages/stem_flutter/lib/src/monitor/stem_flutter_queue_monitor.dartpackages/stem_flutter/lib/src/runtime/stem_flutter_worker_host.dartpackages/stem_flutter/lib/src/runtime/stem_flutter_worker_signal.dartpackages/stem_flutter/pubspec.yamlpackages/stem_flutter/test/stem_flutter_queue_monitor_test.dartpackages/stem_flutter/test/stem_flutter_worker_host_test.dartpackages/stem_flutter/test/stem_flutter_worker_signal_test.dartpackages/stem_flutter_sqlite/CHANGELOG.mdpackages/stem_flutter_sqlite/README.mdpackages/stem_flutter_sqlite/lib/src/runtime/stem_flutter_storage_layout.dartpackages/stem_flutter_sqlite/pubspec.yamlpackages/stem_flutter_sqlite/test/stem_flutter_sqlite_runtime_test.dartpubspec.yaml
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: test
- GitHub Check: test
- GitHub Check: test
- GitHub Check: test
- GitHub Check: test
🔇 Additional comments (24)
packages/stem_flutter_sqlite/CHANGELOG.md (1)
1-5: LGTM!The initial changelog entry is clear and aligned with the new Flutter SQLite adapter package.
packages/stem_flutter/CHANGELOG.md (1)
1-7: LGTM!The changelog accurately summarizes the initial
stem_flutterintegration surface.packages/stem_flutter/analysis_options.yaml (1)
1-6: LGTM!The package analyzer config cleanly inherits the shared rules and excludes generated sources.
packages/stem/example/flutter_stem_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md (1)
1-5: LGTM!The launch image customization instructions are clear and fit this generated Flutter asset directory.
pubspec.yaml (2)
10-11: LGTM!Adding both Flutter packages to the workspace is consistent with the new package manifests and CI direction.
21-21: Align themetaoverride with package constraints.The root
pubspec.yamlallowsmeta: ^1.17.0independency_overrides(line 21), butpackages/stem/pubspec.yaml,packages/stem_sqlite/pubspec.yaml, andpackages/dashboard/pubspec.yamlall declaremeta: ^1.18.0. This permits CI to resolve a version incompatible with those packages' declared constraints..github/workflows/stem_postgres.yaml (1)
31-43: LGTM!Using Flutter for workspace dependency resolution while keeping the package’s
dart testflow is appropriate here..github/workflows/stem.yaml (1)
29-41: LGTM!This correctly resolves the workspace with Flutter while preserving the pure Dart test execution for
packages/stem..github/workflows/stem_redis.yaml (1)
31-43: LGTM!The Flutter-based dependency resolution is consistent with the mixed workspace, and the existing Dart test flow remains intact.
packages/stem_flutter_sqlite/pubspec.yaml (1)
16-16:stem_sqliteversion bound now matches the package version.The constraint accepts
0.1.1, which aligns with the localpackages/stem_sqlite/pubspec.yamlversion shown in the provided context..github/workflows/publish.yaml (1)
23-24: LGTM — publish validation now has Flutter available.
use-flutter: trueis the expected input for the reused Dart ecosystem publisher and is currently declared by the upstream workflow: https://raw.githubusercontent.com/dart-lang/ecosystem/main/.github/workflows/publish.yaml.github/workflows/stem_sqlite.yaml (1)
31-43: LGTM — workspace resolution uses the Flutter SDK now.This matches the new Flutter package requirements while keeping the package’s existing Dart test command unchanged.
.github/workflows/stem_memory.yaml (1)
26-38: LGTM — Flutter setup is consistent with the workspace change.Using
flutter pub getat the workspace root should unblock resolution for Flutter SDK dependencies while preserving the existingdart testflow..github/workflows/stem_cli.yaml (1)
33-45: LGTM — dependency resolution now supports Flutter packages.The workflow still runs the existing CLI tests after resolving the workspace through Flutter.
.github/workflows/dashboard.yaml (1)
29-41: LGTM — dashboard CI follows the workspace toolchain migration.Even though the dashboard package is pure Dart, resolving from the root with Flutter is consistent with the new Flutter packages in the workspace.
.github/workflows/stem_flutter_sqlite.yaml (1)
36-44: Samepubspec.lockcache-key caveat asstem_flutter.yaml.If lock files aren't committed,
hashFiles('**/pubspec.lock')evaluates to a constant and the cache never invalidates on dependency changes. Apply the same fix here for consistency.packages/stem/example/flutter_stem_example/pubspec.yaml (1)
55-64: Redundantdependency_overridesforstemandstem_flutter.Both are already declared as
path:dependencies above (lines 33-36), so repeating them independency_overridesadds no value and risks drift if the top-level paths ever change. Keep onlymeta,stem_memory, andstem_sqlitehere.♻️ Proposed diff
dependency_overrides: meta: ^1.17.0 - stem: - path: ../.. - stem_flutter: - path: ../../../stem_flutter stem_memory: path: ../../../stem_memory stem_sqlite: path: ../../../stem_sqlitepackages/stem_flutter/README.md (1)
75-93:startMobileWorkerstill dropshost/monitorhandles.The example returns
Future<void>and loses both the spawnedStemFlutterWorkerHostand theStemFlutterQueueMonitor, so a reader copying this cannot shut the worker down or stop polling. Return a small struct (or accept owner-owned storage) so the lifecycle is obvious to readers of the README.📝 Suggested shape
-Future<void> startMobileWorker({ +class MobileWorkerHandles { + MobileWorkerHandles(this.host, this.monitor); + final StemFlutterWorkerHost host; + final StemFlutterQueueMonitor monitor; +} + +Future<MobileWorkerHandles> startMobileWorker({ required Broker broker, required ResultBackend backend, }) async { ... await monitor.start(); + return MobileWorkerHandles(host, monitor); }packages/stem_flutter/test/stem_flutter_worker_host_test.dart (1)
35-105: LGTM — good coverage of ready/shutdown, fatal, and replay semantics.Timeouts are bounded (2s), teardown disposes the host, and the three scenarios (signal forwarding, error surfacing, late-subscriber replay) cleanly exercise
StemFlutterWorkerHost.packages/stem_flutter/pubspec.yaml (1)
5-5: Root workspace correctly includes this package and sibling.Confirmed: the root
pubspec.yamllistspackages/stem_flutterandpackages/stem_flutter_sqlitein theworkspace:array, soresolution: workspacewill resolve correctly.packages/stem_flutter/test/stem_flutter_queue_monitor_test.dart (1)
63-279: LGTM.Fake broker/backend are deterministic, heartbeat freshness uses
heartbeatInterval * 3 = 3sagainst a 200ms offset so the window is stable under CI scheduling, and the sticky/lifecycle transitions exercise the monitor’s error-recovery path well.packages/stem_flutter_sqlite/test/stem_flutter_sqlite_runtime_test.dart (1)
89-111: LGTM.Both futures are subscribed before either is awaited, so the back-to-back
ready/status(running)emission on the broadcast stream is no longer racy. Pipe-delimited detail decoding is also robust against the fixed encoding in_sqliteLauncherEntry.packages/stem_flutter_sqlite/README.md (1)
105-149: LGTM.The worker-isolate snippet now wraps lifecycle inside
try/finallysoworker.shutdown(),stores.close(), andcommands.close()always run. Example also correctly mirrorsStemFlutterSqliteWorkerStores.openand command-port usage from the actual launcher.packages/stem_flutter/lib/src/monitor/stem_flutter_queue_monitor.dart (1)
59-163: LGTM.
start()now rolls back_startedon refresh failure so the monitor can be retried,bindWorkerSignalsawaits the old subscription before installing the new one, andrefresh()surfaces I/O failures via_applyRefreshFailurewhile still rethrowing for direct callers. Sticky worker-status handling correctly suppresses heartbeat-based overrides after a fatal signal.
|
Addressed the remaining actionable CodeRabbit feedback in 723162c. A few generated/example scaffold notes are intentionally left unchanged: Android example app id/debug signing, optional Gradle wrapper checksum hardening, and the generated macOS window scaffold. The Flutter example keeps the first-party path overrides for local workspace resolution; removing the stem/stem_flutter overrides makes pub get resolve those transitive first-party packages from hosted pub instead of the local checkout. The meta override is now ^1.18.0. |
Stale automated review; all non-outdated review threads are resolved and the latest CodeRabbit check passed.
Summary
stem_flutterandstem_flutter_sqlitefor Flutter-hosted Stem runtimesflutter_stem_exampleand supporting example package doc surfacesTesting
Summary by CodeRabbit
New Features
Documentation
Bug Fixes
Tests
Chores