diff --git a/scripts/prepare_world_class_submission_kit.py b/scripts/prepare_world_class_submission_kit.py index c1674152..1d0ed4ab 100644 --- a/scripts/prepare_world_class_submission_kit.py +++ b/scripts/prepare_world_class_submission_kit.py @@ -36,7 +36,7 @@ def write_json(path: Path, payload: dict[str, Any]) -> None: 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 has_glob_pattern(value: str) -> bool: diff --git a/scripts/render_world_class_operator_runbook.py b/scripts/render_world_class_operator_runbook.py index de5e111a..c9cb4c33 100644 --- a/scripts/render_world_class_operator_runbook.py +++ b/scripts/render_world_class_operator_runbook.py @@ -24,7 +24,7 @@ def rel_path(path: Path, root: Path) -> 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 by_key(items: list[dict[str, Any]], key_name: str) -> dict[str, dict[str, Any]]: diff --git a/tests/verify_world_class_evidence_intake.py b/tests/verify_world_class_evidence_intake.py index 42728062..a57b9f6e 100644 --- a/tests/verify_world_class_evidence_intake.py +++ b/tests/verify_world_class_evidence_intake.py @@ -232,6 +232,9 @@ def main() -> None: assert "provider-holdout" in kit_html, kit_html assert "Artifact Checklist" in kit_html, kit_html assert "Source Evidence Snapshot" in kit_html, kit_html + assert "
Field
model_executed_count
" in kit_html, kit_html + assert "
Current
0
" in kit_html, kit_html + assert "
Expected
>0
" in kit_html, kit_html assert "World-Class Evidence Submission Kit" in kit_html, kit_html assert "Do not include credentials, raw prompts, raw outputs, transcripts, notes, or private user content." in kit_html, kit_html diff --git a/tests/verify_world_class_operator_runbook.py b/tests/verify_world_class_operator_runbook.py index b9d368b4..c516e433 100644 --- a/tests/verify_world_class_operator_runbook.py +++ b/tests/verify_world_class_operator_runbook.py @@ -149,11 +149,15 @@ def main() -> None: assert "World-Class Operator Runbook" in html, html[:400] assert "ledger and claim guard" in html, html assert "position:sticky" in html, html + assert "Ready0" in html, html + assert "Invalid0" in html, html assert f"Blocked{summary['source_blocked_count']}" in html, html assert "
Blocked
2
" in html, html assert "Next Source Actions" in html, html assert "Source Evidence Snapshot" in html, html assert "model_executed_count" in html, html + assert "model_executed_count: 0 / >0" in html, html + assert "raw_content_allowed: False / false" in html, html assert "