Repository navigation
Serve archived tracks for the map explorer - #696
Volyarosh94 wants to merge 2 commits into
Conversation
Track archive rows carry the track key, lane, sigma, anomaly flags and node kind, one row group per kind. /api/data/tracks returns a past window's solves under node refs and drops rows with private nodes. /api/data/tracks/availability counts rows per hour from Parquet footers.
This comment has been minimized.
This comment has been minimized.
Skip rows without a real position, time or node count, and take node kind from the handshake. Stamp refs without waiting on the registry, and name contributors by one rule in the live feed and the archive.
This comment has been minimized.
This comment has been minimized.
|
Claude finished @Volyarosh94's task in 2m 24s —— View job Claude's review of PR #696 (re-run after "Harden the tracks archive after review")Todo list:
The new commit,
All six correctness/design findings and the one test-gap note from the prior review are resolved, each backed by a new, specific test (e.g. One small, genuinely new nit from this commit (not blocking):
I was not able to execute Confirmed non-issues
No blocking issues found in this round. |
Based on #683 (Mender mirror), which sits on the rest of the open chain, so merge those first.
What
target_class:track_key,lane,pos_sigma_m,is_anomalous,anomaly_types,node_kind,solve_countandcontributing_node_refs. Old files read with them null. Each flush file holds one row group per node kind, so availability can count per fleet from footers.GET /api/data/tracks?from&to&bbox&fleet: a window of at most 60 minutes (ISO or epoch ms, UTC), an optional bbox (the antimeridian works), fleetrealby default,syntheticorall. Up to 50,000 rows by frame time, withtruncatedpast that. No session needed, like/data.GET /api/data/tracks/availability?from&to&fleet: rows per hour over at most 92 days, from Parquet footers and file names only.TRACKS_CACHE_MAX_BYTES, default 256 MiB).services/node_kind.pyholds the synthetic-id test that the writer and the reader share. It moved fromtcp_handler.py, which imports it back..env.exampleand one staging smoke check.Calls I made
/simstays live-only, though the API still takessyntheticandall. Times are UTC in the API. One year of compacted tracks is the retention target for phase 4.contributing_node_refsisn't in the spec's table. On test and staging a mirrored node's ref only exists while the node is connected, so reading ids back after a restart lost those solves. The refs are now stamped when the solve is published. Today's private set still decides by id on every read. Older rows, and contributors that had no ref then, resolve at read time.node_kindcomes from the node's handshake when the solve is published, the same split the live real-only map uses. Mixed rows show only underfleet=all, and rows from before this change getnode_kindfrom the id prefixes.node_refs.contributor_handle, and the solver reads owner identities from a cache that takes no lock.to, for rows flushed just after midnight.Tested
just checkgreen, new tests fail without their code, and a seeded month (520k rows a day) checked end to end with curl, plus a live fleet run writing the new columns.