Skip to content

fix: align standard-mode estimates and Green Wave savings - #59

Merged
fjarmula merged 1 commit into
mainfrom
codex/fix-standard-mode
Oct 29, 2026
Merged

fjarmula merged 1 commit into
mainfrom
codex/fix-standard-mode

Conversation

@fjarmula

Copy link
Copy Markdown
Member

Summary

  • Standard mode showed a Green Wave savings card, while live savings and completed summaries compared against an older normal-traffic formula instead of the displayed standard estimate. Hide savings claims and Green Wave estimates throughout standard-mode setup, telemetry, and completed/previous results.
  • Use one standard-motion dry-run profile for the backend start estimate and Green Wave savings at the same route position. Mock pre-flight and savings use the actual disabled timeline. At arrival, savings equal the difference between the displayed rounded run times.
  • Align backend estimate rounding in station rows and pre-flight, retain both estimates in Green Wave/comparison setup, and update Polish copy, architecture documentation, and regression coverage.

Verification

  • Frontend: lint, typecheck, format check, all 1,254 tests, and production build passed.
  • Backend: Ruff lint/format and mypy passed. Full pytest: 1,528 passed; one local dataset check failed: tests/dataset/test_real_data_smoke.py::test_committed_curated_files_match_the_processed_report. The existing processed ETL report lacks curated-input hashes for prm_bases.json and roundabouts.json; these inputs and the report are outside this change.
  • Reran 14 focused standard-estimate/baseline regression tests before opening this PR: all passed.
  • Six real Kraków route pairs across densities 1.0, 1.5, and 3.0: standard estimates matched completed runs, and Green Wave savings matched the difference between displayed totals, including zero and negative savings.
  • Playwright CLI: standard estimate and completion both 02m 49s, with no savings claims. Green Wave completed in 02m 24s against the same 02m 49s standard baseline, reporting 25s saved. Polish phone rendering at 390 px had no horizontal overflow.
  • Independent review, including half-second rounding cases: no actionable findings. Event snapshot changes affect only current_time_saved_sec; movement, elapsed time, signal states, and controller events are preserved.

Contract or safety impact

No API shape or generated-contract changes. current_time_saved_sec now compares Green Wave with the standard ambulance simulation instead of the legacy normal-traffic formula; disabled runs report zero. estimated_normal_time_sec remains available for compatibility. All signals and travel times remain simulated; no real signal actuation or routing-policy changes.

Follow-ups

  • Regenerate the local processed dataset report to restore its curated-input hashes and clear the unrelated dataset verification failure.
  • Rebuild/restart the running application after integration to load the fix.

@fjarmula
fjarmula requested a review from piotr-lorek as a code owner October 29, 2026 17:16
@fjarmula
fjarmula merged commit 24d63ef into main Oct 29, 2026
7 checks passed
@fjarmula
fjarmula deleted the codex/fix-standard-mode branch October 29, 2026 17:21
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.

1 participant