You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A snippet resolves {{clipboard}} once per occurrence, so one saved expansion holding N clipboard
tokens against an M-byte clipboard materializes about N x M bytes, synchronously, on the main actor. SnippetPlaceholder.resolve concatenates in a loop and checks no cancellation, so the step's
one-second backstop cannot stop it: the runner waits for the operation to finish.
Found by the behavioural review pass on #3018 (plan §16g), verified rather than assumed.
What bounds it today, and what does not
SnippetImportLimits.maximumExpansionScalars = 20_000 (SnippetImportContract.swift:67) bounds
the SAVED text of an imported snippet. It does not bound the RESOLVED output.
20,000 scalars fits roughly 1,500 {{clipboard}} tokens. At a 10 MiB clipboard that is about
15 GiB of concatenation.
Release, M4 Pro, median of 30, from docs/feature-requests/issue-3018-artifacts/:
three fired clipboard snippets, 10 MiB clipboard: 7.4 ms
ten substitutions inside one expansion at 10 MiB: about 100 MiB, not measured directly
Reaching the failure needs hundreds of clipboard tokens inside a SINGLE snippet. Nobody writes that
by hand; an import could carry it.
Founder disposition, 2026-09-17
Ship #3018 and file this. Not accepted as a permanent limitation: the decision was to ship the
feature now and design the ceiling separately, because a cap is a new rule with a user-visible
refusal message that needs its own design.
What a fix needs to decide
Where the ceiling sits: resolved bytes per expansion, or per take.
What the user sees when it is hit. Silent truncation is not acceptable; the snippet pasting
nothing is not acceptable either.
Whether resolution moves off the main actor and becomes cancellable, which would let the
existing backstop do its job instead of adding a second mechanism.
A snippet resolves
{{clipboard}}once per occurrence, so one saved expansion holding N clipboardtokens against an M-byte clipboard materializes about N x M bytes, synchronously, on the main actor.
SnippetPlaceholder.resolveconcatenates in a loop and checks no cancellation, so the step'sone-second backstop cannot stop it: the runner waits for the operation to finish.
Found by the behavioural review pass on #3018 (plan §16g), verified rather than assumed.
What bounds it today, and what does not
SnippetImportLimits.maximumExpansionScalars = 20_000(SnippetImportContract.swift:67) boundsthe SAVED text of an imported snippet. It does not bound the RESOLVED output.
{{clipboard}}tokens. At a 10 MiB clipboard that is about15 GiB of concatenation.
What is measured, and how far away it is
Release, M4 Pro, median of 30, from
docs/feature-requests/issue-3018-artifacts/:Reaching the failure needs hundreds of clipboard tokens inside a SINGLE snippet. Nobody writes that
by hand; an import could carry it.
Founder disposition, 2026-09-17
Ship #3018 and file this. Not accepted as a permanent limitation: the decision was to ship the
feature now and design the ceiling separately, because a cap is a new rule with a user-visible
refusal message that needs its own design.
What a fix needs to decide
nothing is not acceptable either.
existing backstop do its job instead of adding a second mechanism.