Repository navigation
Fix manifest description length validation - #775
Merged
Merged
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-019f858d-0126-741b-935c-b8ea04533d17 Co-authored-by: Thomas Honeyman <admin@thomashoneyman.com> Amp-Thread-ID: https://ampcode.com/threads/T-019f858d-0126-741b-935c-b8ea04533d17
thomashoneyman
force-pushed
the
fix-manifest-description-length
branch
from
July 21, 2026 18:47
6282356 to
46e2e57
Compare
Amp-Thread-ID: https://ampcode.com/threads/T-019f858d-0126-741b-935c-b8ea04533d17 Co-authored-by: Thomas Honeyman <admin@thomashoneyman.com>
|
Happy to have enabled you to strengthen Registry and sad to have made extra work for you! thanks! |
f-f
approved these changes
Jul 21, 2026
f-f
left a comment
Member
There was a problem hiding this comment.
The type-level limit is brilliant. Good stuff 🙂
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #773. Manifest descriptions were limited to 300 characters when decoding, but manifests created from
spago.yamlused the description string directly without validating its length. This allowed the registry to publish a manifest that it could write to the registry index but package managers could not decode, making the affected package unavailable to consumers.This PR raises the description limit to 500 characters and introduces a
LimitedStringtype that tracks its maximum length at the type level. Manifest descriptions now useLimitedString 500and are validated when converting fromspago.yamlor legacy manifests, so an invalid description cannot be written to the index. The existing 300-character unpublish reasons use the same type, replacing the previous decode-only limited string codec.