Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ project uses [semantic versioning][semver].
the repository. The desktop app now uses the same mark as its window icon,
built in memory, so the shell entry, the window and the report header finally
agree on what this tool looks like.
- **A file list beside the queue, showing both checksums.** The interface could
say a job was "Verified" but never showed the evidence — the source hash and
the destination's, per file — which was only in the CSV and the PDF. The
selected job's files now sit next to the queue: size, both hashes head:tail
(`3F2A:05D1`, because a prefix cannot distinguish a match from a near-miss),
the full values and every destination path in the tooltip, and a doubled
check mark for a copy that was written *and* read back. That mark depends on
the job's verification mode: a source-only job, whose "verified" never reads
the destination, shows a single check and a summary that says so.
Destinations that
disagree with one another read `mismatch` rather than showing the first and
hiding the rest.
- **A stall is reported instead of looking like a slow link.** A hung network
handle raises nothing — it just stops returning bytes — so nothing could be
retried and the job sat at a stale throughput figure. Source reads are now
Expand Down Expand Up @@ -292,6 +304,17 @@ project uses [semantic versioning][semver].
of the relative path.
- **An uppercase hex digest in a previous ASC MHL generation was recorded as
`failed`.** The comparison is now case-insensitive for hex and exact for C4.
- **The file list no longer implies stronger evidence than the engine
produced.** A cancelled job's summary says "cancelled after 2 of 5 files"
instead of "verified 2 of 2". A full verification whose page cache could not
be evicted (`Job.cache_eviction_failed`) shows one check and says the
read-back could not be confirmed. A checksum of "none" shows `≈` and
"size-checked", not a double check. The destination column is green only for
a verified, read-back, checksummed match; failed destinations show no
checksum; a source-only or unchecked job labels the column "As written";
a source/destination difference reads `mismatch` in red; warnings are
counted in the header with the list in a tooltip; C4 identifiers keep their
case when abbreviated.
- The stalled stage now clears as soon as bytes resume on a slow link, instead
of staying up until the whole 8 MiB chunk has assembled.
- Time spent paused no longer counts toward the stall watchdog, so resuming a
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pip install -e ".[dev]"
`ffmpeg` and `ffprobe` on `PATH` are optional — the suite runs without them.

```sh
pytest # 1400 tests, about 20s
pytest # 1433 tests, about 20s
pytest --fuzz # property tests at 3000 examples each, about 3 min
ruff check src tests
pytest --cov=offloader --cov-report=term-missing
Expand Down
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,30 @@ destination file rather than leaving something that looks complete. A source
that stops delivering bytes reads as `Stalled on …` with the time since the
last one, rather than a throughput figure that has quietly stopped being true.

Beside it, the **file list** for the selected job: every file with its size,
the source checksum and the destination's next to each other, and a doubled
check mark for a copy that was both written and read back (full verification).
A source-only job gets a single check and its summary says "verified in transit
(source only, not read back)": the bytes written matched the source, but the
destination was never re-read. Hashes are shown
head:tail (`3F2A:05D1`) because a prefix alone cannot tell a matching pair from
a near-miss; the full values are in the tooltip, along with every destination
path. Destinations that disagree with each other read `mismatch` — both copies
came from one read, so they cannot legitimately differ. This is the same
evidence the CSV and the PDF carry, in front of the person deciding whether to
reformat the card.

What each mark means: `✓✓` written and read back from the destination and the
checksums matched (the destination column is green only then); `✓` written but
not read back (source-only, or full verification whose cache eviction failed,
so the re-read may have come from memory); `≈` size matched but the algorithm
produced no checksum; `✕` failed, with no destination checksum shown; `⊘`
cancelled; `–` skipped. A source-only or no-verification job labels the column
"As written": that hash is of the bytes handed to the writer, not of the file on
disk. `mismatch` in red means a destination differs from the source or from
another destination. A cancelled job's summary reads "cancelled after 2 of 5
files", and a warning count in the header lists every warning in its tooltip.

Two guards run before anything is queued:

- **Duplicate offload protection.** The source's name and its file listing (names
Expand Down Expand Up @@ -660,13 +684,13 @@ Full verification only when every present destination was hashed.

```sh
pip install -e ".[dev]"
pytest # 1400 tests, ~20s
pytest # 1433 tests, ~20s
pytest --fuzz # same suite, 3000 examples per property (~3 min)
ruff check src tests
pytest --cov=offloader --cov-report=term-missing
```

1400 tests at 88% line coverage. They cover formatting against the reference's
1433 tests at 88% line coverage. They cover formatting against the reference's
exact strings, checksum vectors and streaming equivalence, copy/verify
behaviour including simulated destination corruption, pause/resume/cancel
concurrency, retry discrimination, BRAW container parsing, ffprobe parsing,
Expand Down
Binary file modified docs/images/app-preset-editor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/app-preset-mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/app-simple-mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ select = ["F", "E9", "I", "B", "UP"]
# Qt's model API is defined with QModelIndex() defaults; matching the framework
# signature matters more here than the general rule against call-in-default.
"src/offloader/gui/queue_view.py" = ["B008"]
"src/offloader/gui/file_list.py" = ["B008"]

[tool.ruff.lint.isort]
known-first-party = ["offloader"]
Expand Down
8 changes: 7 additions & 1 deletion src/offloader/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1498,6 +1498,7 @@ def run(source_root: Path, options: OffloadOptions,
scan_errors=scan_errors,
preserve_structure=options.preserve_structure,
selection_relatives=dict(relatives or {}),
scanned_files=len(files),
)
if renamed:
job.warnings.append(renamed)
Expand Down Expand Up @@ -1735,6 +1736,8 @@ def copy_once(_src=source, _partials=partials, _idx=index,
# file is already in place and reported Verified.
evicted = _confirm_source(_src, result.source_checksum,
options.algorithm, control)
if not evicted:
job.cache_eviction_failed = True
if not evicted and not reread_noted:
reread_noted = True
job.warnings.append(
Expand Down Expand Up @@ -1813,7 +1816,10 @@ def copy_once(_src=source, _partials=partials, _idx=index,
counters.job_bytes_total))
# Evict first, or the read-back is served from the page
# cache and verifies our own memory against itself.
if not integrity.evict_from_cache(partial) and not evict_noted:
evicted_ok = integrity.evict_from_cache(partial)
if not evicted_ok:
job.cache_eviction_failed = True
if not evicted_ok and not evict_noted:
evict_noted = True
job.warnings.append(
"could not evict files from the page cache on this "
Expand Down
Loading
Loading