A Live Hub shows and counts only real Nodes
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend-api-design, testing
Research direction
Start with docs/specs/live-or-replay.md, then trace the /api/state handler, Reading Store snapshot, Node Registry, and MeshedNodes harness named in the issue. Check how the existing Stale window and Hazard trigger work, and run the tests through the API. Done means the acceptance criteria pass, including matching Hub and Sensor state and scripts/check.sh passing.
Written by the indexing model from the issue text.
Description
Parent
#89
What to build
Live readings win. A Hub is a Live Hub while it hears a Community Reading that is not a Simulated Reading from a Registered Node that is not Stale. Every Node judges "live" the same way, in one place, from its Reading Store snapshot and the Node Registry it has heard, so a Sensor's dashboard filters the same Nodes as the Hub's.
/api/state gains live: bool, the dashboard's only signal. While it is true, nodes lists only the Nodes whose latest reading is not simulated, flood_risk reads only their readings, and the Hazard trigger reads only real readings, so no Community Warning or flood email comes from a Simulated Reading on a live map. A Community Warning already issued stays in the Hub's log.
An Unverified Node's real reading does not make a Hub live. A real Node going Stale (the existing Stale window) stops making it live.
Since no Sensor produces a real reading yet, the test harness gains a way to hand-feed a reading that is not simulated, standing in for a Sensor with hardware.
Spec
docs/specs/live-or-replay.md
Acceptance criteria
- A registered, non-Stale, non-simulated reading makes
/api/statereportlive: true - While live,
nodesholds only Nodes whose latest reading is not simulated, andflood_riskcomes from their readings alone - While live, a surging simulated Node raises no Flood Risk, no Community Warning and no flood email
- An Unverified Node's real reading does not make the Hub live
- The Hub stops being live once the last real Node goes Stale, and simulated Nodes show again
- A Sensor's
/api/stateagrees with the Hub's onliveand the Nodes listed - The
MeshedNodesharness can send a non-simulated reading; tests drive Nodes through the API only - Rehearsed locally with hand-fed readings only; no Pi or sensor check claimed
-
scripts/check.shpasses
Blocked by
- None (can start immediately)
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- Avg merge
- 48m
- Merged PRs (30d)
- 52
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from StormShields/Stormshield
-
area: node feature
Difficulty 5/5 Over a week Newbie friendliness 35/100
StormShields/Stormshield#89 · 1 comment ·
Maintainers usually reply within 1 day
-
Region picker in the Sandbox PanelPossibly taken @leonardorofaDV claimed this 4 days ago. Openarea: dashboard feature
Difficulty 4/5 3-5 days Newbie friendliness 39/100
StormShields/Stormshield#47 · 1 assignee ·
Maintainers usually reply within 1 day
-
The Sandbox starts Sensors at the Region's suggested sensor sitesPossibly taken @leonardorofaDV claimed this 5 days ago. Openarea: dashboard feature
Difficulty 4/5 3-5 days Newbie friendliness 38/100
StormShields/Stormshield#46 · 1 assignee ·
Maintainers usually reply within 1 day
-
M6 General sensorsOpenarea: workflow feature
Difficulty 5/5 Over a week Newbie friendliness 25/100
StormShields/Stormshield#27 ·
Maintainers usually reply within 1 day
-
area: workflow feature
Difficulty 5/5 Over a week Newbie friendliness 35/100
StormShields/Stormshield#26 ·
Maintainers usually reply within 1 day
All issues in StormShields/Stormshield
Similar issues
-
area:desktop area:ui bug platform:macos
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
anthropics/claude-code#106183 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
feature:App-Tour feature:Chat ready Web
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
digitalfabrik/integreat-app#4523 · 2 reactions ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Required Lexical field accepts two empty paragraphsPossibly taken @lazerg claimed this today. OpenBug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
payloadcms/payload#19222 ·
Maintainers usually reply within 1 day