Repository navigation
flare-winui,packaging,ci: preserve pool settings in desktop bridge, test bridge in CI, and ship Windows flare.exe - #730
Merged
Conversation
…est bridge in CI, and ship Windows flare.exe
Why:
Adding pool_vram_memory and pool_ram_memory to flare::settings::RuntimeSettings
broke flare-winui-bridge compilation on tag v0.6.0 because runtime_input in
flare-winui/bridge/src/lib.rs constructs RuntimeSettings with an exhaustive
struct literal. Pull-request CI in .github/workflows/native-serving.yml missed
the failure because it never built or tested flare-winui/bridge. Separately,
the Windows release archives (flare-windows-amd64.zip and
flare-windows-arm64.zip) shipped only the desktop launcher as Flare.exe without
the Windows CLI executable, and keeping the desktop launcher named Flare.exe
would collide with flare.exe on Windows's case-insensitive filesystem.
What changed:
- flare-winui/bridge/src/lib.rs: updated runtime_input to accept the active
RuntimeSettings from Controller::snapshot() when called by
flare_app_set_runtime_settings, retaining existing pool_vram_memory and
pool_ram_memory values instead of omitting them or adding fields to the C ABI
and desktop UI. Extended runtime_settings_abi_tests with ABI round-trip and
end-to-end C-bridge persistence tests.
- .github/workflows/native-serving.yml, scripts/dev_windows.ps1, AGENTS.md:
added `cargo test --locked --release --manifest-path
flare-winui/bridge/Cargo.toml --target-dir flare-cli/target` to the Linux and
Windows CI jobs and to the Windows development test runner.
- flare-winui/package-single-file.ps1, flare-winui/build.ps1,
packaging/archive.py, packaging/licenses.py, third_party/rust/: renamed the
single-file desktop launcher output from Flare.exe to flare-app.exe; changed
packaging/archive.py from desktop-or-CLI selection via --winui-packages to
accepting --binary (CLI) and --desktop-binary paired with --winui-packages,
allowing Windows release archives to bundle both flare/flare.exe and
flare/flare-app.exe with merged Rust notices from flare-cli,
flare-winui/bridge, and flare-winui/launcher plus NuGet notices while keeping
CLI-only archive invocations unchanged; added aarch64-pc-windows-msvc to
packaging/licenses.py TARGETS and regenerated third_party/rust/.
- .github/workflows/release.yml: extended the Windows amd64 and arm64 jobs to
compile flare-cli with +crt-static in the shared winui-target directory,
package both flare.exe and flare-app.exe, and verify flare.exe from an
isolated directory (dumpbin check for no dynamic VC++ runtime imports,
--version, subcommand --help, and rejection of `flare agent`) before running
the flare-app.exe startup check.
- tests/cli/test_release_archive.py: added argument-validation, CLI-only, and
combined Windows archive layout tests for packaging/archive.py.
- docs/release.md, docs/windows.md, flare-winui/README.md,
flare-winui/Assets/README.md, THIRD_PARTY_NOTICES.md, docs/TODO.txt: replaced
Flare.exe references with flare-app.exe and updated Windows archive contents,
notice coverage, and qualification statements.
Claimed result:
Restores flare-winui-bridge compilation while preserving pre-existing
pool_vram_memory and pool_ram_memory overrides across desktop saves, catches
future flare API breaks against flare-winui-bridge in pull-request CI on both
Linux and Windows, and is expected to ship both static-CRT flare.exe and
flare-app.exe in flare-windows-amd64.zip and flare-windows-arm64.zip.
Evidence (Linux x86_64 CPU):
- cargo test --locked --release --manifest-path flare-winui/bridge/Cargo.toml
--target-dir flare-cli/target: 12 passed, 0 failed (including
runtime_settings_abi_copies_options_and_borrows_only_snapshot_output and
set_runtime_settings_preserves_unexposed_pool_memory_fields).
- cargo test --locked --release --manifest-path flare/Cargo.toml
--target-dir flare-cli/target --tests: 255 passed (247 lib, 7
packed_canonical_download, 1 reference_workflows), 0 failed, 4 ignored; two
earlier parallel lib runs each hit a transient localhost `unexpected request
/` failure in hub::tests that passed on immediate re-run.
- cargo test --locked --release --manifest-path flare-cli/Cargo.toml: 250
passed, 0 failed, 3 ignored.
- python3 packaging/licenses.py regenerated third_party/rust/ across all four
CLI targets (373 crates, adding windows-sys 0.52.0 and
windows_aarch64_msvc 0.52.6/0.53.1).
- pytest tests/cli tests/preparation/test_packaging.py: 213 passed, 0 failed
(including test_release_archive.py covering combined Windows archives for
x86_64-pc-windows-msvc and aarch64-pc-windows-msvc with placeholder binaries
and fixture NuGet notices).
- python3 scripts/set_release_version.py --check 0.0.0 and YAML parsing of
.github/workflows/{native-serving,release}.yml passed.
Limitations:
Windows builds and checks on GitHub-hosted windows-2025 and windows-11-arm
runners—including static-CRT linking of flare.exe, dumpbin inspection,
flare-app.exe startup, and workflow_dispatch or release publication—were not
executed on this Linux host.
Design-Signed-Off-By: Antigravity (Gemini); design-review=2e5b
Signed-off-by: Luke Alonso <lalonso@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Commit
45e1c1ad(#711) addedpool_vram_memoryandpool_ram_memorytoflare::settings::RuntimeSettingsinflare/src/runtime_settings.rs. Becauseruntime_inputinflare-winui/bridge/src/lib.rsinitializesRuntimeSettingswith an exhaustive struct literal, both Windows release jobs (windows-2025amd64 andwindows-11-armarm64) failed to compileflare-winui-bridgein thev0.6.0Releaserun (47278490367), preventing publication.Pull-request CI in
.github/workflows/native-serving.ymldid not catch the break because it testedeos,selene,selene-manager,helios,flare, andflare-cliwithout compiling or testingflare-winui/bridge.Separately, the Windows release archives (
flare-windows-amd64.zipandflare-windows-arm64.zip) shipped only the single-file desktop launcher asFlare.exewithout the Windows CLI executable. Includingflare.exein the sameflare/archive directory requires a distinct executable name for the desktop launcher because Windows filesystems are case-insensitive.What changed
flare-winui/bridge/src/lib.rs):runtime_inputbuiltflare::settings::RuntimeSettingssolely fromFlareRuntimeSettingsand omittedpool_vram_memoryandpool_ram_memory.flare_app_set_runtime_settingsnow readscontroller.snapshot().runtime_settingsand passes it toruntime_input, which clones the existingpool_vram_memoryandpool_ram_memoryvalues instead of changing theFlareRuntimeSettingsC ABI or adding WinUI Settings controls.runtime_settings_abi_teststo verify ABI round-trip preservation and addedset_runtime_settings_preserves_unexposed_pool_memory_fields, which exercisesflare_app_createthroughflare_app_set_runtime_settingsagainst adesktop-state.jsoncontaining pool limits and confirms both fields remain intact after saving another setting..github/workflows/native-serving.yml,scripts/dev_windows.ps1,AGENTS.md):cargo test --locked --release --manifest-path flare-winui/bridge/Cargo.toml --target-dir flare-cli/targetto both the Linux (ubuntu-24.04) and Windows (windows-2022) jobs inNative serving, toscripts/dev_windows.ps1 -Action Test, and to the crate test list inAGENTS.md.flare.exein Windows release archives (flare-winui/package-single-file.ps1,flare-winui/build.ps1,packaging/archive.py,packaging/licenses.py,third_party/rust/):Flare.exetoflare-app.exe(the launcher resolves its own path viastd::env::current_exe()for taskbar relaunch metadata).packaging/archive.pyfrom selecting CLI-only or desktop-only via--winui-packagesto accepting--binary(CLI, staged asflareorflare.exe) and--desktop-binarypaired with--winui-packages(desktop launcher, staged asflare-app.exe). CLI-only invocations remain unchanged; passing both flags produces a Windows release archive containingflare/flare.exe,flare/flare-app.exe, merged Rust dependency notices acrossflare-cli/Cargo.toml,flare-winui/bridge/Cargo.toml, andflare-winui/launcher/Cargo.toml, Rust standard library notices, and NuGet notices.aarch64-pc-windows-msvctoTARGETSinpackaging/licenses.pyand regeneratedthird_party/rust/(addingwindows-sys 0.52.0andwindows_aarch64_msvc0.52.6/0.53.1).tests/cli/test_release_archive.pycovering argument validation, CLI-only Linux/Windows archive layouts, and combined Windows release archive layouts for bothx86_64-pc-windows-msvcandaarch64-pc-windows-msvc..github/workflows/release.yml):Build the CLIstep to the Windows matrix (windows-2025amd64 andwindows-11-armarm64) that buildsflare-cli/Cargo.toml --bin flarewith+crt-staticinto the shared$localDev\winui-targetdirectory already populated byflare-winui/bridge.--binaryand--desktop-binarytopackaging/archive.py.flare.exefrom an isolated directory containing no other files:dumpbin /nologo /dependentsrejects dynamic Visual C++ runtime DLL imports (vcruntime*,msvcp*,concrt*,vcomp*),flare.exe --versionmust printflare <VERSION>,run/download/models --helpmust succeed, andflare.exe agentmust exit non-zero, followed by the existingflare-app.exestartup check.docs/release.md,docs/windows.md,flare-winui/README.md,flare-winui/Assets/README.md,THIRD_PARTY_NOTICES.md,docs/TODO.txt):Flare.exe->flare-app.exe), Windows archive contents, notice inventory targets, and qualification status.Claimed benefit and result
flare-winui-bridgecompiles cleanly againstflare::settings::RuntimeSettings, passes all 12 unit/C-ABI tests (including preserving pre-existingpool_vram_memoryandpool_ram_memoryacrossflare_app_set_runtime_settings), andpackaging/archive.pyproduces combined Windows release zips for bothx86_64-pc-windows-msvcandaarch64-pc-windows-msvcwith merged Rust and NuGet notices.Native servingwill fail immediately if futureflarechanges breakflare-winui-bridgeon Linux or Windows, andReleasewill publish both static-CRTflare.exeandflare-app.exeinsideflare-windows-amd64.zipandflare-windows-arm64.zip.Supporting evidence and limitations
Validated on Linux x86_64 CPU at commit
88fae186:cargo test --locked --release --manifest-path flare-winui/bridge/Cargo.toml --target-dir flare-cli/target: 12 passed, 0 failed (includingruntime_settings_abi_copies_options_and_borrows_only_snapshot_outputandset_runtime_settings_preserves_unexposed_pool_memory_fields).cargo test --locked --release --manifest-path flare/Cargo.toml --target-dir flare-cli/target --tests: 255 passed (247 unit, 7packed_canonical_download, 1reference_workflows), 0 failed, 4 ignored. Two earlier parallel unit-test runs each encountered one transient localhostunexpected request /failure inhub::tests(a_killed_acquisition_resumes_the_partial_and_reuses_completed_filesandwarm_download_repairs_corrupt_entry_from_signed_source), both passing on immediate re-run.cargo test --locked --release --manifest-path flare-cli/Cargo.toml: 250 passed (224 unit, 9cache_commands, 6cli, 4inspect, 7unverified_payload), 0 failed, 3 ignored.python3 packaging/licenses.py: regeneratedthird_party/rust/cleanly across all four CLI targets (373 crates).pytest tests/cli tests/preparation/test_packaging.py: 213 passed, 0 failed (includingtests/cli/test_release_archive.pyusing placeholder executables and fixture NuGet notice files).python3 scripts/set_release_version.py --check 0.0.0and YAML parsing of.github/workflows/native-serving.ymland.github/workflows/release.ymlpassed.Material limitations and unrun checks:
windows-2025andwindows-11-armrunners—including static-CRT linking offlare.exe,dumpbin /dependentsoutput verification,flare-app.exelaunch and window checks, andworkflow_dispatchor tag publication—have not run yet.