Skip to content

Measure the deep member's staged name, not the tmp path in front of it - #227

Merged
abrignoni merged 1 commit into
mainfrom
fix/test-staged-name-length
Sep 28, 2026
Merged

abrignoni merged 1 commit into
mainfrom
fix/test-staged-name-length

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Fixes a test that failed on an unmodified main when pytest's temp folder got long.

  • test_media_is_staged_registered_and_processed_when_staged checked the deep member's full staged path was under 200 characters, which counted pytest's temp prefix.
  • It now checks the path relative to the case's staged folder: three parts (<slug>/<2 hex>/<sha1>.<ext>) and at most 113 characters. is_file() stays.

Passes with a 417-character --basetemp. Fails when staging is patched to keep the member's deep path, or to keep three parts with a long name.

Co-Authored-By: Claude Opus 5.5 [email protected]

🤖 Generated with Claude Code

The staging test checked that the whole staged path of a deeply nested
member was under 200 characters. That length includes pytest's temp
folder, so it failed on an unmodified main once the macOS temp path
reached 200 characters (a four-digit pytest run counter was enough).

The test now takes the path relative to the case's staged folder and
checks it has the documented <slug>/<2 hex>/<sha1>.<ext> shape: three
parts and at most 113 characters (slug 60, 2, 40, extension 9, two
separators). The is_file() check stays.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@abrignoni
abrignoni enabled auto-merge September 28, 2026 04:18
@abrignoni
abrignoni merged commit 5dc0d19 into main Sep 28, 2026
8 checks passed
@abrignoni
abrignoni deleted the fix/test-staged-name-length branch September 28, 2026 04:34
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