fix: preserve falsey values in output review HTML
This commit is contained in:
@@ -239,7 +239,7 @@ def render_markdown(payload: dict[str, Any]) -> str:
|
||||
|
||||
|
||||
def html_text(value: Any) -> str:
|
||||
return html.escape(str(value or ""), quote=True)
|
||||
return html.escape("" if value is None else str(value), quote=True)
|
||||
|
||||
|
||||
def status_label(status: str) -> str:
|
||||
|
||||
@@ -113,6 +113,8 @@ def main() -> None:
|
||||
assert "python3 scripts/yao.py output-review" in kit_md_text, kit_md_text
|
||||
assert "<title>Output Review Kit</title>" in kit_html_text, kit_html_text
|
||||
assert "Reviewer cockpit for output quality decisions" in kit_html_text, kit_html_text
|
||||
assert "<span>Ready</span><strong>0</strong>" in kit_html_text, kit_html_text
|
||||
assert "<span>Invalid</span><strong>0</strong>" in kit_html_text, kit_html_text
|
||||
assert "Variant A" in kit_html_text and "Variant B" in kit_html_text, kit_html_text
|
||||
assert "Decision Template" in kit_html_text, kit_html_text
|
||||
assert_no_answer_key_leak(kit_json_text)
|
||||
|
||||
Reference in New Issue
Block a user