hyperledger-identus / hyperledger-identus/sdk-rust
Factory: permit bounded pretty-printed legacy metric draft migration
- Dominant language
- Rust
- Stars
- 0
- Forks
- 0
- Avg merge
- 39m
- Merged PRs (30d)
- 153
Description
## Problem
The metric retention migration introduced by #306 reads an existing legacy draft through the same 32 KiB bound used for untrusted input. The former writer validated compact JSON and then stored pretty-printed JSON without rechecking its serialized size, so a valid historical draft can exceed the read bound even when its replacement terminal record is safely within the public receipt limit.
This was identified during exact-head review of #307.
## Scope
- Define a separate, bounded compatibility allowance for stored legacy drafts.
- Preserve the stricter input and public-comment bounds.
- Add a regression fixture for a compact-valid but pretty-printed-oversize historical draft.
- Document the migration bound and eventual removal condition.
## Acceptance criteria
- A historical draft produced by the former writer can be migrated when its terminal replacement is within current limits.
- Arbitrarily large or malformed files still fail closed.
- New writes and public receipts retain their current limits.
- Tests cover the boundary and rejection cases.
Related to #306 and follow-up to #307.
Contributor guide
Research direction
Trace the metric retention migration introduced by #306 and compare it with the former writer’s pretty-printed legacy drafts. Add a regression fixture plus boundary and rejection tests for the separate compatibility allowance; done means historical drafts migrate only when their terminal replacement fits current limits, while malformed or oversized files and new writes retain their existing bounds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100