fix: restore historical rcon-first fallback policy

Restore historical RCON-first policy with public scoreboard as fallback only. Keep Elo/MMR paused and server 3 out of default targets.
This commit is contained in:
devRaGonSa
2026-05-19 09:34:15 +02:00
committed by GitHub
parent 2271608836
commit 032aaa9ad5
10 changed files with 252 additions and 34 deletions

View File

@@ -77,19 +77,18 @@ El repositorio ya incluye:
- `docker-compose.yml` - `docker-compose.yml`
- `backend/.env.example` - `backend/.env.example`
Selección de proveedor por entorno hoy: Seleccion de proveedor por entorno hoy:
- desarrollo: - desarrollo:
- `HLL_BACKEND_LIVE_DATA_SOURCE=a2s`
- `HLL_BACKEND_HISTORICAL_DATA_SOURCE=public-scoreboard`
- producción realista en esta fase:
- `HLL_BACKEND_LIVE_DATA_SOURCE=rcon` - `HLL_BACKEND_LIVE_DATA_SOURCE=rcon`
- `HLL_BACKEND_HISTORICAL_DATA_SOURCE=public-scoreboard` - `HLL_BACKEND_HISTORICAL_DATA_SOURCE=rcon`
- produccion realista en esta fase:
- `HLL_BACKEND_LIVE_DATA_SOURCE=rcon`
- `HLL_BACKEND_HISTORICAL_DATA_SOURCE=rcon`
Esto refleja el estado real de la repo: el proveedor RCON ya existe para el Esto refleja la politica operativa actual: RCON es la fuente primaria para
estado live de `/api/servers`, pero el histórico sigue dependiendo del live e historico. El scoreboard publico queda como fallback historico cuando
scoreboard público porque no hay todavía una canalización persistente basada RCON falla, no cubre una operacion concreta o aun no tiene cobertura suficiente.
en eventos/logs RCON.
Modo normal recomendado: Modo normal recomendado:
@@ -160,7 +159,7 @@ Modo live con RCON en Docker Compose:
```powershell ```powershell
$env:HLL_BACKEND_LIVE_DATA_SOURCE='rcon' $env:HLL_BACKEND_LIVE_DATA_SOURCE='rcon'
$env:HLL_BACKEND_HISTORICAL_DATA_SOURCE='public-scoreboard' $env:HLL_BACKEND_HISTORICAL_DATA_SOURCE='rcon'
$env:HLL_BACKEND_RCON_TARGETS='[ $env:HLL_BACKEND_RCON_TARGETS='[
{ {
"name": "Comunidad Hispana #01", "name": "Comunidad Hispana #01",
@@ -181,8 +180,8 @@ Buenas practicas:
- no versionar credenciales reales en `backend/.env.example` - no versionar credenciales reales en `backend/.env.example`
- preferir exportarlas como variables de entorno del host o del secreto del - preferir exportarlas como variables de entorno del host o del secreto del
despliegue despliegue
- mantener `HLL_BACKEND_HISTORICAL_DATA_SOURCE=public-scoreboard` hasta tener - mantener `HLL_BACKEND_HISTORICAL_DATA_SOURCE=rcon` como valor normal y usar
una ingesta historica RCON realmente persistida `public-scoreboard` solo como fallback historico controlado
- no reintroducir Comunidad Hispana #03 en `HLL_BACKEND_RCON_TARGETS` salvo que - no reintroducir Comunidad Hispana #03 en `HLL_BACKEND_RCON_TARGETS` salvo que
una task nueva valide su disponibilidad una task nueva valide su disponibilidad

View File

@@ -70,13 +70,13 @@ Community website repository with a static landing in the current phase and a pl
- The phased source strategy for that provisional block is documented in `docs/current-hll-servers-source-plan.md`. - The phased source strategy for that provisional block is documented in `docs/current-hll-servers-source-plan.md`.
- The ingestion strategy for converting that provisional block into normalized server snapshots is documented in `docs/current-hll-data-ingestion-plan.md`. - The ingestion strategy for converting that provisional block into normalized server snapshots is documented in `docs/current-hll-data-ingestion-plan.md`.
- The logical storage foundation for persisting server snapshots is documented in `docs/stats-database-schema-foundation.md`. - The logical storage foundation for persisting server snapshots is documented in `docs/stats-database-schema-foundation.md`.
- Historical match and player statistics must come from the public CRCON scoreboard JSON layer, not from A2S or the `/games` HTML shell. - Historical ingestion defaults to RCON-first; the public CRCON scoreboard JSON layer is a fallback for operations where RCON fails or lacks coverage, not the normal primary historical source.
- The validated discovery for those historical sources is documented in `docs/historical-crcon-source-discovery.md`. - The validated discovery for those historical sources is documented in `docs/historical-crcon-source-discovery.md`.
- The persisted historical domain model for CRCON matches, players and ingestion runs is documented in `docs/historical-domain-model.md`. - The persisted historical domain model for CRCON matches, players and ingestion runs is documented in `docs/historical-domain-model.md`.
- The V1 monthly MVP scoring proposal for persisted historical player metrics is documented in `docs/monthly-mvp-ranking-scoring-design.md`. - The V1 monthly MVP scoring proposal for persisted historical player metrics is documented in `docs/monthly-mvp-ranking-scoring-design.md`.
- The audited boundary between direct live RCON and future event-driven RCON metrics is documented in `docs/rcon-data-capability-audit.md`. - The audited boundary between direct live RCON and future event-driven RCON metrics is documented in `docs/rcon-data-capability-audit.md`.
- The first V2 player-event foundation now lives in dedicated `player_event_*` backend modules and starts from CRCON match-detail summaries, not from live RCON. - The first V2 player-event foundation now lives in dedicated `player_event_*` backend modules and starts from CRCON match-detail summaries, not from live RCON.
- The default operational deployment is simplified to `backend` + `frontend`; historical workers and RCON historical capture are advanced/manual services. - The default operational deployment is simplified to `backend` + `frontend`; historical workers and RCON historical capture are advanced/manual services.
- Comunidad Hispana #03 is disabled from default RCON targets, while existing historical/Elo code and persisted data remain available for explicit future reintroduction. - Comunidad Hispana #03 is disabled from default RCON targets, while existing historical/Elo code and persisted data remain available for explicit future reintroduction. Elo/MMR remains paused and decoupled from backend startup.
- Frontend data consumption should remain progressive, endpoint by endpoint, with static fallbacks preserved during migration. - Frontend data consumption should remain progressive, endpoint by endpoint, with static fallbacks preserved during migration.
- The frontend integration strategy is documented in `docs/frontend-data-consumption-plan.md`. - The frontend integration strategy is documented in `docs/frontend-data-consumption-plan.md`.

View File

@@ -20,7 +20,8 @@ This repository is in foundation stage. The objective is to grow in a controlled
- AI Platform: integrated to coordinate planning and task execution - AI Platform: integrated to coordinate planning and task execution
- Product goal in current phase: maintain a clean landing and repository structure - Product goal in current phase: maintain a clean landing and repository structure
- Default deployment: `backend` + `frontend`; historical workers are advanced/manual only. - Default deployment: `backend` + `frontend`; historical workers are advanced/manual only.
- Comunidad Hispana #03 is not part of default RCON targets. Historical/Elo code and persisted data are preserved but paused operationally. - Live and historical defaults are RCON-first, with public-scoreboard kept only as historical fallback.
- Comunidad Hispana #03 is not part of default RCON targets. Historical/Elo code and persisted data are preserved, while Elo/MMR remains paused and decoupled from backend startup.
## Repository Areas ## Repository Areas

View File

@@ -0,0 +1,206 @@
---
id: TASK-110
title: Restore historical RCON-first fallback policy
status: pending
type: backend
team: Backend Senior
supporting_teams: ["Arquitecto Python", "PM"]
roadmap_item: foundation
priority: high
---
# TASK-110 - Restore historical RCON-first fallback policy
## Goal
Correct repository defaults and documentation so historical ingestion is RCON-first, with public-scoreboard used only as a fallback when RCON fails.
Keep the simplified deployment posture intact:
- Live data source: `rcon`
- Historical data source: `rcon`
- Historical fallback: `public-scoreboard` when RCON fails
- Elo/MMR: paused and decoupled from backend startup
- Comunidad Hispana #03: removed from default targets
- Comunidad Hispana #01 and #02: active in default RCON targets
## Context
HLL Vietnam recently simplified deployment and removed Comunidad Hispana #03 from default operational targets. The intended historical data policy has now been clarified: historical ingestion must not be disabled, and public-scoreboard must not be the normal primary historical source.
The desired policy is RCON-first historical ingestion with public-scoreboard fallback when RCON fails. Documentation and defaults that currently imply "historical source is public-scoreboard" need to be corrected to "historical source is RCON-first with public-scoreboard fallback."
This task is implementation-ready for branch:
- `fix/historical-rcon-first-fallback-policy`
## Steps
1. Work on branch `fix/historical-rcon-first-fallback-policy`.
2. Inspect the listed files before changing anything.
3. Restore the historical default policy to RCON-first where appropriate:
- `HLL_BACKEND_HISTORICAL_DATA_SOURCE=rcon`
4. Keep public-scoreboard documented and configured only as fallback, not as the normal primary historical source.
5. Ensure `docker-compose.yml` defaults and backend example env files do not include Comunidad Hispana #03.
6. Ensure Comunidad Hispana #01 and #02 remain in default RCON targets.
7. Keep advanced historical workers under the advanced profile if they are already configured that way.
8. Keep Elo/MMR paused and decoupled from backend startup.
9. Do not delete code, migrations, persisted data, or historical ingestion modules.
10. Update documentation and decisions to correct the historical source wording.
11. Do not add real credentials, secrets, passwords, or local `.env` values.
12. Run the required validation before committing.
13. Move this task file to `ai/tasks/done/` only after validation is complete and the outcome is documented.
14. Stage only intended files, commit, and push the branch to origin.
## Files to Read First
- `docker-compose.yml`
- `backend/.env.example`
- `backend/app/config.py`
- `backend/app/data_sources.py`
- `backend/app/historical_runner.py`
- `backend/app/rcon_historical_worker.py`, if present
- `README.md`
- `backend/README.md`
- `docs/decisions.md`
- `ai/repo-context.md`
- `ai/architecture-index.md`
## Expected Files to Modify
- `docker-compose.yml`
- `backend/.env.example`
- `backend/app/config.py`
- `README.md`
- `backend/README.md`
- `docs/decisions.md`
- possibly `ai/repo-context.md`
- possibly `ai/architecture-index.md`
- this task file moved from `ai/tasks/pending/` to `ai/tasks/done/`
If additional files become necessary, explain why in the task outcome and commit message.
## Expected Files Not to Modify
- `frontend/**`
- database migrations
- persisted data
- Elo/MMR algorithm implementation files
- unrelated backend modules
- local `.env`
## Constraints
- Do not reintroduce Comunidad Hispana #03.
- Do not reactivate Elo/MMR.
- Do not delete historical ingestion code.
- Do not delete database migrations or persisted data.
- Do not modify frontend behavior.
- Do not add real secrets, passwords, tokens, or credentials.
- Keep advanced historical workers under the advanced profile if already configured.
- Keep the default Compose services limited to `backend` and `frontend`.
- Keep the change focused on defaults, source policy, and documentation wording.
- Do not modify unrelated files.
- Do not leave completed work only in local; commit and push after validation.
## Validation
Before completing the task, run and document:
- `git status`
- `powershell -ExecutionPolicy Bypass -File scripts/run-integration-tests.ps1`
- `docker compose config --services`
- `docker compose config`
Also confirm and document:
- default services are still only `backend` and `frontend`
- default historical source resolves to `rcon`
- `HLL_BACKEND_RCON_TARGETS` default includes only `comunidad-hispana-01` and `comunidad-hispana-02`
- `comunidad-hispana-03` is not present in default RCON targets
- documentation says public-scoreboard is fallback, not primary, for historical mode
- no frontend files changed
- no database migrations or persisted data changed
- `backend/runtime/` is not created or committed
- `git diff --name-only` matches the expected scope
If integration tests are relevant and `scripts/run-integration-tests.ps1` exists, use it. If a configured test cannot be run, document the exact reason in the outcome.
## Commit And Push Requirements
- Run all validation before committing.
- Run `git status`.
- Stage only intended files.
- Commit with a clear message, for example: `fix: restore historical rcon-first fallback policy`.
- Push the branch to origin.
- Do not leave completed work only in local.
## Outcome
Completed for branch `fix/historical-rcon-first-fallback-policy`.
Validation performed:
- `git status --short --branch`
- `powershell -ExecutionPolicy Bypass -File scripts/run-integration-tests.ps1`
- Passed.
- The script reported no product integration tests are configured for this platform-only scope.
- Backend startup import check passed.
- `docker compose config --services`
- Passed and returned only `backend` and `frontend` for the default profile.
- `docker compose config`
- Passed.
- The local machine had Compose environment overrides, so default policy was confirmed again with an empty env file to avoid local values.
- `docker compose --env-file <empty-temp-file> config --services`
- Returned only `backend` and `frontend`.
- `docker compose --env-file <empty-temp-file> config --format json`
- Confirmed `HLL_BACKEND_HISTORICAL_DATA_SOURCE=rcon`.
- Confirmed default `HLL_BACKEND_RCON_TARGETS` includes only `comunidad-hispana-01` and `comunidad-hispana-02`.
- Confirmed `comunidad-hispana-03` is not present in default RCON targets.
- `python -c "from backend.app.config import DEFAULT_HISTORICAL_DATA_SOURCE; print(DEFAULT_HISTORICAL_DATA_SOURCE)"`
- Returned `rcon`.
- `git diff --name-only`
- Matched the expected backend/defaults/docs scope plus `backend/app/historical_runner.py`.
- `Test-Path backend/runtime`
- Returned `False`.
Final source policy:
- Historical ingestion defaults to RCON-first.
- `public-scoreboard` is fallback only for historical operations where RCON fails, lacks coverage or lacks parity for the requested competitive operation.
- Live data remains `rcon`.
- Elo/MMR remains paused and decoupled from backend startup.
- Comunidad Hispana #03 remains absent from default targets.
- Comunidad Hispana #01 and #02 remain active in default RCON targets.
Changed files:
- `docker-compose.yml`
- `backend/.env.example`
- `backend/app/config.py`
- `backend/app/historical_runner.py`
- `README.md`
- `backend/README.md`
- `docs/decisions.md`
- `ai/repo-context.md`
- `ai/architecture-index.md`
- this task file moved from `ai/tasks/pending/` to `ai/tasks/done/`
Notable decision:
- `backend/app/historical_runner.py` was updated because its default advanced historical scope still included `comunidad-hispana-03`. Leaving that default in code would contradict the task's default-target policy and the updated documentation, even though the worker remains under the advanced Compose profile.
Scope confirmations:
- No frontend files changed.
- No database migrations or persisted data changed.
- No real credentials were added; repository defaults continue to use placeholder RCON passwords.
- `backend/runtime/` was not created or committed.
- No follow-up task is needed for this scope.
- The branch was pushed to origin after validation and commit.
## Change Budget
- Prefer fewer than 5 modified files when feasible.
- Prefer changes under 200 lines when feasible.
- Split follow-up work into a new task if the scope grows beyond defaults, documentation, and source-policy correction.

View File

@@ -4,7 +4,7 @@ HLL_BACKEND_STORAGE_PATH=/app/data/hll_vietnam_dev.sqlite3
HLL_BACKEND_ALLOWED_ORIGINS=http://127.0.0.1:8080,http://localhost:8080 HLL_BACKEND_ALLOWED_ORIGINS=http://127.0.0.1:8080,http://localhost:8080
HLL_BACKEND_REFRESH_INTERVAL_SECONDS=120 HLL_BACKEND_REFRESH_INTERVAL_SECONDS=120
HLL_BACKEND_LIVE_DATA_SOURCE=rcon HLL_BACKEND_LIVE_DATA_SOURCE=rcon
HLL_BACKEND_HISTORICAL_DATA_SOURCE=public-scoreboard HLL_BACKEND_HISTORICAL_DATA_SOURCE=rcon
HLL_BACKEND_RCON_TIMEOUT_SECONDS=20 HLL_BACKEND_RCON_TIMEOUT_SECONDS=20
HLL_BACKEND_RCON_TARGETS=[{"name":"Comunidad Hispana #01","slug":"comunidad-hispana-01","external_server_id":"comunidad-hispana-01","host":"152.114.195.174","port":7779,"password":"replace-me-01","source_name":"community-hispana-rcon","region":"ES","game_port":null,"query_port":null},{"name":"Comunidad Hispana #02","slug":"comunidad-hispana-02","external_server_id":"comunidad-hispana-02","host":"152.114.195.150","port":7879,"password":"replace-me-02","source_name":"community-hispana-rcon","region":"ES","game_port":null,"query_port":null}] HLL_BACKEND_RCON_TARGETS=[{"name":"Comunidad Hispana #01","slug":"comunidad-hispana-01","external_server_id":"comunidad-hispana-01","host":"152.114.195.174","port":7779,"password":"replace-me-01","source_name":"community-hispana-rcon","region":"ES","game_port":null,"query_port":null},{"name":"Comunidad Hispana #02","slug":"comunidad-hispana-02","external_server_id":"comunidad-hispana-02","host":"152.114.195.150","port":7879,"password":"replace-me-02","source_name":"community-hispana-rcon","region":"ES","game_port":null,"query_port":null}]
HLL_HISTORICAL_CRCON_PAGE_SIZE=50 HLL_HISTORICAL_CRCON_PAGE_SIZE=50

View File

@@ -273,12 +273,12 @@ Valores soportados en esta fase:
- `a2s` como fallback legacy o override explicito - `a2s` como fallback legacy o override explicito
- historico: - historico:
- `rcon` como camino primario recomendado para captura y writer path primario - `rcon` como camino primario recomendado para captura y writer path primario
- `public-scoreboard` como fallback legacy o override explicito - `public-scoreboard` como fallback legacy controlado
Defaults actuales: Defaults actuales:
- `HLL_BACKEND_LIVE_DATA_SOURCE=rcon` - `HLL_BACKEND_LIVE_DATA_SOURCE=rcon`
- `HLL_BACKEND_HISTORICAL_DATA_SOURCE=public-scoreboard` - `HLL_BACKEND_HISTORICAL_DATA_SOURCE=rcon`
La seleccion efectiva se resuelve en `app/data_sources.py` y en adapters La seleccion efectiva se resuelve en `app/data_sources.py` y en adapters
dedicados dentro de `app/providers/`: dedicados dentro de `app/providers/`:
@@ -297,7 +297,7 @@ Proveedores operativos en esta fase:
- live `rcon` - live `rcon`
- live `a2s` - live `a2s`
- historico `rcon` solo para read model minimo y captura prospectiva - historico `rcon` solo para read model minimo y captura prospectiva
- historico `public-scoreboard` - historico `public-scoreboard` como fallback para cobertura competitiva sin paridad RCON
Politica funcional actual: Politica funcional actual:
@@ -399,15 +399,15 @@ Runbook operativo minimo:
- modo recomendado por defecto: - modo recomendado por defecto:
- `HLL_BACKEND_LIVE_DATA_SOURCE=rcon` - `HLL_BACKEND_LIVE_DATA_SOURCE=rcon`
- `HLL_BACKEND_HISTORICAL_DATA_SOURCE=public-scoreboard` - `HLL_BACKEND_HISTORICAL_DATA_SOURCE=rcon`
- usar solo `comunidad-hispana-01` y `comunidad-hispana-02` en los targets - usar solo `comunidad-hispana-01` y `comunidad-hispana-02` en los targets
RCON por defecto RCON por defecto
- modo historico/RCON avanzado: - modo historico/RCON avanzado:
- iniciar workers solo de forma explicita - iniciar workers solo de forma explicita
- no reintroducir `comunidad-hispana-03` salvo validacion nueva - no reintroducir `comunidad-hispana-03` salvo validacion nueva
- override legacy completo: - override legacy live/A2S:
- `HLL_BACKEND_LIVE_DATA_SOURCE=a2s` - `HLL_BACKEND_LIVE_DATA_SOURCE=a2s`
- `HLL_BACKEND_HISTORICAL_DATA_SOURCE=public-scoreboard` - `HLL_BACKEND_HISTORICAL_DATA_SOURCE=rcon`
Verificacion minima del proveedor activo: Verificacion minima del proveedor activo:
@@ -422,7 +422,8 @@ Captura historica prospectiva por RCON:
- se ejecuta fuera del request path HTTP - se ejecuta fuera del request path HTTP
- persiste muestras live hacia delante en tablas `rcon_historical_*` - persiste muestras live hacia delante en tablas `rcon_historical_*`
- no sustituye todavia el historico competitivo basado en `public-scoreboard` - usa RCON como camino historico primario y mantiene `public-scoreboard` solo
como fallback para operaciones competitivas que aun no tienen paridad RCON
- no promete backfill retroactivo de matches ya perdidos - no promete backfill retroactivo de matches ya perdidos
Comandos manuales desde `backend/`: Comandos manuales desde `backend/`:
@@ -638,7 +639,7 @@ Ejemplos:
- `backend/data/snapshots/comunidad-hispana-01/server-summary.json` - `backend/data/snapshots/comunidad-hispana-01/server-summary.json`
- `backend/data/snapshots/comunidad-hispana-01/weekly-kills.json` - `backend/data/snapshots/comunidad-hispana-01/weekly-kills.json`
- `backend/data/snapshots/comunidad-hispana-03/recent-matches.json` - `backend/data/snapshots/comunidad-hispana-02/recent-matches.json`
- `backend/data/snapshots/all-servers/weekly-support.json` - `backend/data/snapshots/all-servers/weekly-support.json`
- `backend/data/snapshots/all-servers/monthly-mvp.json` - `backend/data/snapshots/all-servers/monthly-mvp.json`
@@ -1088,7 +1089,7 @@ docker compose exec backend python -m app.historical_runner --interval 1800
Flags utiles: Flags utiles:
- `--server comunidad-hispana-01` para limitar a un servidor - `--server comunidad-hispana-01` para limitar a un servidor
- `--server comunidad-hispana-03` para validar solo el tercer scoreboard historico - `--server comunidad-hispana-02` para validar solo el segundo servidor activo
- `--overlap-hours 48` para releer una ventana reciente mayor sin relanzar bootstrap - `--overlap-hours 48` para releer una ventana reciente mayor sin relanzar bootstrap
- `--max-pages 2` para validacion local acotada - `--max-pages 2` para validacion local acotada
- `--page-size 25` para ajustar paginacion - `--page-size 25` para ajustar paginacion
@@ -1191,7 +1192,7 @@ fallback clasico entra de forma controlada. Por defecto:
periodica de fallback para mantener rankings y snapshots clasicos periodica de fallback para mantener rankings y snapshots clasicos
- refresca cada `900` segundos - refresca cada `900` segundos
- prewarmea en cada ciclo: - prewarmea en cada ciclo:
- `server-summary` para `comunidad-hispana-01`, `comunidad-hispana-02`, `comunidad-hispana-03` y `all-servers` - `server-summary` para `comunidad-hispana-01`, `comunidad-hispana-02` y `all-servers`
- `weekly-leaderboard` de la metrica por defecto `kills` para esos mismos alcances - `weekly-leaderboard` de la metrica por defecto `kills` para esos mismos alcances
- `monthly-leaderboard` de la metrica por defecto `kills` para esos mismos alcances - `monthly-leaderboard` de la metrica por defecto `kills` para esos mismos alcances
- `recent-matches` para esos mismos alcances - `recent-matches` para esos mismos alcances
@@ -1226,7 +1227,6 @@ Sin `--server`, ese runner refresca:
- `comunidad-hispana-01` - `comunidad-hispana-01`
- `comunidad-hispana-02` - `comunidad-hispana-02`
- `comunidad-hispana-03`
Despues de cada fallback clasico correcto, recompone snapshots para los Despues de cada fallback clasico correcto, recompone snapshots para los
servidores afectados y vuelve a alinear el agregado `all-servers`. Si el ciclo servidores afectados y vuelve a alinear el agregado `all-servers`. Si el ciclo
@@ -1251,7 +1251,7 @@ Operativa local minima:
en archivos bajo `backend/data/snapshots/`, por ejemplo: en archivos bajo `backend/data/snapshots/`, por ejemplo:
- `backend/data/snapshots/comunidad-hispana-01/server-summary.json` - `backend/data/snapshots/comunidad-hispana-01/server-summary.json`
- `backend/data/snapshots/comunidad-hispana-02/recent-matches.json` - `backend/data/snapshots/comunidad-hispana-02/recent-matches.json`
- `backend/data/snapshots/comunidad-hispana-03/weekly-kills.json` - `backend/data/snapshots/comunidad-hispana-02/weekly-kills.json`
- `backend/data/snapshots/all-servers/monthly-kills.json` - `backend/data/snapshots/all-servers/monthly-kills.json`
Operativa avanzada con Docker Compose: Operativa avanzada con Docker Compose:
@@ -1536,9 +1536,10 @@ Estado real a fecha de esta fase:
- leaderboards semanales/mensuales, MVP V1/V2 y player-events siguen teniendo - leaderboards semanales/mensuales, MVP V1/V2 y player-events siguen teniendo
fallback a `public-scoreboard` mientras RCON no disponga de señal competitiva fallback a `public-scoreboard` mientras RCON no disponga de señal competitiva
por jugador con paridad suficiente por jugador con paridad suficiente
- Elo/MMR pasa a consumir primero contexto competitivo RCON-backed para - Elo/MMR permanece pausado y desacoplado del arranque del backend; cuando se
cobertura y calidad de match cuando existe, pero sigue necesitando reactive mediante una task explicita, debera respetar el contexto
`public-scoreboard` como suplemento para estadisticas por jugador RCON-backed primario y usar `public-scoreboard` solo como suplemento/fallback
para estadisticas por jugador sin paridad RCON
## Elo/MMR Monthly Ranking ## Elo/MMR Monthly Ranking

View File

@@ -11,7 +11,7 @@ DEFAULT_PORT = 8000
DEFAULT_STORAGE_FILENAME = "hll_vietnam_dev.sqlite3" DEFAULT_STORAGE_FILENAME = "hll_vietnam_dev.sqlite3"
DEFAULT_REFRESH_INTERVAL_SECONDS = 300 DEFAULT_REFRESH_INTERVAL_SECONDS = 300
DEFAULT_LIVE_DATA_SOURCE = "rcon" DEFAULT_LIVE_DATA_SOURCE = "rcon"
DEFAULT_HISTORICAL_DATA_SOURCE = "public-scoreboard" DEFAULT_HISTORICAL_DATA_SOURCE = "rcon"
DEFAULT_RCON_TIMEOUT_SECONDS = 20.0 DEFAULT_RCON_TIMEOUT_SECONDS = 20.0
DEFAULT_HISTORICAL_CRCON_PAGE_SIZE = 50 DEFAULT_HISTORICAL_CRCON_PAGE_SIZE = 50
DEFAULT_HISTORICAL_CRCON_TIMEOUT_SECONDS = 15.0 DEFAULT_HISTORICAL_CRCON_TIMEOUT_SECONDS = 15.0

View File

@@ -32,7 +32,6 @@ HOURLY_INTERVAL_SECONDS = 3600
DEFAULT_HISTORICAL_SERVER_SCOPE = ( DEFAULT_HISTORICAL_SERVER_SCOPE = (
"comunidad-hispana-01", "comunidad-hispana-01",
"comunidad-hispana-02", "comunidad-hispana-02",
"comunidad-hispana-03",
) )

View File

@@ -7,7 +7,7 @@ services:
- ./backend/.env.example - ./backend/.env.example
environment: environment:
HLL_BACKEND_LIVE_DATA_SOURCE: ${HLL_BACKEND_LIVE_DATA_SOURCE:-rcon} HLL_BACKEND_LIVE_DATA_SOURCE: ${HLL_BACKEND_LIVE_DATA_SOURCE:-rcon}
HLL_BACKEND_HISTORICAL_DATA_SOURCE: ${HLL_BACKEND_HISTORICAL_DATA_SOURCE:-public-scoreboard} HLL_BACKEND_HISTORICAL_DATA_SOURCE: ${HLL_BACKEND_HISTORICAL_DATA_SOURCE:-rcon}
HLL_BACKEND_RCON_TIMEOUT_SECONDS: ${HLL_BACKEND_RCON_TIMEOUT_SECONDS:-20} HLL_BACKEND_RCON_TIMEOUT_SECONDS: ${HLL_BACKEND_RCON_TIMEOUT_SECONDS:-20}
HLL_BACKEND_RCON_TARGETS: >- HLL_BACKEND_RCON_TARGETS: >-
${HLL_BACKEND_RCON_TARGETS:-[{"name":"Comunidad Hispana #01","slug":"comunidad-hispana-01","external_server_id":"comunidad-hispana-01","host":"152.114.195.174","port":7779,"password":"replace-me-01","source_name":"community-hispana-rcon","region":"ES","game_port":null,"query_port":null},{"name":"Comunidad Hispana #02","slug":"comunidad-hispana-02","external_server_id":"comunidad-hispana-02","host":"152.114.195.150","port":7879,"password":"replace-me-02","source_name":"community-hispana-rcon","region":"ES","game_port":null,"query_port":null}]} ${HLL_BACKEND_RCON_TARGETS:-[{"name":"Comunidad Hispana #01","slug":"comunidad-hispana-01","external_server_id":"comunidad-hispana-01","host":"152.114.195.174","port":7779,"password":"replace-me-01","source_name":"community-hispana-rcon","region":"ES","game_port":null,"query_port":null},{"name":"Comunidad Hispana #02","slug":"comunidad-hispana-02","external_server_id":"comunidad-hispana-02","host":"152.114.195.150","port":7879,"password":"replace-me-02","source_name":"community-hispana-rcon","region":"ES","game_port":null,"query_port":null}]}

View File

@@ -139,3 +139,15 @@ porque ya no es una fuente operativa vigente. El codigo historico, los datos
persistidos, las migraciones y las piezas Elo/MMR no se eliminan; quedan persistidos, las migraciones y las piezas Elo/MMR no se eliminan; quedan
pausadas operativamente para esta fase y pueden reintroducirse mediante una pausadas operativamente para esta fase y pueden reintroducirse mediante una
task futura si se valida de nuevo la fuente y el coste de mantenimiento. task futura si se valida de nuevo la fuente y el coste de mantenimiento.
## Decision 015: historico RCON-first con fallback publico
La politica por defecto para historico vuelve a ser RCON-first:
`HLL_BACKEND_HISTORICAL_DATA_SOURCE=rcon`. El scoreboard publico de CRCON se
mantiene como fallback controlado cuando RCON falla, no tiene cobertura util o
no soporta todavia una operacion competitiva concreta.
Esta decision no reactiva Elo/MMR dentro del arranque normal del backend. Las
piezas Elo/MMR, migraciones, datos persistidos y modulos historicos se
conservan, pero su operativa compleja sigue pausada y desacoplada salvo task
explicita.