Skip to content
Playground(another site)

v0.142.0

Released on 4 July 2026 as v0.142.0, with one increment, v0.142.0. See Upgrading for what to change when you move to it.

VersionHighlights
v0.142.0Request body-size limits for from http services, plus numeric digit separators (emitter + runtime + a grammar/checker/lexer addition; ADRs 0165 & 0166). (1) Body limits (#494). A body-taking route (POST/PUT/PATCH) had no way to bound its request body, so a client could stream an arbitrarily large payload the service read into memory before it could reject it. A service now declares a byte ceiling with a limits { maxBody: <Int> } section in header position (beside cors { }/security { }), overridable per route with a @limit(maxBody: <Int>) handler annotation (the @cache placement, valid only on POST/PUT/PATCH). A capped route rejects a request whose Content-Length exceeds the cap with a synthesised 413 PayloadTooLarge ({ kind: "PayloadTooLarge", details: … }), produced before the body is read and before the by/Bearer auth seam — the “synthesised boundary response” posture of the method-semantics 405 (v0.139). It reuses the existing 413 status, so the closed HttpResult registry (ADR 0126/0143) is unchanged; the 413 is applyCors/applySecurityHeaders-stamped so a cross-origin caller can read it. Precedence is route @limit → service limits → none; with neither, the route has no cap and emits byte-for-byte unchanged output — opt-in (the CORS posture, not the security default-on posture). Enforcement is a Content-Length fast-reject (not a hard guarantee — Content-Length can be absent for a chunked transfer or spoofed — so it pairs with the Workers platform cap; a streamed-read cap is a named follow-on). maxBody is a positive Int byte count (26_214_400 for 25 MiB); a byte Size literal (1.mb) is a named follow-on (the Duration playbook). Diagnostics: bynk.http.limits_not_http, limits_unknown_field, limits_invalid_field, limit_on_bodyless, limit_duplicate, limit_unknown_arg, limit_bad_max_body, bynk.parse.duplicate_limits. (2) Numeric digit separators (ADR 0166). Int and Float literals now admit an _ digit separator between digit groups (1_048_576, 1_000.5) — never leading, trailing, or doubled. The separators are stripped before the value is parsed (purely visual), and the as-written lexeme is preserved so bynkc fmt keeps the author’s grouping (mirroring how Float literals already preserve their lexeme). Motivated by maxBody’s large byte counts, but applies language-wide. bynk-syntax (a limits contextual keyword + @limit/lexer _ separators) + bynk-emit (checker validation, inline Content-Length dispatch in workers_entry.rs) + bynk-fmt + tree-sitter; hover/completion track the new section and annotation (ADR 0156). Closes #494.