Repository navigation
Draw trace usage as weather over Fleet City (RFC 0032) - #253
Merged
Merged
Conversation
Each building whose program reported to trace in the last five minutes gets a weather cell: drizzle under 1 a minute, rain from 1, a storm from 60 a minute (FloodGuard's threshold) or any flood-tagged event. Lightning is drawn when a sample carries errors; nothing fills that yet. - gardener/fleetweather.py: reads trace's GET /api/metrics/window with a reader credential (at most once a minute), maps programs to repositories from programs.json in the hub's data directory, classifies cells and draws them on the still. - /api/city gains `weather` (status, sky, one row per cell) when GARDENER_HUB_WEATHER is on; every failure is a clear sky with a reason. - The page: fc_set_weather in fleetcity/main.cpp (two translucent cloud meshes, rain and lightning per frame, picking looks through clouds), a legend row, the card's weather line and a summary count. - city-still draws the same weather, or a --weather-sample file. Off by default. Every name in tests and pictures is synthetic. drafted by Claude on behalf of Daniel Stephenson Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LYNeuo7EcTsfm3BxWEeYgi
Two stills drawn headless from the synthetic fleet and the flood-shaped fixture (tests/weather_fixture.py) were added under docs/images/, with a captioned README section and the command that redraws them. drafted by Claude on behalf of Daniel Stephenson Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LYNeuo7EcTsfm3BxWEeYgi
This was referenced Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Weather over Fleet City (Stephenson-Software RFC 0032): trace usage per building as rain, floods as storms. Off by default.
gardener/fleetweather.py(the RFC's spike, hardened): reads the trace service'sGET /api/metrics/windowwith a reader credential (good for that path only), at most once a minute however many pages are open; maps programs to repositories fromprograms.jsonin the hub's data directory; classifies cells; draws them on the still. Only per-program counts are read: no install id, server or tag./api/citygainsweather(status,window_seconds,sky,cells: [[id, kind, intensity, lightning, per_minute]]) whenGARDENER_HUB_WEATHER=1. Trace down, a refused credential or noprograms.jsongives a clear sky and a reason, never a 500.fc_set_weatherinfleetcity/main.cpp. Rain and storm clouds are two translucent meshes for any fleet size. Rain and lightning are drawn per frame. Rain drops out at quality tier 0 and stands still with reduced motion.fc_picklooks through clouds. Also adds a legend row, a card line and a summary count. Weather shows only while the page is Live.city.{js,wasm}was rebuilt with emsdk 6.0.11.gardener hub city-stilldraws the same weather, or draws a--weather-sample FILEinstead of reading trace (CI'scity-stilljob now renders the flood fixture too).Defaults chosen (RFC 0032 open questions)
floodevent. Full intensity is 600 a minute. The rate usesuses(coalesced reports count as their repeats).errorshook is drawn when a sample carries it and is always 0 from trace.programs.jsonin the hub's data directory, besidecity.json. It is never committed, because it names private repositories.Tests
tests/test_fleetweather.py(new): weather rules, program-map and trace-answer parsing, the read with a stub opener (credential sent, failures are short reasons without it), the once-a-minute cache,/api/cityon, off, down and without a map,--weather-samplevalidation, and the still rendering the flood as one storm (when Strata is available).PYTHONPATH=. python3.11 -m unittest discover -s testsran 1377 tests with Strata's binding set. The run found one failure (USAGE.md was missing the new flag), which was fixed andtest_clire-run (335 tests, OK)./citywas rendered headless (SwiftShader) against a local hub and a stub trace: 1 storm, 19 rain and 10 drizzle drawn. Picking returned the right building for 26/30 weather cells, including the storm; the 4 misses were occluded by taller buildings in front.Enabling (owner)
programs.jsonin the hub's data directory.GARDENER_HUB_WEATHER=1,GARDENER_HUB_TRACE_URL, andGARDENER_HUB_TRACE_READERin the hub's env.None of that is in this PR.
drafted by Claude on behalf of Daniel Stephenson
🤖 Generated with Claude Code
https://claude.ai/code/session_01LYNeuo7EcTsfm3BxWEeYgi