Solution application#21
Merged
Merged
Conversation
Add sncf_recommender with four ordering strategies and wire them into RailwayManager via request_data.event.mode: - basic: best-first ordering (SNCF_RECO3) - deontic: filter by a KPI threshold, then sort ascending - risk: sort all recommendations by a KPI ascending - risk_tie_break: primary KPI with a secondary KPI as tie-breaker Supported KPIs: passengers, delay (parsed from strings like "1h30"), cost, total_cost. Catalog lookup errors are surfaced as an empty list instead of crashing the transform step.
Replace the eval-demo hack that faked a success response with the real POST to VITE_POWERGRID_SIMU/api/v1/recommendations. - api.ts: await the real request, detect when the response is the SPA index.html (request fell through to the nginx SPA fallback because no /powergrid-simu/ proxy is present) and log request/response details. - Assistant.vue: make onSelection async; only mark the card resolved and close the assistant when the apply succeeds, and leave the card open on failure so the user can retry (the http plugin shows the error modal).
Route the apply POST through a /powergrid-simu/ location so the browser stays same-origin and never triggers CORS against the grid2op simulator. - frontend/default.conf and cab-standalone nginx-cors-permissive.conf: add the /powergrid-simu/ proxy_pass (LAN upstream, adjust per env). - docker-compose.sh: default VITE_POWERGRID_SIMU=/powergrid-simu. - env.d.ts: type the VITE_* env vars, including VITE_POWERGRID_SIMU.
Upgrade the PowerGrid grid2op simulator PoC with five related changes: - Recommendation store: add an in-process RecommendationStore shared by the POST /api/v1/recommendations endpoint and the simulation loop. The loop now reads the applied recommendation directly instead of issuing an HTTP request back to itself, which was fragile behind a reverse proxy and returned 404. - Action verification: add summarize_action / verify_action_applied / format_verdict_description in utils.py and wire them into Simulator so each InteractiveAI recommendation is checked against the grid state (APPLIED / NO_OP / NO_EFFECT / REJECTED / OVERRIDDEN) and reported. - Pause/Resume: replace the one-shot 'Continue' button with a Pause/ Resume toggle, add /pause_simulation, stream simulation-state and keepalive SSE events, and default IS_PAUSED to False. - Reverse-proxy / CORS readiness: add CORS headers, ProxyFix, SocketIO cors_allowed_origins and X-Accel-Buffering so the simulator works behind the frontend nginx proxy and for direct cross-origin calls. - Translate comments, log messages and dashboard UI from French to English; tune scenario timing and demo server config.
Name the created i18n instance and export it as the default, and have setupEntitiesLocales default to that instance instead of requiring it to be passed in, so entity locales register against the same instance the app uses.
Add the Kubernetes ConfigMap for the cab namespace covering the OperatorFabric businessconfig, cards, users, nginx and web-ui configuration for the assistant platform deployment.
Drop the hardcoded LAN IP fallback that had been baked into the source (and the built image). The machine-specific value is already supplied at runtime via the RL_AGENT_API_URL env var (.secrets -> docker-compose.sh -> .env for local Docker, extraEnv for k8s), so the code fallback only needs to be the safe in-cluster default.
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.
Merge solution-application: PowerGrid apply flow + nginx proxy + sim UX overhaul, Railway KPI sorting, shared i18n, and deploy ConfigMap.