Z3R4H: Windows offline launcher, wrapper scaffold, geo services, UI rebrand & prompt stack#7
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e3456d8fde
ℹ️ 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".
| if ((int)res.StatusCode >= 200 && (int)res.StatusCode < 500) | ||
| { |
There was a problem hiding this comment.
Require 2xx responses before declaring readiness
WaitForEndpointReadyAsync currently marks any HTTP status in the 200–499 range as healthy, so a 404/401 from a wrong or missing health route is treated as readiness and startup continues. In this wrapper flow, that can falsely report backend/geo/routing as ready and open the browser even though required endpoints are unavailable; readiness checks should only succeed on explicit success statuses (typically 2xx) and keep polling otherwise.
Useful? React with 👍 / 👎.
| where curl.exe >nul 2>&1 | ||
| if errorlevel 1 exit /b 2 |
There was a problem hiding this comment.
Avoid hard-failing probes when curl.exe is absent
In :probe_url, a not-yet-ready PowerShell probe falls through to a curl check, and missing curl.exe returns errorlevel 2; :wait_url treats that as a fatal "probe unavailable/blocked" state and exits immediately. On Windows environments without curl, startup fails on the first polling attempt even though PowerShell probing is available and the service may just need more time to become ready.
Useful? React with 👍 / 👎.
Motivation
.exe-first wrapper to improve operator UX and failover to the BAT fallback.Description
PROJECT_BRIEF.md,TASKS.md,Z3R4H_CLEAN_ENV_CHECKLIST.md, andZ3R4H_PROGRESS_SUMMARY.mdfor scope, tasks and RC validation workflows.launch_z3r4h.batand runtime configruntime/runtime_config.envplus helper scripts underruntime/to start bundled or fallback runtimes (start_backend.bat,start_valhalla.bat,build_backend_exe.bat).wrapper/(Program.cs,ConfigResolver,RuntimeOrchestrator,ReadinessProbe,BatFallback,StartupScreen, logging and config types) implementing package-root resolution, dual-service orchestration, readiness probing, structured exit codes and BAT fallback hooks (Task 19–25 milestones).backend/open_webui/services/geo/includingvalhalla_client.py,dem_loader.py,terrain_service.py,suitability_service.py,ai_geo_orchestrator.py, and pydanticschemas.py, plusconfig.pyfeature flags and health checks; wiredrouters/geo.pyintomain.pyat/api/geo.src/lib/constants.ts,app.html, site manifests and search descriptors; added mode selector UI (Z3R4HModeSelector.svelte), mode-aware prompt stack and model routing utilities (z3r4hPromptStack.ts,z3r4hModeRouting.ts), and integrated mode storage and prompt composition into chat flows (Chat.svelte,Navbar.svelte,Channel.svelte).GeoAdvisor.svelte,RouteResultCard.svelte,SiteResultCard.svelteand wiring atsrc/routes/(app)/maps/+page.svelteplus Svelte storesrc/lib/stores/geo.tsand client-side integration for/api/geoendpoints.src/lib/prompts/z3r4h/includingcore_system.txt,failure_behavior.txtand per-mode prompts for the Z3R4H modes.backend/open_webui/test/geo/test_geo_endpoints_and_services.py, frontend unit/contract testssrc/lib/components/map/__tests__/maps_flow.spec.ts, and wrapper contract testswrapper/tests/test_wrapper_startup_contract.pyto codify expected behaviors and interfaces.Testing
backend/open_webui/test/geo/test_geo_endpoints_and_services.pywhich exercises geo endpoints, DEM fallback behavior, suitability scoring, and intent classification.src/lib/components/map/__tests__/maps_flow.spec.ts(Vitest) to assert UI contract hooks for the geo components, and wrapper tests:wrapper/tests/test_wrapper_startup_contract.pyto assert startup orchestration text/paths for the wrapper scaffold.Codex Task