Skip to content

K2GO-376 fix(conex-core): drop proot free-space gates on import - #716

Merged
luisguzman-adfa merged 2 commits into
mainfrom
fix/K2GO-376-import-false-507
Nov 1, 2026
Merged

luisguzman-adfa merged 2 commits into
mainfrom
fix/K2GO-376-import-false-507

Conversation

@luisguzman-adfa

@luisguzman-adfa luisguzman-adfa commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Imports returned a false HTTP 507 "insufficient space" on devices with ample free space.

Cause: conex-core ran two free-space checks that both read proot statvfs, which under-reports
the content-volume free space (the router import preflight and safe_extract_tar's disk fallback,
both on /library). Remove both; the app (Android StatFs) is the single source of truth for free
space and gates before import. A genuine ENOSPC during extraction now fails cleanly (the Kolibri
and Calibre adapters catch OSError -> 422).

Also log the previously swallowed per-item import failure in ContentImportService, so the cause
shows in logcat (conex-core does not surface per-item errors).

Tests: conex-core 187 unit tests OK (4 new). Build: app:assembleStandardDebug OK.

Bumps conex_core VERSION to 0.3.1 + CHANGELOG (REST-facing change).

The import ran two free-space checks that both read proot statvfs: the router
preflight (507) and safe_extract_tar's disk fallback. proot under-reports the
content-volume free space, so both false-rejected imports on devices with ample
room. Remove both. The phone app (Android StatFs) is the one source of truth for
free space and gates before import. A real ENOSPC now fails cleanly: the Kolibri
and Calibre adapters catch OSError from extraction and return 422.

Also log swallowed per-item import failures in ContentImportService: the box
does not surface them, so the real cause was invisible.
The import free-space change is REST-facing, so bump conex_core.VERSION and add
the 0.3.1 changelog line (the changelog requires a bump per REST-facing change).
Also drop the stale "core 507 backstop" note in the ImportPreflight javadoc: the
core no longer preflights space; a real shortfall now fails cleanly as 422.
@luisguzman-adfa
luisguzman-adfa merged commit d515e32 into main Nov 1, 2026
3 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the fix/K2GO-376-import-false-507 branch November 1, 2026 01:11
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