@@ -63,8 +63,7 @@ def test_sandbox_section_contains_at_least_two_worked_examples() -> None:
6363 """
6464 fence_count = SANDBOX_DIAGNOSTICS_SECTION .count ("PY" )
6565 assert fence_count >= 4 , (
66- f"expected at least 2 Python heredoc examples (>=4 'PY' fences), "
67- f"found { fence_count } "
66+ f"expected at least 2 Python heredoc examples (>=4 'PY' fences), " f"found { fence_count } "
6867 )
6968
7069
@@ -76,9 +75,9 @@ def test_sandbox_section_references_fft_and_trend_techniques() -> None:
7675 lower = SANDBOX_DIAGNOSTICS_SECTION .lower ()
7776 assert "fft" in lower , "FFT example is missing"
7877 # polyfit / linear regression wording — either form is acceptable.
79- assert any (term in lower for term in ( "polyfit" , "regression" , "slope" )), (
80- "linear-trend / regression example is missing"
81- )
78+ assert any (
79+ term in lower for term in ( "polyfit" , "regression" , "slope" )
80+ ), "linear-trend / regression example is missing"
8281
8382
8483# ---------------------------------------------------------------------------
@@ -91,9 +90,9 @@ def test_sandbox_section_mandates_sandbox_colon_prefix() -> None:
9190 so the numerical evidence lands in the work-order text itself.
9291 Dropping this rule makes the capability indistinguishable from
9392 Messages API token arithmetic in the RCA surface."""
94- assert "Sandbox:" in SANDBOX_DIAGNOSTICS_SECTION , (
95- "the Sandbox: prefix rule for submit_rca.root_cause is missing"
96- )
93+ assert (
94+ "Sandbox:" in SANDBOX_DIAGNOSTICS_SECTION
95+ ), "the Sandbox: prefix rule for submit_rca.root_cause is missing"
9796
9897
9998def test_sandbox_section_has_failure_mode_keyed_rules () -> None :
@@ -109,28 +108,28 @@ def test_sandbox_section_has_failure_mode_keyed_rules() -> None:
109108def test_sandbox_section_mandates_render_sandbox_execution_call () -> None :
110109 """The visible-proof card must be called after bash + before submit_rca.
111110 Without this line the artifact is orphaned."""
112- assert "render_sandbox_execution" in SANDBOX_DIAGNOSTICS_SECTION , (
113- "render_sandbox_execution mandate is missing from the prompt"
114- )
111+ assert (
112+ "render_sandbox_execution" in SANDBOX_DIAGNOSTICS_SECTION
113+ ), "render_sandbox_execution mandate is missing from the prompt"
115114
116115
117116def test_sandbox_section_references_required_regression_metrics () -> None :
118117 """Drift-class rule requires slope / r_squared / eta — all three must
119118 appear so the agent knows the expected Sandbox: line shape."""
120119 for metric in ("slope_per_hour" , "r_squared" , "eta_" ):
121- assert metric in SANDBOX_DIAGNOSTICS_SECTION , (
122- f"drift-class metric { metric !r } is missing from the prompt"
123- )
120+ assert (
121+ metric in SANDBOX_DIAGNOSTICS_SECTION
122+ ), f"drift-class metric { metric !r } is missing from the prompt"
124123
125124
126125def test_sandbox_section_references_correlation_metrics () -> None :
127126 """Coupling-class rule requires rho / n so the agent's output is
128127 parseable in the Sandbox: prefix."""
129128 lower = SANDBOX_DIAGNOSTICS_SECTION .lower ()
130129 assert "rho" in lower , "coupling-class rho metric is missing"
131- assert any (token in lower for token in ( "n_samples" , "n=" )), (
132- "coupling-class sample-count metric is missing"
133- )
130+ assert any (
131+ token in lower for token in ( "n_samples" , "n=" )
132+ ), "coupling-class sample-count metric is missing"
134133
135134
136135# ---------------------------------------------------------------------------
0 commit comments