Skip to content

Commit 9a68474

Browse files
Phase B/4: the inaugural CI run's three failures
The first run in this repo's history went red in three places. All three were mine, and none were caught locally because neither lint nor the older-Dash matrix leg had ever run here. LINT (8 findings). Seven unused imports and a blank-line count, almost all orphaned by edits earlier in this same phase — removing the requires_dimll_27 marker left its `from conftest import` behind in one file, collapsing the capability block left run.py one blank line short of E305, and two `import` lines inside a test body outlived the code that used them. flake8 has never run in this repo before, so nothing had swept them. DASH 4.4.0, BOTH BACKENDS. The matrix pins the older Dash explicitly, and tests/test_geo_guardrail.py::test_the_nonce_mask_is_sound failed on it. That test is the CONTROL for every byte-identical assertion in the geo file, and I had written it to assert that two identical requests DIFFER — true on 4.4.1, which stamps a per-request `end_id` nonce, and false on 4.4.0, which does not. A control test coupled to a Dash version fact, failing for a reason that has nothing to do with the guardrail. Rewritten to assert the two properties that actually matter and hold on either version: 1. sound — masking makes two identical requests compare equal; 2. not over-broad — it must NOT equalise two DIFFERENT pages, which is the failure that would make every byte-identical test in the file vacuous. Verified locally on both Dash versions this time, not just the pinned one: dash 4.4.0 flask 597 passed / fastapi 594 passed dash 4.4.1 flask 597 passed / fastapi 594 passed flake8 clean The CD guard worked as designed on that first run: `deploy to render` and `verify the live site` both skipped, so nothing was battered against a host this repo does not own.
1 parent 20a38a8 commit 9a68474

9 files changed

Lines changed: 46 additions & 26 deletions

‎PHASE1-REPORT.md‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,12 @@ subprocess.
296296
`POLICY_STORE_FILE` disk entry — deliberately, since the service does not
297297
exist and inventing its shape now would be guessing.
298298

299-
**Genuinely blocked on the package publishing:**
299+
**Genuinely blocked on the package publishing:** — ***cleared 2026-08-23,
300+
see the Phase B section of [DEVELOPMENT-LOG.md](DEVELOPMENT-LOG.md).*** The
301+
floor moved to `>=2.7.1` (2.7.0 published 17:48Z, the 2.7.1 fast-follow
302+
18:24Z), the capability block is deleted, and the resolution was re-proved
303+
from PyPI in a fresh Python 3.12 venv.
304+
300305

