feat: scoped/unscoped transport-route statistics (#899)#915
Open
efiten wants to merge 17 commits intoKpa-clawbot:masterfrom
Open
feat: scoped/unscoped transport-route statistics (#899)#915efiten wants to merge 17 commits intoKpa-clawbot:masterfrom
efiten wants to merge 17 commits intoKpa-clawbot:masterfrom
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…edback) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…pa-clawbot#899) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…#899) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…clawbot#899) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Register GET /api/scope-stats route with per-window 30s cache; fix COALESCE on SUM in GetScopeStats summary query to handle empty result sets. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…pi-spec 400 message (Kpa-clawbot#899)
…clawbot#899) Add scope_name to transmissionBaseSQL/scanTransmissionRow when the column exists, and render a Scope row in the detail-meta dl for scoped transport packets (matched region = "#name", unmatched = "unknown scope"). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…deploy The backfill processed all historical transport-route rows in a tight loop at startup with no throttling. scope_name is populated at ingest for new packets going forward; historical rows remain NULL. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
8 tasks
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
hashRegionsconfig to the ingestor — region names whose HMAC-SHA256 keys are derived at startup, mirroring the existinghashChannelspattern0000are HMAC-matched against configured region keys; result stored in newscope_namecolumnscope_name_v1adds the column; scope matching runs only on new packetsGET /api/scope-stats?window=endpoint (1h/24h/7d, 30s TTL) returning transport totals, scoped/unscoped counts, per-region breakdown, and time-seriesTest plan
cd cmd/ingestor && go test ./...— coversscope_name_v1migration,loadRegionKeys,matchScope,BuildPacketDatascope matchingcd cmd/server && go test ./...— coversGetScopeStats,handleScopeStatserror paths"hashRegions": ["#yourregion"]to ingestor config, restart, verifyscope_namecolumn gets populatedCloses #899
🤖 Generated with Claude Code