3.5 KiB
3.5 KiB
id, title, status, type, team, supporting_teams, roadmap_item, priority
| id | title | status | type | team | supporting_teams | roadmap_item | priority | ||
|---|---|---|---|---|---|---|---|---|---|
| TASK-129 | Parse and materialize player profile MESSAGE blocks | done | backend | Backend Senior |
|
rcon-full-data | medium |
TASK-129 - Parse and materialize player profile MESSAGE blocks
Goal
Extract useful long-term player profile snapshots from RCON AdminLog MESSAGE blocks generated by the server bot.
Background
Observed AdminLog MESSAGE blocks can include profile-like stats such as first seen, sessions, matches played, play time, sanctions, averages, kills, deaths, teamkills, K/D, victims, nemesis and favorite weapons. These are profile snapshots, not authoritative per-match stats.
Constraints
- Do not use profile snapshots as authoritative per-match stats.
- No frontend changes unless adding backend API contract tests requires fixtures.
- Do not reactivate Elo/MMR.
- Do not reintroduce Comunidad Hispana #03.
- Do not store secrets, runtime DB files or
backend/runtime. - Do not expose raw full
MESSAGEcontent through public APIs by default.
Allowed Changes
- backend parser/materialization/storage code for profile snapshots
- backend tests with anonymized examples
- this task file when moving it through the workflow
Implementation Requirements
- Work from a dedicated branch for this task.
- Read first:
AGENTS.mdai/architecture-index.mdai/repo-context.mdai/orchestrator/backend-senior.mdai/orchestrator/database-architect.mdbackend/app/rcon_admin_log_parser.pybackend/app/rcon_admin_log_storage.py- existing AdminLog ingestion/materialization tests
- Add a parser for profile-like
MESSAGEcontent only. - Store extracted snapshots in a table such as
rcon_player_profile_snapshots. - Include fields for target, player id/name, source server time, event timestamp, sessions, matches played, total kills/deaths, teamkills done/received, K/D, favorite weapons JSON, victims JSON, nemesis JSON, averages JSON, sanctions JSON and raw content.
- Deduplicate by
target_key + player_id + source_server_time. - Validate Spanish labels including
bajas,muertes,Víctimas,Némesis,Armas favoritas,PromediosandSanciones.
Validation Commands
python -m compileall backend/apppython -m pytest backend/tests/<new_or_relevant_profile_message_tests>.py
Manual Verification Steps
- Confirm tests use anonymized MESSAGE examples.
- Confirm non-profile
MESSAGEentries are ignored. - Confirm duplicate snapshots are not inserted twice.
- Confirm
/healthstill works. - Confirm
git diff --name-onlymatches the allowed scope.
Git Requirements
- Create a dedicated branch for this task, for example
codex/task-129-profile-message-snapshots. - Run relevant validation before committing.
- Stage only intended files.
- Commit the completed implementation.
- Push the branch to origin.
Outcome
- Added profile MESSAGE parsing for anonymized long-term player snapshot fields.
- Added
rcon_player_profile_snapshotsstorage with idempotent upsert by target, player id and source server time. - Verified non-profile MESSAGE entries are ignored.
- Validation:
python -m compileall backend/apppassed. - Validation blocked:
python -m pytest backend/tests/test_rcon_admin_log_parser.py backend/tests/test_rcon_admin_log_storage.pycould not run becausepytestis not installed in this environment. - Supplemental check: direct Python execution of the new parser/storage checks passed.