Skip to content

refactor(#274): E4 band 3e -- the web server leaves src.ino; #264 is met - #279

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

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

Conversation

@Strycher

@Strycher Strycher commented Sep 7, 2026

Copy link
Copy Markdown
Owner

E4 band 3e, task #274 — the last child of #264, Epic #212. Opened autonomously under the owner's standing grant of 2026-09-07.

What moved

The web server, whole: webServer and wifiConnected published; the WiFi/NTP state, the credential placeholders (#245 — where #99 will put runtime storage) and the upload/serial-stream buffers private; initWiFi, checkWiFi, initWebServer and the 22 handlers — 1,181 lines, the largest unit. It reads every domain through headers and reaches back into src.ino for nothing. src.ino 5,581 → 4,387 lines.

#264's acceptance, measured

  • nm on src.ino.cpp.o defines none of the 35 cut-set variables.
  • python scripts/reference-graph.py on what remains: 3 external-linkage variables, 78 authored functions, 77 of them touching no shared state of the file, cut set 0, largest cluster 1. What is left is screens, setup/loop, buttons and the LVGL glue — band 4's material.

Calls made under the grant — please review

  1. src/fc_version.h now holds FW_VERSION. Both src.ino (boot banner, About screen) and web.cpp (every page) show it; one obvious file is where a bump goes. CLAUDE.md's Versioning pointer follows in this PR.
  2. LVGL_BUF_LINES / LVGL_BUF_SIZE went to display.h: the diagnostics page reports the buffer size, and initLVGL joins the display side in band 4.
  3. The WiFi/NTP flags and credentials are private to web.cpp, not published: nothing outside the unit reads them.

Baseline note

The in-worktree baseline build raced the extraction and compiled post-move code. The before-side artefacts for this proof came from a scratch worktree at main (7bfefa7), whose Flash figure matches the 3d merge exactly.

Proof

scripts/verify_extraction.py PASS; full output in docs/god-object-inventory.md §14:

symbols   592 -> 592: 55 relocated, no linkage change, removed none, added none
deltas    12 symbols, net +16, all attributed; unexplained none
moved     27 functions checked by reference set: every reference kept
sections  .flash.text +28 (inputs +28), .flash.rodata +28 (inputs +60, merged), RAM unchanged
Flash     1,856,634 -> 1,856,690   Both toolchains build. 58 tests pass. Not flashed.

…-3 parent is satisfied

src/web.{h,cpp}: webServer and wifiConnected published; the WiFi/NTP state,
the credential placeholders (#245, #99) and the upload/serial-stream buffers
private; WEB_SERVER_PORT, WIFI_RECONNECT_INTERVAL; initWiFi, checkWiFi,
initWebServer and the 22 handlers -- 1,181 lines, the largest unit. It reads
every domain through headers and reaches back into src.ino for nothing.

src/fc_version.h: FW_VERSION, in one obvious file (the boot banner, the About
screen and every web page show it); CLAUDE.md's pointer follows. display.h
takes LVGL_BUF_LINES/LVGL_BUF_SIZE (the diagnostics page shows the buffer
size; initLVGL joins that side in band 4).

src.ino 5,581 -> 4,387 lines. The acceptance of the band-3 parent task (E4-5), measured: nm on
src.ino.cpp.o defines none of the 35 cut-set variables; the reference graph
of what remains shows 3 external-linkage variables, 78 authored functions,
77 of them touching no shared state of the file, cut set 0, largest cluster 1.

Harness: a constructor-call declaration (WebServer webServer(80);) is a
variable. The in-worktree baseline build raced the extraction and compiled
post-move code; the before-side artefacts came from a scratch worktree at
main, and the record says so.

Verified by scripts/verify_extraction.py, PASS: 592 -> 592 symbols, 55
relocated, no linkage change, 12 size deltas net +16 all attributed, all 27
moved functions checked by reference set, unexplained none. .flash.text +28
(inputs +28), .flash.rodata +28 (inputs +60, merged), RAM unchanged. Flash
1,856,634 -> 1,856,690. Both toolchains build. 58 tests pass. Record:
section 14 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 — 592 -> 592 symbols, 55 relocated, no linkage change, 12 size deltas attributed, all 27 moved functions checked by reference set, unexplained none. Both toolchains build; 58 tests pass. Not flashed.

Set aside for the owner's review, in the PR body: fc_version.h, the LVGL buffer defines in display.h, the private WiFi state, and the baseline note.

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