One declaration of the description cap, and a card that explains why it is plain - #25
Merged
Conversation
…it is plain TWO DECLARATIONS OF A BOOT FAILURE. `name .max(80)` and `description .max(300)` were written as literals in `lib/schemas/templates.ts` and again in `manifestEntrySchema` inside `services/templates.ts` — which imports that file and then declared its own numbers anyway. They agreed, and already differed on optionality, with nothing asserting they stayed equal. It matters more here than almost anywhere: the description cap is enforced by the seeder at start-up, so a disagreement does not surface as a validation error on a request — it stops the application booting. `report` reached 328 characters during a redesign and would have done exactly that. Raising one cap and not the other is a one-character change with a deploy-shaped failure behind it. Collapsed rather than asserted, which is the same move as deleting `VIEWPORT_BY_SLUG`: `TEMPLATE_NAME_MAX` and `TEMPLATE_DESCRIPTION_MAX` are exported once and imported by both. `TEMPLATE_DESCRIPTION_TARGET = 285` goes with them, so the headroom rule has a name rather than living only in prose. ONE-PAGER'S CARD NOW SAYS WHAT IT IS. Beside nineteen designed templates, an unexplained plain card reads as the one that failed to load. It is not standing in for anything — it is the only built-in that takes slots at all, which makes it the worked example of a documented capability, demonstrated nowhere else if it went. Its description now says so: the markdown starter, the only built-in that takes slots, and deliberately plain because it is a form to fill rather than a page to rewrite. An unexplained plain thing looks broken. An explained one looks like a choice. Co-Authored-By: CRHQ <noreply@crhq.ai>
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.
Two things, both small.
The description cap was declared twice — literals in
lib/schemas/templates.tsand again inmanifestEntrySchemainservices/templates.ts, which imports that file and then wrote its own numbers. They agreed and already differed on optionality, with nothing asserting they stayed equal. That cap is enforced by the seeder at start-up, so a disagreement stops the app booting rather than failing a request —reporthit 328 during a redesign and would have done exactly that. Collapsed toTEMPLATE_NAME_MAX/TEMPLATE_DESCRIPTION_MAX/TEMPLATE_DESCRIPTION_TARGET, imported by both. Same move as deletingVIEWPORT_BY_SLUG: collapse, don't assert.one-pager's card now says what it is. It is not standing in for a missing template — it is the only built-in that takes slots, i.e. the worked example of a documented capability. Unexplained, it read as the card that failed to load; named, it does work no other card can.