Skip to content

fix(dispute): report oversized archive payload accurately - #765

Closed
dannyward630 wants to merge 1 commit into
trustflow-protocol:mainfrom
dannyward630:fix/issue-756-accurate-archive-size-log
Closed

dannyward630 wants to merge 1 commit into
trustflow-protocol:mainfrom
dannyward630:fix/issue-756-accurate-archive-size-log

Conversation

@dannyward630

Copy link
Copy Markdown

Addresses #756. Assisted by Codex (GPT-6).

Description

Closes #756

The archive service warned that oversized dispute archives were being truncated, but it actually sent the complete JSON payload to the uploader. This change makes the warning accurate and measures the serialized payload in UTF-8 bytes against the 256 KiB recommendation.

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✅ Test update

Component

  • Backend (Node.js API)

Changes Made

  • Replace the misleading truncation warning with a clear message that the full payload is uploaded without truncation.
  • Measure payload size in UTF-8 bytes.
  • Add regression coverage for oversized archives and multibyte UTF-8 payloads.

Testing

Manual Testing

Not performed; this change is covered by focused automated tests.

Automated Testing

  • Unit tests added/updated
  • All tests passing locally

Focused test passed (6 tests): npm test -- --runInBand --globals='{"ts-jest":{"diagnostics":false}}' dispute/arweave-archive.service.spec.ts.
Focused Prettier check passed for both changed files; focused ESLint check passed for the spec file.

The repository build and full test suite currently fail on unrelated existing TypeScript and test errors elsewhere in the codebase. The standard type-checked focused Jest invocation is blocked by an existing src/webhook/webhook.service.ts error (OutboxService.sendWebhook is missing). No diagnostics from the filtered TypeScript run refer to the changed files.

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Additional Notes

The PR is a draft because the repository-wide build and test suite are currently blocked by unrelated errors. I left the remaining self-review and manual testing checkboxes unchecked.

@dannyward630

Copy link
Copy Markdown
Author

Closing this as superseded by merged #773, which now implements and tests the oversized archive handling for #756. Thanks to the contributor and maintainers.

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.

ArweaveArchiveService logs that it truncates oversized dispute archives but never does

1 participant