Skip to content

test: disallow network MaxBlobSize and Piri DefaultMaxPaddedSize drift - #104

Merged
alanshaw merged 3 commits into
mainfrom
ash/test/disallow-network-max-blob-and-piri-default-max-blob-drift
Sep 4, 2026
Merged

test: disallow network MaxBlobSize and Piri DefaultMaxPaddedSize drift#104
alanshaw merged 3 commits into
mainfrom
ash/test/disallow-network-max-blob-and-piri-default-max-blob-drift

Conversation

@alanshaw

@alanshaw alanshaw commented Sep 1, 2026

Copy link
Copy Markdown
Member

Updates assertions to prevent these two constants drifting.

Mentioned by Claude which I agree with:

One thing I'd not do is make piri derive its piece config from libforge — the dependency should point one way: libforge states the network constant, piri's default must satisfy it, and the piri test is the guard.

Depends on:

refs #49

@alanshaw
alanshaw requested review from a team and a lite review from Copilot September 1, 2026 15:46
@alanshaw
alanshaw requested a review from frrist as a code owner September 1, 2026 15:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change is a narrowly-scoped test asserting an important invariant, with a straightforward dependency bump to support it.

Pull request overview

Adds a regression test in the PDP piece sizing package to ensure the network sharding raw-size constant from libforge remains aligned with Piri’s default padded-size ceiling, preventing accidental drift between the two projects.

Changes:

  • Import and assert libforge’s blob.MaxBlobSize pads exactly to piecesize.DefaultMaxPaddedSize, and that MaxBlobSize+1 spills to the next padded level.
  • Bump github.com/fil-forge/libforge to a newer pseudo-version to pick up the constant referenced by the new test.
  • Update go.sum accordingly (including an indirect golang.org/x/exp version change).
File summaries
File Description
pkg/pdp/piecesize/piecesize_test.go Adds a cross-repo drift guard by asserting libforge’s raw sharding cap maps exactly onto Piri’s default padded piece ceiling.
go.mod Updates the libforge dependency (and records an indirect x/exp update).
go.sum Updates module checksums to match the dependency bumps.
Review details
  • Files reviewed: 2/3 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@alanshaw
alanshaw merged commit 506d00a into main Sep 4, 2026
9 checks passed
@alanshaw
alanshaw deleted the ash/test/disallow-network-max-blob-and-piri-default-max-blob-drift branch September 4, 2026 21:29
fil-forge-bot Bot added a commit to fil-forge/infra-nodes that referenced this pull request Sep 4, 2026
Published from fil-forge/piri#104

- Digest: `sha256:3ad70523d939e40da14eace730a633cc5e5e00a7a5d5a2e9136573e6928f5bfc`
- Commit: fil-forge/piri@506d00a
- Publish run: https://github.com/fil-forge/piri/actions/runs/33921348878

Merging rewrites [`nodes/dev/apps/versions.env`](https://github.com/fil-forge/infra-nodes/blob/main/nodes/dev/apps/versions.env) and queues the image. The node picks
it up on its next reconcile pass, waits for a safe proving window and then
restarts the service, so the deploy happens well after this merges.

Co-authored-by: fil-forge-bot[bot] <318653112+fil-forge-bot[bot]@users.noreply.github.com>
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.

3 participants