Repository navigation
feat(appproto): put EV charging on the wire, and let the flow hold still - #830
Conversation
…s bucket Two faults found by running the app's live test against a real box. The plan killed the session. The optimizer plans 193 fifteen-minute slots, which encode to ~17 kB; the largest bulk bucket is 16 kB. sendBulk returned an error, and the uplink treats a handler error as a dead session — so asking for the plan hung up the box, every time. The plan is now truncated to the slots that fit, nearest first. The app shows twelve hours; slots two days out are a guess about a guess. History was never built. It now serves the app's tile protocol from the energy ledger: the same geometry, tile ids and FNV-1a etags the app computes — the reference values in the tests were generated by running the app's own functions — so both ends meet on identical tiles and unchanged ones are never resent. Ledger energy becomes mean power per bucket, site signed: import minus export is the grid, generation negated is PV. A bucket nothing metered is MISSING on the wire, never zero, and ranges past retention are named as evicted gaps instead of served as silence. The capability is advertised only when the provider exists, and a box without state answers E_UNAVAILABLE scoped to the request — one chart says "can't right now", the session lives on. Co-Authored-By: Claude Opus 5 <[email protected]>
💡 Codex Reviewhttps://github.com/srcfl/ftw/blob/754f0475d71da3dfae143b7d444bff292c2c3c90/go/internal/appproto/history.go#L231 When a 5m query is narrow enough to stay at 5m but falls outside the 30-day detailed retention, the code records a https://github.com/srcfl/ftw/blob/754f0475d71da3dfae143b7d444bff292c2c3c90/go/internal/appproto/history.go#L199 This validation accepts any non-empty ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Two changes for the FTW app, both small and deliberate.
Field 10:
ev_wThe summed charger draw, positive while charging — a charger consumes like
any other load. Frozen in meaning like fields 1–9, conditional in
presence like
battery_soc: a site without a charger sends nothing, andthe app draws no EV node rather than a dead one holding an invented zero.
Charger drivers join the app's source table, so their freshness is visible
like everyone else's.
TestFrozenFieldIdsAreFrozenfired exactly as designed and was extendeddeliberately, with the date and the reasoning in the test body.
staticon<ftw-energy-flow>The app paints a cached snapshot before it reconnects, and its rule is that
animation is a claim about now — a moving particle says power is flowing
at this moment. The new attribute pauses the CSS animations and never
starts the particle loop, while numbers and colours keep saying what they
said. The box's own dashboard never sets it, so nothing changes there.
The app vendors this component as-is (srcfl/ftw-webapp — "same components,
same views"), which is why the attribute lives upstream rather than in a
fork: one file, two consumers, no drift.
🤖 Generated with Claude Code