Skip to content

Pad the at-cap fixture plausibly; update first-party deps#395

Merged
cplieger merged 1 commit into
mainfrom
fix/at-cap-fixture-and-deps
Jul 26, 2026
Merged

Pad the at-cap fixture plausibly; update first-party deps#395
cplieger merged 1 commit into
mainfrom
fix/at-cap-fixture-and-deps

Conversation

@cplieger

Copy link
Copy Markdown
Owner

Supersedes Renovate #393, which carried the same dep bumps but failed on TestSharedUserTokens_AcceptsResponseExactlyAtCap.

Why it failed

plexapi v1.3.4 gates its plex.tv XML through an xmlx preflight, which bounds each token at 16 KiB for the shared-servers limits. The at-cap boundary test padded its 10 MB body with a single comment, so the preflight refused it — the test failed on the fixture's shape, not on the read cap it exists to pin. A cap-sized XML comment is valid XML but not a plausible plex.tv response, so the preflight is right and the fixture was wrong.

The padding is now split across many comments, each well under the token bound, with block sizing derived from the cap rather than hardcoded so a future cap change cannot silently reintroduce an over-long comment. What the test asserts is unchanged: a body of exactly the cap is read and parsed, because the cap comparison is a strict >. Its over-cap sibling is untouched — it sends raw bytes and trips the read cap before any parsing, so it still pins ResponseTooLargeError.

Deps

atomicfile v2.3.0 → v2.4.0, envx v1.2.2 → v1.3.0, jsonx v1.2.0 → v1.3.0, plexapi v1.3.2 → v1.3.4 (xmlx arrives indirectly).

Testing

go build ./... and golangci-lint run ./... clean; go test ./... green except TestCacheLoadMigrationSaveFailureKeepsLegacy, which fails identically on untouched main in my container because it runs as UID 0 and root bypasses the read-only directory permission the test relies on. CI runs unprivileged, so it passes there.

plexapi v1.3.4 gates its plex.tv XML through an xmlx preflight, which
bounds each token at 16 KiB for the shared-servers limits. The at-cap
boundary test padded its 10 MB body with a SINGLE comment, so the preflight
refused it and the test failed — on the fixture's shape, not on the read
cap it exists to pin.

The padding is now split across many comments, each well under the token
bound, with the block sizing derived from the cap rather than hardcoded so
a future cap change cannot silently reintroduce an over-long comment. What
the test asserts is unchanged: a body of exactly the cap is read and parsed,
because the cap comparison is a strict `>`.

Deps: atomicfile v2.3.0 -> v2.4.0, envx v1.2.2 -> v1.3.0,
jsonx v1.2.0 -> v1.3.0, plexapi v1.3.2 -> v1.3.4 (xmlx arrives indirectly).
@cplieger
cplieger merged commit f2fcff6 into main Jul 26, 2026
20 checks passed
@cplieger
cplieger deleted the fix/at-cap-fixture-and-deps branch July 26, 2026 15:21
@cplieger cplieger mentioned this pull request Jul 26, 2026
1 task
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