🔗 Част от launch-gate чеклиста #83.
Non-blocking hardening from the 2026-06-26 security re-review of #80 (ydimitrof / lyubomir-bozhinov). None block merge; all are pre-activation (alongside #134/#135). The CSRF→DoW, prose-gate double-encoding, and non-integer-LIMIT items from the same review are already fixed on the branch.
Refs: PR #80 · docs/spec/ai-assistant.md §7 / §9.4.
Non-blocking hardening from the 2026-06-26 security re-review of #80 (ydimitrof / lyubomir-bozhinov). None block merge; all are pre-activation (alongside #134/#135). The CSRF→DoW, prose-gate double-encoding, and non-integer-
LIMITitems from the same review are already fixed on the branch.workers/app.tspassesimport.meta.env.PROD(resolved at build time) to the limiters →rate-limit.tsfailClosed && isProd. A preview/staging artifact built in dev mode hasisProd=false, so the paid-endpoint limiter fails open if a key is ever present there. Fix: derive „prod" from a runtime signal (env var / presence of the prod key). Cross-cutting — affects all limiters.#comment text-model divergence.sql-guard.tsstripCommentsstrips--//* */but not#; the cheap structural guard's text model then differs from the executor's. Non-exploitable today (the AST layer fails closed on the resulting parse), but worth stripping/rejecting#so the layers agree.eop_fetchegress hardening.eop-fetch.ts/tools.ts: addredirect: 'manual'+ a fetch timeout + the request abort signal, and a per-turn call budget foreop_fetch/semantic_search(analogous to the rows-read budget), to bound repeated outbound calls.Refs: PR #80 ·
docs/spec/ai-assistant.md§7 / §9.4.