Skip to content

fix: FX-34 small leftovers of docs update 10 - #194

Merged
tunjayoff merged 7 commits into
mainfrom
fix/fx-34
Oct 9, 2026
Merged

tunjayoff merged 7 commits into
mainfrom
fix/fx-34

Conversation

@tunjayoff

Copy link
Copy Markdown
Owner

FX-34: small leftovers found by docs update 10 (#193). One commit per topic, each with tests.

  1. Web UI help text for fetch.only_finished (fix(web)). The help text in frontend/src/locales/ui/en.ts and tr.ts no longer names the 2.x /api match lists that P30 removed. It now says that the setting affects the league download, the Overview counts and ssc status. 05-web-ui.md 6.16 and the open list in 03 section 19 are updated.
  2. Player export filter reads the stored match list (fix(export)). ExportService.participant_events first reads the match ids that B2 stores for a player follow (follow_events:player:<id> in store.runtime, follow_sync.listed_events), limited to the other filters' scope. It then adds the matches whose stored line-ups name the player. A followed player's matches now export even when their line-ups were not downloaded. Also changed:
    • the follow_sync.py docstring, which said the list is not stored;
    • the export dialog's note (both languages);
    • ssc export --player help;
    • 02 2.7 and 05 6.10.
  3. Live service docstrings (docs(live)). cli/commands/watch.py and services/live/supervisor.py no longer name the removed --watch flag or the watcher:<sport> watcher.
  4. Sync fallback to leagues.txt (fix(sync)). The design (02 2.7, FX-13) keeps this fallback, so it stays. When the follows table cannot be read (StorageError), the sync still uses ConfigManager.get_leagues() with every season. This used to be a warning; it is now logged as an error that names the cause and the number of leagues used. A context without a store is not an error and stays silent.
  5. services/stats.py (refactor(status)). format_size, its only function with a caller, moved into cli/commands/status.py (ssc status --disk), and the module was deleted. Its dead 2.x adapter (league_counts, disk_usage, system_counts, data_summary) was used only by tests, so it moved into tests/test_status_service.py as test helpers. A test checks that the module is gone, and nothing imports it. 02 1.1 is updated.
  6. ssc export default file names (fix(cli)). Without --out, a file is now named like an export job's file: the label (the league, the single team or player, or the dataset; -wide for the wide CSV), then the UTC date, then the UTC time where a job's file has the job id. Examples: exports/premier-league_2026-10-09_142530.jsonl and match_details/processed/events-wide_2026-10-09_142530.csv. The folders stay the same. The naming is shared through data_jobs.export_subject / local_export_name. write_legacy_csv takes an optional name; without one it keeps the 2.x name. The CLI golden harness now normalises _<date-time>. Goldens regenerated with UPDATE_GOLDENS=1:
    • tests/characterization/fixtures/cli/headless_csv_export.golden.json
    • tests/characterization/fixtures/cli/lease_refused.golden.json
  7. Schedule task options in config show (fix(config)). _task_row now uses the sink options' rule, through a new loader.mask_task_options. The options that a task's run defines in TASK_RUNS (league_id, scope, include_env, older_than) are shown as they are. Every other key keeps its name, and its value is shown as ***. This applies to both ssc config show and the diagnostics bundle. This is the masking concern behind the original finding (fix(redact): host names in the bundle's log tail; sink values in config errors and options [FX-10] #84, plan section 16).

Changelog entry (3.1)

  • Fixed: an export filtered by a player also finds the matches in the player follow's stored match list, not only matches with stored line-ups.
  • Changed: ssc export without --out names its file like a web export, with the league or dataset and the UTC date and time (exports/premier-league_2026-10-09_142530.jsonl), instead of epoch seconds. The wide CSV in match_details/processed/ is now events-wide_<date>_<time>.csv, no longer all_matches_<epoch>.csv.
  • Changed: ssc config show and the diagnostics bundle hide the value of a schedule task option that the task does not define, as they do for sink options.
  • Changed: a sync that cannot read the follows table logs an error (it still downloads the leagues of leagues.txt).
  • Fixed: the web UI help for "Finished matches only in a league download" no longer names the removed /api match lists.
  • Removed: sofascore_scraper/services/stats.py. format_size moved to the ssc status command.

Checks

Run locally, all green:

  • full pytest with STORE_SHADOW_CHECK=1
  • ruff
  • vue-tsc, vitest, eslint
  • npm ci && npm run build

No requests to SofaScore were made.

The help text of fetch.only_finished still named the match lists of the
2.x /api that P30 removed. It now names the league download, the Overview
counts and ssc status, in both languages.
The player filter of an export read the stored line-ups only, so a match
downloaded without line-ups was not found even when the player follow had
listed it. B2 keeps the match ids of a player follow's last list in the
state database (follow_events:player:<id>); the filter now reads those
first and joins them with the line-ups, inside the other filters' scope.
The follow sync docstring no longer says the list is not stored, and the
export dialog's note says where a player's matches come from.
…rings

The docstrings of ssc watch and the live supervisor still named the 2.x
--watch flag and its watcher:<sport> lease, both gone since P30. They now
describe the single live service only.
When the follows table cannot be read the sync still falls back to the
leagues of leagues.txt with every season (02-services.md 2.7), but it
logged that as a warning, so a store error that drops the follows' season
choices and every other follow could pass unnoticed. It is now an error
that names the cause and the number of leagues used instead.
…stats.py

Only format_size of services/stats.py had a caller, ssc status. It now
lives next to that command, and the module with its dead 2.x adapter
(league_counts, disk_usage, system_counts, data_summary) is gone. The
status tests that rebuild the removed 2.x dashboard shapes keep the
adapter as their own helpers.
Without --out, ssc export named a dataset exports/<dataset>_<epoch> and
the wide CSV match_details/processed/all_matches_<epoch>.csv. Both now use
the label and UTC date of an export job's file (the league, the single
team or player, or the dataset; -wide for the wide CSV) with the UTC time
in place of the job id, for example
exports/premier-league_2026-10-09_142530.jsonl. The folders stay.

The CLI golden harness normalises the new date and time; regenerated
goldens: headless_csv_export and lease_refused.
ssc config show and the diagnostics bundle printed a schedule task's
options as they were, so a misspelt or invented key could show a secret
before the scheduler refused it. Like the sink options, the options a
task's run defines (league_id, scope, include_env, older_than) are shown
and every other value is ***; the key stays visible.
@tunjayoff
tunjayoff merged commit d3bfdf5 into main Oct 9, 2026
8 checks passed
@tunjayoff
tunjayoff deleted the fix/fx-34 branch October 9, 2026 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant