Skip to content

Fix turn-input ingress perf assertion (attachment survival, not position)#128

Merged
SamGalanakis merged 1 commit into
mainfrom
samuel-perf-attachment-assert
Jul 25, 2026
Merged

Fix turn-input ingress perf assertion (attachment survival, not position)#128
SamGalanakis merged 1 commit into
mainfrom
samuel-perf-attachment-assert

Conversation

@SamGalanakis

Copy link
Copy Markdown
Collaborator

The nightly Performance lane has failed since 2026-07-24 with turn-input ingress active claim lost attachment bytes.

Diagnosed: a stale harness assertion, not a product defect — there is no attachment loss. The attachment is present and byte-identical; the assertion checked the wrong position.

FIG-564 rewrote both checks from an order-independent lookup to a positional items.last(), copying the shape from a conformance test where the claim holds exactly one input. The perf harness claims 16–24 inputs and only the first carries an attachment, so it materializes at index 1 of 17 (active) and 17 of 25 (next) — items.last() is a Text. It could never have passed. Verified by running the harness with non-fatal probes: Attachment(Inline { media_type: "image/png", bytes: [1,2,3,0] }).

Both assertions now check that the attachment survives the claim/materialize round trip rather than where it lands.

Impact: the nightly perf lane is the sole enforcement point for scripts/perf_guard_budgets.json, so runtime performance budgets have been ungated since 2026-07-22 (the lane is nightly-only, so it went red two days after the change shipped).

Verified: cargo build -p lash-perf --release, fmt, clippy -D warnings clean.

The turn-input ingress perf measurement asserted the inline attachment was
the last materialized item. A claim aggregates many enqueued inputs and only
the first carries an attachment, so the attachment sits mid-list and the
check could never pass. It has failed every nightly since it was introduced,
leaving the runtime performance budgets ungated.

Assert that the attachment survives the claim/materialize round trip rather
than where it lands.

Release-Notes: Internal: Fixed a turn-input ingress performance assertion that checked attachment position instead of survival, which had left nightly runtime performance budgets ungated.
@SamGalanakis
SamGalanakis force-pushed the samuel-perf-attachment-assert branch from 37d1334 to a5aad9d Compare July 25, 2026 10:54
@SamGalanakis
SamGalanakis merged commit 01217dc into main Jul 25, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant