test(report): lock binding exclusion allowlist literals (BUG-694)
Independent Staging Quality Gate / validate (push) Successful in 9m52s
Independent Staging Quality Gate / publish (push) Successful in 2m6s

Contract-test the D2 exclusion tuples so widening them cannot silently pass. Record the timezonefinder quality-gate gap in BLOCKED.md.
This commit is contained in:
jesse-ux
2026-09-15 10:41:10 +08:00
parent 10b463b9e8
commit 8d56d0ab0b
5 changed files with 95 additions and 2 deletions
@@ -542,6 +542,33 @@ def test_direct_script_and_package_import_are_functionally_equivalent() -> None:
assert module.build_calculation_profile(BIRTH_PAYLOAD) == build_calculation_profile(BIRTH_PAYLOAD)
def test_binding_exclusion_allowlist_is_the_literal_d2_set() -> None:
"""Lock the allowlist so widening it cannot silently go green.
Three classes only (BUG-694). Adding a fourth class, renaming a path, or
dropping one must fail this test until the task book and BUG-694 are
updated. The quality gate imports the same constants, so a lock here is
the only check that fails when the producer set grows.
自引用: ``report_quality_gate``, ``shared_full_report_authority``.
生成时刻: ``generated_at``; ``**.called_at`` / ``**.cache_created_at`` /
``**.cache_expires_at``.
墙钟耗时: ``ai_and_audit.summary.elapsed_seconds`` and ``**.elapsed_seconds``.
"""
assert ALLOWED_BINDING_EXCLUDED_TOP_KEYS == (
"generated_at",
"report_quality_gate",
"shared_full_report_authority",
)
assert ALLOWED_BINDING_EXCLUDED_PATHS == (
"ai_and_audit.summary.elapsed_seconds",
"**.elapsed_seconds",
"**.called_at",
"**.cache_created_at",
"**.cache_expires_at",
)
REQUIRED_DELIVERED_KEYS = (
"full_report_pack",
"chart_identity",