wrolpi/wrolpi
Roland ad0340a420
Some checks are pending
Controller Tests / controller-tests (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run
test: check declared types, not just field names, and fix the three that were wrong
Greptile's point on #592 was right and generalized further than the case it
raised.  The guard compared property names only, so it passed while the published
contract disagreed with the endpoint about what those properties contain.

Three wrong types, all pre-existing, all now caught by a test:

StatusResponse.downloads was `int` while the handler has always sent the download
manager's summary object -- the spec told a generated client to expect a number
where it gets a dict.  It is now DownloadsSummaryResponse, with the six fields
get_summary() actually returns.

StatusResponse.wrol_mode was `str`; wrol_mode_enabled() returns a bool.

SettingsResponse.log_level was `str` while the handler sends a Python logging
integer -- SettingsRequest.log_level already said int, and the frontend converts
it numerically through fromApiLogLevel(). settingsFixture was carrying 'info',
which that function maps to undefined, so every Settings test has rendered a blank
log-level label where production shows "Info".  The fixture now carries 20.  This
came from the same hand-written cypress body as cpu_percent did.

statusFixture's nested downloads was also short a field: daily_limit_reached, one
the API has always sent.  /api/status returns an empty downloads object while the
database is down, which it is for much of the suite, so the endpoint cannot vouch
for its own nested shape -- get_summary() is the authority and is now compared
directly.

The type check runs against both endpoints rather than only the one the review
named; that is how log_level surfaced.  Comparison is limited to properties the
spec gives a type for and the handler actually sent, since a null from an optional
field says nothing about its declared type.

Fixture values are still compared by name only: they are read from JS source
rather than executed, so their types are not reliably available.  Said plainly in
the test rather than left to look like coverage.

1709 pytest, 986 jest, 46 e2e.  One unrelated flake in one backend run (the known
filename-formatting tests under -nauto), clean across two further full runs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-30 17:34:36 -06:00
..
blobs zim: ship a default fallback Zim and honor the configured Zim directory 2026-07-20 19:09:57 -06:00
collections Remove stale Postgres references after SQLite cutover. 2026-07-18 13:28:54 -06:00
files Chunk upsert_directories INSERT to respect SQLite variable limit 2026-07-20 11:13:11 -06:00
scripts zim: address PR review — config race, YAML null, path traversal, pinned build 2026-07-20 19:10:09 -06:00
static/extensions Bump extension to v0.2.4 2026-06-01 19:23:39 -06:00
test test: check declared types, not just field names, and fix the three that were wrong 2026-07-30 17:34:36 -06:00
__init__.py Removing WROLPi admin functionality that is now in Controller. 2025-12-19 18:41:27 -07:00
api_utils.py Reworking how Sanic is run for upgraded Sanic version 2026-01-23 15:29:17 -07:00
captions.py videos: address review — atomic caption write + strict YouTube host gate 2026-07-16 18:51:51 -06:00
cmd.py Single file deno (#478) 2026-06-12 17:07:28 -06:00
common.py Archives: an unpaired-surrogate title must not kill the modeler. 2026-07-13 19:25:30 -06:00
config_api.py Fixing bug where configs could be overwritten with empty configs on first refresh. Fixing bug where configs were displayed as JSON in admin settings. 2026-03-22 12:56:37 -06:00
config_schema.py Backup configs can be restored in the UI. User can choose between Merge or Overwrite, the UI displays a comparison. Configs are compared when user opens the restore modal, configs which won't cause changes are marked. 2026-03-10 20:30:46 -06:00
conftest.py Postgres -> SQLite hard cutover: the database moves into the media directory. 2026-07-12 14:09:37 -06:00
contexts.py Postgres -> SQLite hard cutover: the database moves into the media directory. 2026-07-12 14:09:37 -06:00
dates.py Postgres -> SQLite hard cutover: the database moves into the media directory. 2026-07-12 14:09:37 -06:00
db.py db: address review — confirm WAL was applied; refuse fuseblk mounts 2026-07-22 18:54:30 -06:00
db_bootstrap.py db: address review — confirm WAL was applied; refuse fuseblk mounts 2026-07-22 18:54:30 -06:00
downloader.py downloads: surface daily-limit stall to users 2026-07-29 14:58:37 -06:00
errors.py Showing preview of zip file contents, allowing user to download individual files without full extraction. 2026-03-15 12:58:40 -06:00
events.py Map search added to global search. Preview cards are displayed for all results in new Map tab. 2026-04-13 12:17:08 -06:00
flags.py Postgres -> SQLite hard cutover: the database moves into the media directory. 2026-07-12 14:09:37 -06:00
fts.py Postgres -> SQLite hard cutover: the database moves into the media directory. 2026-07-12 14:09:37 -06:00
lang.py Including Country/Region codes in caption file names. 2024-10-16 18:56:31 -06:00
log_levels.py Reworking and unifying log levels. 2025-12-16 19:20:04 -07:00
logging_extra.py Not throwing error when checking for empty message. 2026-06-28 13:23:42 -06:00
media_path.py FileGroups in Collections can be reorganized in the Collection's directory. 2026-01-31 18:08:41 -07:00
roland@learningselfreliance.com.gpg Updating git signing gpg key. 2024-10-16 18:57:06 -06:00
root_api.py zim: address PR review — config race, YAML null, path traversal, pinned build 2026-07-20 19:10:09 -06:00
schema.py test: check declared types, not just field names, and fix the three that were wrong 2026-07-30 17:34:36 -06:00
schema_ddl.py Postgres -> SQLite hard cutover: the database moves into the media directory. 2026-07-12 14:09:37 -06:00
scrape_downloader.py Migrating FileDownloader. 2026-05-07 15:54:53 -06:00
switches.py Add Docs module for searching and organizing PDFs and EPUBs 2026-03-20 14:17:06 -06:00
tags.py Speed up tags config import for un-modeled files 2026-07-19 16:21:29 -06:00
test_media_path.py Add Docs module for searching and organizing PDFs and EPUBs 2026-03-20 14:17:06 -06:00
upgrade.py upgrade: report git branch via --show-current so a stale release tag can't break upgrades 2026-07-29 16:03:33 -06:00
vars.py Postgres -> SQLite hard cutover: the database moves into the media directory. 2026-07-12 14:09:37 -06:00
version.py upgrade: report git branch via --show-current so a stale release tag can't break upgrades 2026-07-29 16:03:33 -06:00
version.txt Bump version to 0.28.6-beta 2026-07-23 19:58:16 -06:00