fix(channel): make the instructions fit, and assert that they do #138
No reviewers
Labels
No labels
blocked
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
waiting-on-julian
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jlxq0/matrix-mcp!138
Loading…
Reference in a new issue
No description provided.
Delete branch "instructions-fit"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A live session against the deployed
v0.10.8pod reported its instructions cut off mid-sentence with a[truncated]marker.My number for that release was wrong, and how it went wrong is the lesson. I measured 1964 bytes, then added a sentence to restore
in_reply_to_suspicious=after the drift test caught me dropping it, and reported the pre-edit measurement as the shipped one. A measurement is about the bytes that exist when it runs.The string is trimmed to 1963, served 1998, with fifty bytes of headroom for a server name longer than
kampong.social. No attribute is dropped; the wording is tightened rather than the catalogue shortened.The length assertion is wanted after all
Both existing tests check that something is inside the first 2048 bytes, and both stay green however long the string grows, because the contract sits at the front. Neither can see a tail falling off the end, which is exactly what shipped. Ordering decides what survives a cut; the length decides whether there is a cut at all.
It was argued out of the design for a reason that was right about the contract and wrong about the tail. The bound is stated against a 64-byte server name rather than the current one, since the prefix eats the same budget.
Verified by reproducing the shipped defect
Padding the tail so it overruns by 86 bytes:
That is the demonstration that the two answer different questions, rather than an argument that they do.
Not tagged
The bytes lost today are the tail of an operational caveat, and a rollout costs every director their push stream. This rides with the next release rather than causing one.
Gates: fmt, clippy
-D warnings,298 passed; 0 failed, audit clean, deny ok.