fix(reply): one step owns every service suffix and the budget they share #473

Merged
coilyco-ops merged 1 commit from coilyco-ops/one-step-owns-every-service-suffix into main 2026-08-13 14:25:44 +00:00 AGit
Member

closes #413 — one assembly step owns every service-authored suffix and the transport budget they share, so neither is budgeted against the other. Full evidence, acceptance mapping and measurements are on the issue. ward exec gate passes end to end.

closes #413 — one assembly step owns every service-authored suffix and the transport budget they share, so neither is budgeted against the other. Full evidence, acceptance mapping and measurements are on the issue. ward exec gate passes end to end.
fix(reply): one step owns every service suffix and the budget they share
All checks were successful
ci / image-build (pull_request) Successful in 22s
ci / test (pull_request) Successful in 37s
ci / publish-echo-image (pull_request) Has been skipped
ci / publish-observed (pull_request) Has been skipped
7217d1fc69
Two independent appends budgeted against each other. The reference block was
appended, the footer was appended inside the remaining room, and the transport
then cut the tail blindly. Both suffixes live in the tail, so at the ceiling
the second silently truncated the first and nothing recorded it.

Quail measured the live boundary end to end: the reference survived to an
answer of 1920 runes and was lost from 1921, because footerBudget was correct
and the send was not. No test sat between the two.

One assembly step now owns the whole reply. The answer yields, and it yields
once for every suffix. The step converges rather than reserving room once,
because suffix length is not monotone in the answer: shortening can remove a
short form a link was resolving, and it can remove a URL whose presence was
suppressing the block, which makes the suffix grow. Each pass re-measures, so
references always resolve against the answer that will actually be sent.

Termination is by construction, since every pass removes at least the overflow
it measured. The explicit pass bound guards a future suffix that grows faster
than the answer shrinks, and a test reaches that bound rather than assuming it
unreachable.

When the answer has yielded everything it has and the suffixes still do not
fit, the least preferred one is dropped whole rather than cut into a
half-rendered receipt. The append order is the preference order, so the link a
member can act on outranks the receipt of what ran. A third suffix is one entry
in that order and does not re-decide the trade.

footerBudget is removed, and the test that asserted on it now asserts on the
assembled string at the send boundary, which is the only place this class of
defect is visible.

One adjacent correction: the reference block was capped at the Discord ceiling
on every transport, so an HTTP reply over 1990 runes silently lost a link to a
ceiling HTTP does not have. An unbounded transport is now unbounded.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Kai Siren <coilysiren@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-gaming/sirens-echo!473
No description provided.