Skip to content

Keep the zip's path out of stored source-archive errors - #27

Closed
abrignoni wants to merge 1 commit into
mainfrom
fix/scrub-archive-unavailable-paths
Closed

abrignoni wants to merge 1 commit into
mainfrom
fix/scrub-archive-unavailable-paths

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Keeps the examiner's paths out of the two source archive unavailable messages the pipeline stores, which reach the HTML, CSV and JSON reports.

  • Both sites pass the archive's message through scrub_local_paths with the zip's recorded path and the case folder as known paths. The row's source column already names the zip.
  • The archive messages put the path in a trailing parenthesis, and the scrub drops the empty brackets and the space before a colon that a removed path leaves, so the stored text reads cannot open the source archive: [Errno 2] No such file or directory. The console and the browser still see the path.
  • Tests: a reference-mode run with the zip moved away, and a three-platform shape test through _process_one. All five failed on the previous code.

🤖 Generated with Claude Code

The two "source archive unavailable" messages in the pipeline stored the
ArchiveUnavailable text as raised, and that text names the zip's absolute path,
twice when the OSError inside it names it too. The column reaches the HTML, CSV
and JSON reports. Both sites now pass the text through scrub_local_paths with
the zip's recorded path and the case folder as known paths; the row's source
column already names the zip.

The archive messages put the path in a trailing parenthesis, and the scrub drops
the empty brackets and the space before the punctuation a removed path leaves,
so the stored text reads "source archive unavailable: cannot open the source
archive: [Errno 2] No such file or directory". The console and the browser
still see the path.

Tests: a reference-mode run with the zip moved away, asserting no row's error
names the case folder or the folder the zip was in, and a three-platform shape
test through _process_one. All five failed on the previous code.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@abrignoni

Copy link
Copy Markdown
Owner Author

Superseded by #25, merged as 3c9faa8, which lands the same fix. The scrubber tidy-up and the _process_one shape test from this branch are coming over in a follow-up. Branch left in place.

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