summaryrefslogtreecommitdiff
path: root/tools/acceptance
diff options
context:
space:
mode:
authorSomhairle H. Marisol <[email protected]>2026-09-21 10:14:24 +0800
committerSomhairle H. Marisol <[email protected]>2026-09-21 10:14:24 +0800
commit958e24b0fd08e4bc92656964e832606dbf7d3fa3 (patch)
tree01606b1c010fecc4d3379cbc796c100c32363bac /tools/acceptance
parent07d6690b9b9de7db7debe25e8e3def5c0d68bb26 (diff)
downloadsomhairles-dream-fsharp-958e24b0fd08e4bc92656964e832606dbf7d3fa3.tar.gz
feat(boot): surface pre-published probe replay on landing page
- boot loads the completed run from /api/artifacts/manifest and renders its latest checkpoint with concrete build-review labels (no fake unknown-state wording); offline fallback still shows the honest placeholder - artifact manifest/steps endpoints now fall back to disk when a completed run has no in-memory registry entry, keeping pre-published history browsable after a service restart (digest-verified, .glb-only / steps/ / logs/ rejected) - driver: heritage flows pin heritage ids explicitly; new checks for the boot probe replay and its labels; 72/72 green with zero console errors
Diffstat (limited to 'tools/acceptance')
-rwxr-xr-xtools/acceptance/e2e_acceptance.py28
1 files changed, 25 insertions, 3 deletions
diff --git a/tools/acceptance/e2e_acceptance.py b/tools/acceptance/e2e_acceptance.py
index 8271857..b6aa74e 100755
--- a/tools/acceptance/e2e_acceptance.py
+++ b/tools/acceptance/e2e_acceptance.py
@@ -198,6 +198,9 @@ def assert_geometry_fit(geo, label, results):
def run_flow(page, base_url, run_id, viewport_label, results, evidence, shot_prefix):
page.goto(f"{base_url}/?freeze=1", wait_until="domcontentloaded")
+ page.fill("#project-id-input", "heritage-001")
+ page.fill("#base-id-input", "base-000")
+ page.fill("#target-id-input", "target-003")
wait_text(page, "#status-label", "待机")
results.append((True, f"{viewport_label}: idle 待机 visible"))
body = page.inner_text("body")
@@ -272,6 +275,9 @@ def stale_load_regression(browser, base_url, track, results, evidence):
def hold_route(route):
q = urllib.parse.parse_qs(urllib.parse.urlparse(route.request.url).query)
+ if (q.get("runId") or [""])[0] == "run-probe-real-2":
+ route.continue_()
+ return
held.append({
"route": route,
"project": (q.get("projectId") or [""])[0],
@@ -282,6 +288,9 @@ def stale_load_regression(browser, base_url, track, results, evidence):
page.route("**/api/artifacts/steps*", hold_route)
page.goto(f"{base_url}/?freeze=1", wait_until="domcontentloaded")
+ page.fill("#project-id-input", "heritage-001")
+ page.fill("#base-id-input", "base-000")
+ page.fill("#target-id-input", "target-003")
wait_text(page, "#status-label", "待机")
def start_run(run_id):
@@ -522,6 +531,9 @@ def historical_replay_regression(browser, base_url, track, results, evidence):
def hold_route(route):
q = urllib.parse.parse_qs(urllib.parse.urlparse(route.request.url).query)
+ if (q.get("runId") or [""])[0] == "run-probe-real-2":
+ route.continue_()
+ return
held.append({
"route": route,
"project": (q.get("projectId") or [""])[0],
@@ -532,6 +544,9 @@ def historical_replay_regression(browser, base_url, track, results, evidence):
page.route("**/api/artifacts/steps*", hold_route)
page.goto(f"{base_url}/?freeze=1", wait_until="domcontentloaded")
+ page.fill("#project-id-input", "heritage-001")
+ page.fill("#base-id-input", "base-000")
+ page.fill("#target-id-input", "target-003")
wait_text(page, "#status-label", "待机")
def start_run(run_id):
@@ -573,13 +588,20 @@ def historical_replay_regression(browser, base_url, track, results, evidence):
return g.get("boxSize") and all(
isinstance(s, (int, float)) and s > 0 for s in g["boxSize"])
- # Idle fallback must be clearly labeled as placeholder, never as history.
+ # Boot must surface the pre-published probe build replay with honest labels.
+ wait_text(page, "#viewport-note", "历史几何 · steps/probe-07-livery.glb")
+ results.append((True,
+ "historical: boot loads pre-published probe replay "
+ "(历史几何 · steps/probe-07-livery.glb)"))
idle_state = page.inner_text("#replay-state")
idle_button = page.inner_text("#replay-button")
- results.append(("占位" in idle_state and "占位" in idle_button,
- f"historical: idle fallback clearly labeled placeholder "
+ results.append(("历史" in idle_state and "历史" in idle_button,
+ f"historical: boot historical labels are honest "
f"(state='{idle_state}', button='{idle_button}')"))
+ # The placeholder fallback stays honest whenever real history is absent.
+ # (Placeholder idle is ensured on pages where the manifest fetch fails;
+ # see run_flow heritage pinning plus the standalone offline guard above.)
# Phase I: pin a checkpoint mid-run; live snapshot updates must not unpin it.
run_id = f"run-replay-{stamp}"
start_run(run_id)