Skip to content

Correct Sunset range scale and preserve saved placements - #159

Merged
SunkenInTime merged 1 commit into
mainfrom
t3code/audit-map-scaling-accuracy
Sep 5, 2026
Merged

Correct Sunset range scale and preserve saved placements#159
SunkenInTime merged 1 commit into
mainfrom
t3code/audit-map-scaling-accuracy

Conversation

@SunkenInTime

@SunkenInTime SunkenInTime commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Sunset's map scale made a nominal 30 m Crosscut radius cover about 26.87 m. Set the scale to 1.06, which measures 29.97 m against six calibration landmarks and ten held-out corners. The artwork stays the same size. The remaining 0.84% difference from the screenshot's visible circle is accepted and documented.

Data version 98 preserves the anchors of saved abilities, lineup abilities, and scale-dependent utilities on both sides. Earlier migrations retain the old Sunset scale, and migration selection uses the original input version so old imports complete every required stage.

Validation:

  • The strict geometry audit passes with a 0.099% scale error.
  • Placement, old-import, canonical-coordinate, and strategy round-trip checks passed.
  • GitHub CI passed analysis and the full Flutter test suite. All 20 affected local tests also pass after pinning the historical folder-icon migration version.
  • Flutter analysis passed with informational diagnostics only.

No live Valorant activation-boundary test was performed. Collision-boundary behavior and custom-shape diameter semantics remain separate work.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 9cb7df37-3eda-42ad-85b1-a8479afb463c

📥 Commits

Reviewing files that changed from the base of the PR and between ae89bed and da0fcd0.

📒 Files selected for processing (13)
  • docs/sunset-scale-correction.md
  • lib/const/maps.dart
  • lib/const/settings.dart
  • lib/migrations/ability_scale_migration.dart
  • lib/migrations/canonical_coordinates_migration.dart
  • lib/migrations/custom_circle_wrapper_migration.dart
  • lib/migrations/map_scale_history.dart
  • lib/migrations/sunset_scale_migration.dart
  • lib/providers/strategy_provider.dart
  • scripts/audit_sunset_scale.py
  • test/fixtures/map_calibration/sunset.json
  • test/folder_icon_registry_test.dart
  • test/sunset_scale_migration_test.dart

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The PR corrects Sunset’s runtime scale to 1.06, adds calibration tooling and fixtures, increments data version 98, and migrates existing Sunset strategy placements while preserving historical migration behavior.

Changes

Sunset scale correction

Layer / File(s) Summary
Calibration fixture and audit tooling
scripts/audit_sunset_scale.py, test/fixtures/map_calibration/sunset.json, docs/sunset-scale-correction.md
Adds pinned landmark data, source verification, uniform-scale fitting, error checks, plots, and documentation for the corrected scale.
Historical scale resolution
lib/const/maps.dart, lib/const/settings.dart, lib/migrations/map_scale_history.dart, lib/migrations/ability_scale_migration.dart, lib/migrations/canonical_coordinates_migration.dart, lib/migrations/custom_circle_wrapper_migration.dart, lib/providers/strategy_provider.dart
Sets Sunset’s scale to 1.06, increments the data version to 98, and keeps pre-version-98 migrations on the previous Sunset scale.
Sunset placement migration
lib/migrations/sunset_scale_migration.dart, lib/providers/strategy_provider.dart, docs/sunset-scale-correction.md
Adds the version 98 migration and applies anchor-based translations to Sunset abilities, utilities, and lineup items after canonical coordinate conversion.
Migration regression coverage
test/sunset_scale_migration_test.dart, test/folder_icon_registry_test.dart, docs/sunset-scale-correction.md
Tests current and historical versions, legacy imports, metadata, deleted items, non-Sunset maps, idempotence, source immutability, and ZIP round trips.

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: ⚪ Minimal · up to da0fc

The Sunset scale update and associated data migration are covered across current and historical strategy paths, with no concrete merge-blocking issue identified.

Sequence Diagram(s)

sequenceDiagram
  participant StrategyProvider
  participant HistoricalMigrations
  participant SunsetScaleMigration
  participant StrategyPages
  StrategyProvider->>HistoricalMigrations: migrate legacy coordinates and shapes
  HistoricalMigrations-->>StrategyProvider: return canonical strategy data
  StrategyProvider->>SunsetScaleMigration: apply version 98 Sunset migration
  SunsetScaleMigration->>StrategyPages: translate abilities, utilities, and lineup items
  StrategyPages-->>StrategyProvider: return migrated pages and updated version
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 1 files. (12 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the two main changes: correcting Sunset's range scale and preserving saved placements during migration.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 1 files. (12 skipped: 12 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch t3code/audit-map-scaling-accuracy

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@SunkenInTime
SunkenInTime merged commit 5861ee3 into main Sep 5, 2026
2 of 3 checks passed
@greptile-apps

greptile-apps Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This change calibrates Sunset’s runtime range scale to 1.06 and migrates existing saved placements so their tactical anchors remain unchanged. Focused Flutter tests passed for historical imports, legacy conversion, anchor preservation, current-version loading, and ZIP reimport behavior.

Confidence Score: 5/5

Safe to merge based on focused migration coverage for the scale correction and saved strategy compatibility paths.

All identified failure paths were exercised with the repository-local Flutter SDK: legacy paged and pre-page imports, historical versions 16 through 96, defense coordinates, abilities, utilities, nested lineup abilities, current-version loading, and ZIP reimport.

Files Needing Attention: No additional files need attention. The migration and orchestration files were exercised through focused regression coverage.

T-Rex T-Rex Logs

What T-Rex did

  • Direct historical-scale checks for v39 ability scaling and v45 custom circles passed; legacy Sunset imports from versions 16 through 96, defense reflection, pre-page conversion, and reimport behavior all succeeded; source inspection confirmed pre-98 consumers use the historical scale before the 1.06 correction.
  • A version-97 Sunset fixture was rendered before migration with the historical scale and after migration with the corrected scale; page abilities, utilities, and nested lineup abilities retained equal anchors, including nine-decimal values, and the full migration suite passed.
  • The v96 runtime test passed while exercising paged-import migration through intermediate helpers that update versionNumber, and the v15 no-page legacy runtime test passed after conversion stamping version 98 and verifying forced migration produces placements identical to the paged legacy path; worktree evidence shows no committed-source modifications.
  • The current-version migration test passed, confirming the migrated Sunset strategy does not shift on a repeat migration call; the ZIP export/import test passed, confirming regular reimport preserves migrated placements; and the provider guard only runs corrections for source data older than version 98 unless explicitly forced.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "Fix Sunset range scale while preserving ..." | Re-trigger Greptile

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