Repository navigation
fix: write vehicle, facility, character and daily aggregates to the right keys - #1024
Open
Maelstromeous wants to merge 1 commit into
Open
Maelstromeous wants to merge 1 commit into
Maelstromeous wants to merge 1 commit into
Conversation
…ight keys - Kills made from a vehicle credit the killer's global vehicle row, not the victim's. - A destroyed vehicle's global row is filed under the victim's vehicle, not the killer's. - Every vehicle aggregate write carries the event type, so a write no longer creates an untagged twin or increments several rows. - Facility captures match on the facility id; a full-object match missed the row whenever facility details changed, and the capture was lost. - Faction combat rows key on the alert's start day and victories on its end day, both in UTC. - The killer's global character row takes its world from the alert. - Battle rank updates write battleRank; they were writing battle_rank, so the rank shown on profiles never changed after first insert. - Outfit Wars matches no longer send bracket messages the API drops. - A capture with outfit id "0" counts as no outfit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Manual steps
Deploy while no alert is running (the early-morning UTC lull is the usual gap). Vehicle filters now include the event type, so an alert that runs across the deploy gets its per-alert vehicle counts split between an old untagged row and a new tagged one. Nothing else is needed: existing rows keep their current values, only new writes change, and a later rebuild from per-alert data corrects the history.
What this does
A drift audit and a plan review found several aggregate writes going to the wrong rows. This fixes the ones that are a key or filter mistake:
character.battle_rank, while every reader usescharacter.battleRank, so a player's rank stayed at whatever it was when first seen.Validation done
tsc --noEmitand ESLint clean. There is no test suite in this repo.🤖 Generated with Claude Code