Payload Length Discipline
Account for length limits, truncation and field sizing along the whole path, so a proof never fails silently because the value was cut before it reached where you were watching
Use when: input passes through fields, headers, storage columns or filters with size constraints
Avoid when: the path documents no limits and your values are trivially short
Procedure
- Find documented length limits for every field, header and storage column on the input's path.
- Estimate the effective limit empirically by sending a graduated probe and observing where it cuts.
- Compare your proof's length against the effective limit with margin, not at the boundary.
- If truncation occurs, decide deliberately whether to shorten the proof or to prove the truncation itself.
- Record where the cut happened, since silent truncation can be its own observation worth reporting.
- Re-check limits when a value arrives shortened after an environment or configuration change.
Signals
- The value arrives shorter than sent, which silently breaks exact marker matching.
- The proof sits within a few characters of a documented limit with no margin for encoding expansion.
- Truncation cuts your closing delimiters, leaving unbalanced structure in the destination.
- Limits differ between environments, so a proof that worked in one place fails in another.
Patterns
1. Limit row
field=search documented=256 measured=250 proof-length=89 margin=plenty status=fit
2. Truncation
sent=120-chars arrived=80-chars cut-at=80 encoding-expanded=yes action=shorten-or-prove-truncation
3. Boundary note
proof=248 limit=250 margin=2 verdict=too-close action=shorten-before-executing
Pitfalls
- Discovering the limit when your marker stops matching, then misreading it as a negative result.
- Building at exactly the documented boundary, where encoding expansion pushes the value over.
- Ignoring that truncation can remove your structural closers, changing what the destination parses.
- Treating limits as universal when they vary by field, environment and configuration.
Done when
- Effective limits are measured or documented for every field on the path.
- The proof fits with margin, or truncation is deliberately demonstrated and recorded.
- Any truncation point is documented with where the cut occurred.