Skip to content

refactor(#272): E4 band 3c -- weather and geocache leave src.ino as units - #277

Merged
Strycher merged 1 commit into
mainfrom
fc/212-e4-data
Sep 7, 2026
Merged

Strycher merged 1 commit into
mainfrom
fc/212-e4-data

Conversation

@Strycher

@Strycher Strycher commented Sep 7, 2026

Copy link
Copy Markdown
Owner

E4 band 3c, task #272 under #264 and Epic #212. Opened autonomously under the owner's standing grant of 2026-09-07.

What moved

weather (12 functions, including framFlushToSD) and geocache (9 functions) with their state and types; four cut-set variables leave src.ino (6,598 → 5,808 lines). Full composition in docs/god-object-inventory.md §12.

Calls made under the grant — please review

  1. framFlushToSD lives in weather, as E4-5c (band 3): weather and geocache units #272's text proposed. It flushes the battery ring and the weather ring; after 3b both are reachable through battery.h and fram.h, and weather is the higher of the two domains, so it reaches nothing it should not. lastFramFlush went with it, published for loop.
  2. selectedCacheIndex and listScrollOffset stayed in src.ino: list-UI state touched only by screen callbacks and buttons (band 4).
  3. Eight empty section banners and orphaned comments left behind by bands 1–3b were removed by hand.

The proof got stronger

Until now the verifier attributed a moved function's size change with the single word "moved". It now compares every moved function's reference set before and after — a reference may disappear from the intra-object graph only because its target lives in a different object now, and nothing may appear. All 21 functions of this band pass with every reference kept.

Proof

scripts/verify_extraction.py PASS; full output in §12:

symbols   589 -> 589: 46 relocated, 2 linkage changes declared, removed none, added none
deltas    18 symbols, net +43, all attributed; unexplained none
moved     21 functions checked by reference set: every reference kept
sections  .flash.text +116 (inputs +115), .flash.rodata +68 (inputs +188, merged), RAM unchanged
Flash     1,856,406 -> 1,856,590   Both toolchains build. 58 tests pass. Not flashed.

…nits

Two units, the data domains that consume the sensors:

  src/weather.{h,cpp}   weatherHistory, weatherHistoryCount, weatherHistoryHead,
                        lastWeatherLog, weatherTrend (WeatherTrend), the weather
                        log counters, lastFramFlush; WeatherReading; WEATHER_*;
                        getCurrentTimestamp, getWeatherFilename, add/getWeather*,
                        logWeatherToFRAM, logWeatherReading, loadWeatherHistory,
                        calculateWeatherTrend, getTrendArrow, calculateForecast,
                        updateWeatherLogStats, and framFlushToSD (as #272
                        proposed: both rings it flushes are now reachable
                        through battery.h and fram.h)
  src/geocache.{h,cpp}  cacheList (GeocacheEntry), cacheListCount, the seven
                        filter/sort settings, the cached distances and filtered
                        indices, listHighlightIndex; MAX_CACHES and the file
                        defines; saveCacheFoundStatus, loadCacheFoundStatus,
                        decodeROT13, extractXMLField, extractXMLFloat,
                        parseGPXFromString, gcUpdateDistances, gcApplyFilters,
                        loadGeocachesFromSD

Four cut-set variables leave src.ino (6,598 -> 5,808 lines).

Verifier: every moved function is now checked by its reference set (a
reference may vanish from the intra-object graph only because its target
lives in another object now; nothing may appear). All 21 pass, references
identical. Harness: default arguments stripped from a moved definition;
blank-line runs collapsed. Eight empty banners from bands 1-3b removed.

Verified by scripts/verify_extraction.py, PASS: 589 -> 589 symbols, 46
relocated, 2 linkage changes declared, 18 size deltas net +43 all attributed,
unexplained none. .flash.text +116 (inputs +115), .flash.rodata +68 (inputs
+188, merged), RAM unchanged. Flash 1,856,406 -> 1,856,590. Both toolchains
build. 58 tests pass. Record: section 12 of docs/god-object-inventory.md.
@Strycher

Strycher commented Sep 7, 2026

Copy link
Copy Markdown
Owner Author

Merged autonomously under the owner's standing grant of 2026-09-07.

Gate: compile-gate green. Proof: scripts/verify_extraction.py PASS — 589 -> 589 symbols, 46 relocated, 2 linkage changes declared, 18 size deltas attributed, every one of the 21 moved functions checked by reference set, unexplained none; section deltas traced to input sections. Both toolchains build; 58 tests pass. Not flashed.

Set aside for the owner's review, in the PR body: framFlushToSD homed in weather, and the two list-UI variables left for band 4.

@Strycher
Strycher merged commit 0053f77 into main Sep 7, 2026
4 checks passed
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