301306
- The `requirements.txt` floor stays `>=2.6.1`. Every 2.7.0 call site is
302307
behind a `LLMS_HAS_27` **capability** probe (not a version compare, so a

‎README.md‎

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ The suite boots `run.py` itself rather than a test app, secretless — the
151151
zero-secret boot is the first invariant, and every fail-closed assertion
152152
depends on it.
153153

154-
Tests that exercise `dash-improve-my-llms` 2.7.0 features carry
155-
`pytestmark = requires_dimll_27` and **skip** on the pinned 2.6.1 floor, so a
156-
clean `pip install -r requirements.txt` gives a green suite rather than a red
157-
one people learn to ignore.
154+
Every test runs unconditionally. The `requires_dimll_27` skip marker was
155+
removed with the floor bump: once `requirements.txt` guarantees the feature,
156+
a skipif that can never fire is a suite quietly overstating its own
157+
coverage.
158158

159159
---
160160

@@ -212,9 +212,17 @@ reconstructed component id.
212212

213213
## Status
214214

215-
`dash-improve-my-llms` **2.7.0** is not on PyPI yet. `requirements.txt` still
216-
floors at `>=2.6.1`, and every 2.7.0 call site is behind a capability probe
217-
(`LLMS_HAS_27` in `run.py`) so the app boots on either.
215+
`dash-improve-my-llms` **2.7.1** is on PyPI and `requirements.txt` floors
216+
there. The `LLMS_HAS_27` capability block that let this app boot on either
217+
release is gone — collapsed to a plain import, which was its stated design
218+
promise.
219+
220+
**Not deployed yet.** There is no Render service, so the live half of
221+
`cd.yml` — the build-match wait and both live batteries — is dormant, gated
222+
on an unset `SITE_URL` repository variable. Setting that variable to the
223+
service's `.onrender.com` URL brings it up at B3; changing it to
224+
`https://llms.2plot.dev` at cutover is the only other edit. See the header of
225+
`.github/workflows/cd.yml`.
218226

219227
| Document | What it carries |
220228
|---|---|

‎run.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ def _rate_ceiling():
239239
return None
240240
return value if value > 0 else None
241241

242+
242243
if DASH_VERSION < (4, 4):
243244
# Fatal only on FastAPI, where it is not a degradation but an outage:
244245
# 4.3.0's ASGI middleware returns before setting the request context, so

‎tests/test_geo_guardrail.py‎

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import pytest
2424

2525

26-
from conftest import BROWSER_ACCEPT, BROWSER_UA, CRAWLER_UA
26+
from conftest import BROWSER_UA, CRAWLER_UA
2727

2828
DENIED = "RU"
2929
ALLOWED = "US"
@@ -114,16 +114,30 @@ def _get(client, path, country=None, **kwargs):
114114
def test_the_nonce_mask_is_sound(client):
115115
"""The control for every byte-identical assertion in this file.
116116
117-
If masking `end_id` were hiding something, two identical requests would
118-
still differ after the mask — and every "byte-identical" test below would
119-
be vacuous.
117+
Two properties, and neither depends on the Dash version. An earlier
118+
version of this test asserted that two identical requests DIFFER — true
119+
on Dash 4.4.1, which stamps a per-request `end_id` nonce, and false on
120+
4.4.0, which does not. That made a control test fail on the matrix leg
121+
pinning the older Dash, for a reason that had nothing to do with geo.
120122
"""
121123
a, b = client.get("/"), client.get("/")
122-
assert a.text != b.text, (
123-
"two identical requests are byte-identical — the nonce mask is now "
124-
"unnecessary and should be deleted rather than left hiding changes"
124+
125+
# 1. Sound: masking makes two identical requests compare equal, whether
126+
# or not this Dash stamps a nonce.
127+
assert _stable(a.text) == _stable(b.text), (
128+
"two identical requests differ even after masking — the byte-"
129+
"identical assertions below cannot mean anything"
130+
)
131+
132+
# 2. Not over-broad: it must NOT equalise genuinely different documents.
133+
# A mask that swallowed real differences would make every
134+
# byte-identical test in this file vacuous, which is the failure worth
135+
# guarding against.
136+
other = client.get("/getting-started")
137+
assert _stable(a.text) != _stable(other.text), (
138+
"the mask equalises two different pages — it is removing more than "
139+
"the nonce"
125140
)
126-
assert _stable(a.text) == _stable(b.text)
127141

128142

129143
@pytest.mark.parametrize("label,path", SURFACES.items(), ids=list(SURFACES))

‎tests/test_operator_panel.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,8 @@ def test_a_denied_country_gets_451_even_with_the_right_token(app_module, client,
360360
)
361361

362362

363-
def test_geo_denies_the_panel_before_the_token_is_even_checked(app_module, client,
364-
no_token):
363+
def test_geo_denies_the_panel_before_the_token_is_even_checked(
364+
app_module, client, no_token):
365365
"""Ordering matters: a 404 here would leak that geo runs after the gate."""
366366
from lib import policy_store
367367

‎tests/test_prerender_idempotency.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
from __future__ import annotations
2626

2727
import json
28-
import os
2928
import subprocess
3029
import sys
3130
import textwrap

‎tests/test_prerender_seo.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
import html as _html
2323
import re
2424

25-
import pytest
26-
2725
from conftest import BROWSER_UA, CRAWLER_UA
2826

2927
PRERENDER_OPEN = '<div id="dimll-prerender"'

‎tests/test_social_card.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,6 @@ def test_the_index_template_is_still_wired_in(app_module):
317317

318318
def test_the_home_hero_is_the_social_card_object():
319319
"""The hero renders from the same constant, not a second copy."""
320-
import runpy
321-
import dash
322-
323320
from lib.constants import OG_IMAGE_URL
324321

325322
source = (REPO_ROOT / "pages" / "home.py").read_text()

‎tests/test_vendor_policy.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
"""
1818
from __future__ import annotations
1919

20-
import re
21-
2220
import pytest
2321

2422

0 commit comments

Comments
 (0)