You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2026/08/04 04:42:49 UTC

(skywalking-horizon-ui) 01/01: ci: alarms, entity tabs, the DSL lifecycle, and the admin screens in a browser

This is an automated email from the ASF dual-hosted git repository.

wu-sheng pushed a commit to branch ci/e2e-alarms-admin-tabs
in repository https://gitbox.apache.org/repos/asf/skywalking-horizon-ui.git

commit 5dff00461685dba95deddf7907c42d104ba289f6
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Mon Aug 3 21:42:33 2026 -0700

    ci: alarms, entity tabs, the DSL lifecycle, and the admin screens in a browser
    
    Alarms and the entity tabs fold into `core` for nothing. OAP's bundled alarm
    rules fire against the demo traffic on their own, so no rule is installed and
    the assertion doubles as proof the default alerting pipeline runs — but they
    need a couple of minutes of traffic before they trip, so a readiness gate
    keeps that wait off the browser cases, which would otherwise absorb it by
    retrying the whole project. Instance, endpoint, API-dependency and alarms
    pages get browser journeys; the entity routes get wire assertions including
    one that a HALF identity is refused rather than answered with an empty list,
    since answering it reads as "no endpoints" and sends an operator the wrong way.
    
    The DSL write path becomes a full lifecycle in a new `admin` case: push,
    apply, debug session, capture history, refusal, inactivate, restore. Three
    contracts came out of probing rather than reading, and each is now pinned:
    
      - a debug session needs the rule LIVE, not merely pushed — OAP answers
        rule_not_found until the apply reaches APPLIED
      - restore is TWO steps; revertToBundled on an ACTIVE rule is refused with
        HTTP 409, so a change that silently reverted a live rule would skip the
        operator's soft-pause. The case asserts the status code as well as the
        body, because `curl -f` discards a 4xx body and hid this at first
      - revertToBundled needs a bundled twin on disk, so the lifecycle runs
        against the LAL rule base-compose mounts — which is also the real
        operator flow: override a shipped rule, then restore it
    
    `admin` owns its own stack because it mutates OAP, and a rule pushed or a
    template disabled under `core` would change the backend its neighbours read.
    It is deliberately lighter — no demo app, no agent, no traffic — since neither
    the template store nor the rule loader needs telemetry.
    
    The admin SCREENS now run in a real browser too: DSL catalog, capture history,
    live debugger, overview templates, layer dashboards. Everything asserted over
    the wire says nothing about whether an operator can see it, and these are the
    heaviest pages in the app. Three of the first assertions were wrong about the
    features themselves — capture history is stored in the BROWSER, not on the
    server, so an API-started session can never appear there; the live debugger
    opens as a configuration form, not an editor. They now assert what the pages
    actually do, with the reasoning recorded.
    
    The template assertion also changed shape. "Every row synced" was wrong on a
    healthy system: of 241 rows only 50 are synced and 191 are legitimately
    remote-only (translation overlays with no bundled counterpart). It now names
    the two states that mean breakage — diverged, and bundled-fallback, the one
    live mode exists to make impossible.
    
    Finally, `es` moves to a narrower `ui-smoke` project. Playwright projects are
    shared, so adding alarms coverage to `ui` silently made `es` depend on alarms
    firing — a gate it deliberately does not run. A case failing for something it
    never claimed to cover is the confusing failure this suite is meant to avoid.
    
    Zipkin stays wire-only, recorded in the case matrix: Zipkin services do not
    register into any layer, and the zipkin-trace tab lives under /layer/:key/, so
    reaching it needs a layer template whose trace source is zipkin — fixture
    work, not a spec.
    
    Verified locally, all four cases: core 8, admin 10, es 5, zipkin 2.
---
 .github/workflows/e2e.yaml                       |  38 +++++-
 test/e2e/README.md                               |   8 +-
 test/e2e/cases/admin/docker-compose.yml          |  57 +++++++++
 test/e2e/cases/admin/e2e.yaml                    | 140 +++++++++++++++++++++++
 test/e2e/cases/admin/expected/debug-history.yml  |  19 +++
 test/e2e/cases/admin/expected/debug-started.yml  |  19 +++
 test/e2e/cases/admin/expected/inactivated.yml    |  18 +++
 test/e2e/cases/admin/expected/no-broken-rows.yml |  19 +++
 test/e2e/cases/admin/expected/passed.yml         |  18 +++
 test/e2e/cases/admin/expected/revert-refused.yml |  19 +++
 test/e2e/cases/admin/expected/reverted.yml       |  19 +++
 test/e2e/cases/admin/expected/rule-accepted.yml  |  19 +++
 test/e2e/cases/admin/expected/rule-applied.yml   |  19 +++
 test/e2e/cases/admin/expected/sync-live.yml      |  20 ++++
 test/e2e/cases/core/e2e.yaml                     |  20 +++-
 test/e2e/cases/core/expected/has-alarms.yml      |  18 +++
 test/e2e/cases/es/e2e.yaml                       |   9 +-
 test/e2e/playwright/playwright.config.ts         |  21 ++++
 test/e2e/playwright/specs/admin/pages.spec.ts    | 108 +++++++++++++++++
 test/e2e/playwright/specs/bff/entities.spec.ts   | 114 ++++++++++++++++++
 test/e2e/playwright/specs/ui/entities.spec.ts    |  83 ++++++++++++++
 test/e2e/script/prepare/alarm-count.sh           |  30 +++++
 test/e2e/script/prepare/dsl-lifecycle.sh         |  82 +++++++++++++
 test/e2e/script/prepare/dsl-push.sh              |  55 +++++++++
 24 files changed, 961 insertions(+), 11 deletions(-)

diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml
index 2797899..2a55c05 100644
--- a/.github/workflows/e2e.yaml
+++ b/.github/workflows/e2e.yaml
@@ -59,18 +59,44 @@
 #                                            render unless Horizon seeded the
 #                                            bundle into OAP and read it back.
 #
-#               (DSL management and the live debugger fold into core too: both
-#               OAP modules are on by default and core already exposes the
-#               admin host, so they cost no extra containers.)
+#   admin       —  (mutates OAP)             The WRITE paths: DSL rule           ACTIVE
+#                                            hot-update and ui-management
+#                                            template CRUD. Isolated because
+#                                            they mutate the backend every
+#                                            other case reads — a pushed rule
+#                                            or disabled template under core
+#                                            would surface as an unrelated
+#                                            failure elsewhere. Runs a LIGHTER
+#                                            stack: no demo app, no agent, no
+#                                            traffic, since neither the
+#                                            template store nor the rule
+#                                            loader needs telemetry.
+#                                            Covers BOTH halves: the wire
+#                                            lifecycle (push, apply, debug
+#                                            session, capture history, the
+#                                            409 refusal, inactivate, restore)
+#                                            and the admin SCREENS in a real
+#                                            browser.
+#                                            (Read-only DSL queries stay in
+#                                            core, where they cost nothing.)
 #
 #   zipkin      Zipkin receiver              Zipkin ingestion and query. The     ACTIVE
-#                                            demo app here reports Zipkin
-#                                            spans straight to OAP rather than
+#                                            demo app reports Zipkin spans
+#                                            straight to OAP rather than
 #                                            through a SkyWalking agent, and
 #                                            Horizon reads them over the
 #                                            Zipkin-compatible API, not
 #                                            GraphQL — neither is reachable
 #                                            from core.
+#                                            WIRE-ONLY, no browser coverage:
+#                                            Zipkin-only services do not
+#                                            register into a layer (`serviceCount`
+#                                            stays 0 everywhere), and the
+#                                            zipkin-trace tab lives under
+#                                            /layer/:key/. Reaching it needs a
+#                                            layer template whose trace source
+#                                            is zipkin/both — fixture work, not
+#                                            a spec.
 #   browser     client-js app                Browser Errors tab, source-map     PLANNED
 #                                            de-minification
 #   es          ElasticSearch storage        trace v1 — the ONLY path that       ACTIVE
@@ -128,6 +154,8 @@ jobs:
             config: test/e2e/cases/es/e2e.yaml
           - name: zipkin (receiver + query)
             config: test/e2e/cases/zipkin/e2e.yaml
+          - name: admin (DSL + templates)
+            config: test/e2e/cases/admin/e2e.yaml
     steps:
       - uses: actions/checkout@v6
         with:
diff --git a/test/e2e/README.md b/test/e2e/README.md
index 08547f8..285af73 100644
--- a/test/e2e/README.md
+++ b/test/e2e/README.md
@@ -24,6 +24,10 @@ test/e2e/
     es/                          ElasticSearch storage — the only path that
                                  reaches Horizon's pre-v2 trace query
     zipkin/                      Zipkin receiver + Zipkin query surface
+    admin/                       the WRITE paths — DSL hot-update and
+                                 template CRUD, isolated because they mutate
+                                 the backend other cases read; covers the
+                                 admin screens in a browser too
   playwright/                    the Playwright project: config + specs
 ```
 
@@ -94,7 +98,9 @@ Cases needing **rover / eBPF** cannot run on macOS: eBPF needs a Linux kernel, a
 2. Add expected files under `cases/<name>/expected/`. **Write them before the first run** — a missing expected file is retried for the whole budget and can never succeed, so a typo costs the full retry window rather than failing fast.
 3. Add one entry to the `case:` matrix in `.github/workflows/e2e.yaml`, and a row to the case/feature matrix in its header comment.
 
-If the case needs UI coverage, add specs under `playwright/specs/` and a Playwright project, then call `script/prepare/playwright.sh <project> <url>` from a verify case.
+If the case needs UI coverage, add specs under `playwright/specs/` and call `script/prepare/playwright.sh <project>` from a verify case.
+
+**Playwright projects are shared, so adding a spec to one couples every case that runs it.** A signal-specific spec — alarms, logs, topology — becomes a requirement for each of those cases, and they may not run the readiness gate it depends on. That is why `es` runs `ui-smoke` (shell and layer journeys only) rather than the full `ui` project: its point is the backend, not the feature surface. Either add the matching gate to the case, or give it a narrower project.
 
 ## Writing a spec that will not flake
 
diff --git a/test/e2e/cases/admin/docker-compose.yml b/test/e2e/cases/admin/docker-compose.yml
new file mode 100644
index 0000000..ac2f4b4
--- /dev/null
+++ b/test/e2e/cases/admin/docker-compose.yml
@@ -0,0 +1,57 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# The WRITE surfaces: DSL rule hot-update and ui-management template CRUD.
+#
+# These get their own deployment for one reason — they mutate OAP. A rule
+# pushed or a template disabled under `core` would change the backend every
+# other assertion there is reading, and a half-applied hot-update would
+# surface as an unrelated failure somewhere else in that run.
+#
+# Deliberately LIGHTER than core: no demo app, no agent, no traffic. Neither
+# the template store nor the rule loader needs telemetry, so the case skips
+# the slowest part of the fixture — agent registration and metric aggregation.
+
+services:
+  banyandb:
+    extends:
+      file: ../../script/docker-compose/base-compose.yml
+      service: banyandb
+
+  oap:
+    extends:
+      file: ../../script/docker-compose/base-compose.yml
+      service: oap
+    ports:
+      - 12800
+      - 17128
+    depends_on:
+      banyandb:
+        condition: service_healthy
+
+  horizon:
+    extends:
+      file: ../../script/docker-compose/base-compose.yml
+      service: horizon
+    ports:
+      - 8081
+    depends_on:
+      oap:
+        condition: service_healthy
+
+networks:
+  e2e:
diff --git a/test/e2e/cases/admin/e2e.yaml b/test/e2e/cases/admin/e2e.yaml
new file mode 100644
index 0000000..8208c6c
--- /dev/null
+++ b/test/e2e/cases/admin/e2e.yaml
@@ -0,0 +1,140 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# DSL hot-update and template management — the two write paths, isolated so
+# their mutations cannot reach another case's assertions.
+#
+# Run it:  e2e run -c test/e2e/cases/admin/e2e.yaml
+# Images:  make -C test/e2e images
+
+setup:
+  env: compose
+  file: docker-compose.yml
+  timeout: 30m
+  init-system-environment: ../../script/env
+  steps:
+    - name: set PATH
+      command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH
+    - name: install yq
+      command: bash test/e2e/script/prepare/install.sh yq
+
+# No trigger: neither the template store nor the rule loader needs telemetry.
+
+verify:
+  retry:
+    count: 40
+    interval: 5s
+  cases:
+    # 1. templates.mode live is working end to end: Horizon seeded the bundle
+    #    into OAP's store at boot and is reading it back. `unreachable` true
+    #    would mean the admin host never answered — the state the product
+    #    deliberately blocks on rather than falling back to the disk bundle.
+    - query: |
+        bash test/e2e/script/prepare/horizon-get.sh \
+          "http://${horizon_host}:${horizon_8081}" /api/admin/templates/sync-status \
+          | yq -P '{"mode": .mode, "unreachable": .unreachable, "hasRows": (.rows | length > 0)}'
+      expected: expected/sync-live.yml
+
+    # 2. No row is in a BROKEN state. Not "everything is synced" — most rows
+    #    are legitimately `remote-only` (translation overlays OAP holds with no
+    #    bundled counterpart) and `disabled` is an admin choice. The two that
+    #    mean something went wrong are:
+    #      diverged         — both sides present but not byte-equal, i.e. the
+    #                         push half-completed
+    #      bundled-fallback — bundled present, remote ABSENT, i.e. seeding
+    #                         never happened. That is the state live mode is
+    #                         supposed to make impossible, so it is worth
+    #                         naming rather than folding into a count.
+    - query: |
+        bash test/e2e/script/prepare/horizon-get.sh \
+          "http://${horizon_host}:${horizon_8081}" /api/admin/templates/sync-status \
+          | yq -P '{"broken": [.rows[] | select(.status == "diverged" or .status == "bundled-fallback" or .status == "unknown")] | length, "anySynced": ([.rows[] | select(.status == "synced")] | length > 0)}'
+      expected: expected/no-broken-rows.yml
+
+    # 3. A rule hot-update is ACCEPTED. OAP answers 200 with an applyId rather
+    #    than 202, and only a structural add/update is tracked at all — so
+    #    this asserts the accepted status, not a transport code.
+    - query: |
+        bash test/e2e/script/prepare/dsl-push.sh \
+          "http://${horizon_host}:${horizon_8081}" lal horizon-e2e \
+          | yq -P '{"applyStatus": .applyStatus, "hasApplyId": (.applyId != null and .applyId != "")}'
+      expected: expected/rule-accepted.yml
+
+    # 4. …and REACHES the applied phase. Acceptance only means the structural
+    #    change was taken; the phase machine is what says it actually landed,
+    #    and the retry budget covers schema propagation.
+    - query: |
+        bash test/e2e/script/prepare/horizon-get.sh \
+          "http://${horizon_host}:${horizon_8081}" "/api/rule/status?catalog=lal&name=horizon-e2e" \
+          | yq -P '{"found": .found, "phase": .phase}'
+      expected: expected/rule-applied.yml
+
+    # 5. A DEBUG SESSION needs the rule LIVE, not merely pushed. OAP answers
+    #    rule_not_found until the apply reaches APPLIED, which is why this
+    #    follows the phase gate above rather than the push.
+    - query: |
+        bash test/e2e/script/prepare/dsl-lifecycle.sh \
+          "http://${horizon_host}:${horizon_8081}" debug-start \
+          | yq -P '{"hasSession": (.sessionId != null and .sessionId != ""), "localInstalled": .localInstalled}'
+      expected: expected/debug-started.yml
+
+    # 6. …and it appears in the capture HISTORY, which is what the Capture
+    #    history page reads.
+    - query: |
+        bash test/e2e/script/prepare/dsl-lifecycle.sh \
+          "http://${horizon_host}:${horizon_8081}" sessions \
+          | yq -P '{"hasSessions": (.sessions | length > 0), "countMatches": (.count == (.sessions | length))}'
+      expected: expected/debug-history.yml
+
+    # 7. RESTORE is a two-step flow, and this is the half that is easy to get
+    #    wrong: revertToBundled on an ACTIVE rule is REFUSED. Asserting the
+    #    refusal pins the contract — a future change that silently reverted a
+    #    live rule would skip the operator's soft-pause entirely.
+    - query: |
+        bash test/e2e/script/prepare/dsl-lifecycle.sh \
+          "http://${horizon_host}:${horizon_8081}" revert-active \
+          | yq -P '{"httpCode": .httpCode, "applyStatus": .applyStatus}'
+      expected: expected/revert-refused.yml
+
+    # 8. Inactivate: the soft pause. Synchronous — no schema change, so no
+    #    applyId and nothing to poll.
+    - query: |
+        bash test/e2e/script/prepare/dsl-lifecycle.sh \
+          "http://${horizon_host}:${horizon_8081}" inactivate \
+          | yq -P '{"applyStatus": .applyStatus}'
+      expected: expected/inactivated.yml
+
+    # 9. …and only now does the bundled rule come back. The rule under test is
+    #    the LAL rule base-compose mounts, chosen because it HAS a disk twin —
+    #    revertToBundled answers no_bundled_twin for anything pushed ad-hoc,
+    #    so an invented name cannot test restore at all.
+    - query: |
+        bash test/e2e/script/prepare/dsl-lifecycle.sh \
+          "http://${horizon_host}:${horizon_8081}" revert \
+          | yq -P '{"applyStatus": .applyStatus, "hasApplyId": (.applyId != null and .applyId != "")}'
+      expected: expected/reverted.yml
+
+    # 10. The admin SCREENS, in a real browser — last, so they render the
+    #     state the wire cases above established. Everything asserted over the
+    #     wire says nothing about whether an operator can see it, and these are
+    #     among the heaviest pages in the app.
+    - query: |
+        bash test/e2e/script/prepare/playwright.sh admin
+      expected: expected/passed.yml
+
+cleanup:
+  on: always
diff --git a/test/e2e/cases/admin/expected/debug-history.yml b/test/e2e/cases/admin/expected/debug-history.yml
new file mode 100644
index 0000000..366c318
--- /dev/null
+++ b/test/e2e/cases/admin/expected/debug-history.yml
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+hasSessions: true
+countMatches: true
diff --git a/test/e2e/cases/admin/expected/debug-started.yml b/test/e2e/cases/admin/expected/debug-started.yml
new file mode 100644
index 0000000..76d1b3b
--- /dev/null
+++ b/test/e2e/cases/admin/expected/debug-started.yml
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+hasSession: true
+localInstalled: true
diff --git a/test/e2e/cases/admin/expected/inactivated.yml b/test/e2e/cases/admin/expected/inactivated.yml
new file mode 100644
index 0000000..c16df62
--- /dev/null
+++ b/test/e2e/cases/admin/expected/inactivated.yml
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+applyStatus: inactivated
diff --git a/test/e2e/cases/admin/expected/no-broken-rows.yml b/test/e2e/cases/admin/expected/no-broken-rows.yml
new file mode 100644
index 0000000..5c231f5
--- /dev/null
+++ b/test/e2e/cases/admin/expected/no-broken-rows.yml
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+broken: 0
+anySynced: true
diff --git a/test/e2e/cases/admin/expected/passed.yml b/test/e2e/cases/admin/expected/passed.yml
new file mode 100644
index 0000000..d23d763
--- /dev/null
+++ b/test/e2e/cases/admin/expected/passed.yml
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+passed: true
diff --git a/test/e2e/cases/admin/expected/revert-refused.yml b/test/e2e/cases/admin/expected/revert-refused.yml
new file mode 100644
index 0000000..bff81f1
--- /dev/null
+++ b/test/e2e/cases/admin/expected/revert-refused.yml
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+httpCode: 409
+applyStatus: requires_inactivate_first
diff --git a/test/e2e/cases/admin/expected/reverted.yml b/test/e2e/cases/admin/expected/reverted.yml
new file mode 100644
index 0000000..3ed5983
--- /dev/null
+++ b/test/e2e/cases/admin/expected/reverted.yml
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+applyStatus: reverted_to_bundled
+hasApplyId: true
diff --git a/test/e2e/cases/admin/expected/rule-accepted.yml b/test/e2e/cases/admin/expected/rule-accepted.yml
new file mode 100644
index 0000000..e930362
--- /dev/null
+++ b/test/e2e/cases/admin/expected/rule-accepted.yml
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+applyStatus: structural_applied
+hasApplyId: true
diff --git a/test/e2e/cases/admin/expected/rule-applied.yml b/test/e2e/cases/admin/expected/rule-applied.yml
new file mode 100644
index 0000000..904ba83
--- /dev/null
+++ b/test/e2e/cases/admin/expected/rule-applied.yml
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+found: true
+phase: APPLIED
diff --git a/test/e2e/cases/admin/expected/sync-live.yml b/test/e2e/cases/admin/expected/sync-live.yml
new file mode 100644
index 0000000..fe48057
--- /dev/null
+++ b/test/e2e/cases/admin/expected/sync-live.yml
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+mode: live
+unreachable: false
+hasRows: true
diff --git a/test/e2e/cases/core/e2e.yaml b/test/e2e/cases/core/e2e.yaml
index 0f88d2b..9b528e5 100644
--- a/test/e2e/cases/core/e2e.yaml
+++ b/test/e2e/cases/core/e2e.yaml
@@ -61,7 +61,10 @@ verify:
   # minute after the agents register. This retry budget is that window; it is
   # why the specs themselves need no long polls.
   retry:
-    count: 40
+    # Sized for the slowest gate, which is alarms: OAP's bundled rules need a
+    # couple of minutes of traffic before they trip. The budget only costs
+    # time when a case actually retries, so the earlier gates are unaffected.
+    count: 60
     interval: 5s
   cases:
     # 1. Fixture sanity FIRST, straight off OAP. If this fails the demo app or
@@ -115,7 +118,20 @@ verify:
           | yq -P '{"hasLogs": (.logs | length > 0)}'
       expected: expected/has-logs.yml
 
-    # 6+7. The suites. Playwright owns its own assertions and reporting; the
+    # 6. Alarms have fired. OAP's bundled rules need sustained traffic before
+    #    they trip — the instance response-time rule wants >1000ms over two
+    #    minutes inside a ten-minute window — so a fresh stack legitimately has
+    #    none for the first few minutes. Gating here keeps that wait off the
+    #    browser cases, which would otherwise absorb it by retrying the whole
+    #    project. No rule is installed by the fixture: this also proves the
+    #    default alerting pipeline runs.
+    - query: |
+        bash test/e2e/script/prepare/alarm-count.sh \
+          "http://${horizon_host}:${horizon_8081}" \
+          | yq -P '{"hasAlarms": (.total > 0)}'
+      expected: expected/has-alarms.yml
+
+    # 7+8. The suites. Playwright owns its own assertions and reporting; the
     #      contract with infra-e2e is only "exit 0 and print passed: true".
     #      Split by project so a red run says which half broke — a route
     #      returning correct JSON into a view that throws on mount passes
diff --git a/test/e2e/cases/core/expected/has-alarms.yml b/test/e2e/cases/core/expected/has-alarms.yml
new file mode 100644
index 0000000..04bfd2a
--- /dev/null
+++ b/test/e2e/cases/core/expected/has-alarms.yml
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+hasAlarms: true
diff --git a/test/e2e/cases/es/e2e.yaml b/test/e2e/cases/es/e2e.yaml
index d9b4746..e4ec4d4 100644
--- a/test/e2e/cases/es/e2e.yaml
+++ b/test/e2e/cases/es/e2e.yaml
@@ -90,10 +90,13 @@ verify:
           | yq -P '{"api": .native.api, "hasTraces": (.native.traces | length > 0)}'
       expected: expected/trace-api-v1.yml
 
-    # 5. The UI still renders against a different backend. Only the shell and
-    #    layer journeys — the signal-specific tabs are core's job.
+    # 5. The UI still renders against a different backend. `ui-smoke`, not the
+    #    full `ui` project: the signal-specific tabs assert alarms, logs and
+    #    topology, which depend on readiness gates this case deliberately does
+    #    not run. Sharing the full project would make this case fail for
+    #    something it never set out to cover.
     - query: |
-        bash test/e2e/script/prepare/playwright.sh ui
+        bash test/e2e/script/prepare/playwright.sh ui-smoke
       expected: expected/passed.yml
 
 cleanup:
diff --git a/test/e2e/playwright/playwright.config.ts b/test/e2e/playwright/playwright.config.ts
index 8d4a89d..d675086 100644
--- a/test/e2e/playwright/playwright.config.ts
+++ b/test/e2e/playwright/playwright.config.ts
@@ -73,6 +73,27 @@ export default defineConfig({
       dependencies: ['auth'],
       use: { storageState: AUTH_STATE },
     },
+    {
+      // Admin screens, run only by the `admin` case — they assert against
+      // rules and templates that case establishes, so they mean nothing
+      // against a stack that has not been through it.
+      name: 'admin',
+      testMatch: /admin\/.*\.spec\.ts/,
+      dependencies: ['auth'],
+      use: { ...devices['Desktop Chrome'], storageState: AUTH_STATE },
+    },
+    {
+      // A narrower browser pass for cases whose point is the BACKEND, not the
+      // feature surface — shell and layer journeys only. The full `ui`
+      // project asserts signal-specific tabs (alarms, logs, topology) that
+      // depend on gates those cases deliberately do not run, so sharing one
+      // project would make an unrelated case fail for a reason it never
+      // claimed to cover.
+      name: 'ui-smoke',
+      testMatch: /ui\/(shell|layer)\.spec\.ts/,
+      dependencies: ['auth'],
+      use: { ...devices['Desktop Chrome'], storageState: AUTH_STATE },
+    },
     {
       name: 'ui',
       testMatch: /ui\/.*\.spec\.ts/,
diff --git a/test/e2e/playwright/specs/admin/pages.spec.ts b/test/e2e/playwright/specs/admin/pages.spec.ts
new file mode 100644
index 0000000..fd7aded
--- /dev/null
+++ b/test/e2e/playwright/specs/admin/pages.spec.ts
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { test, expect } from '@playwright/test';
+
+// The admin screens, in a real browser. Everything the `admin` case asserts
+// over the wire says nothing about whether an operator can see it: these are
+// among the heaviest pages in the app — Monaco editors, diff views, async
+// phase polling — and a view that throws on mount answers 200 with perfect
+// JSON underneath and shows a blank page.
+//
+// Runs in the `admin` case ONLY, and only against state that case has already
+// established. Deliberately read-only: the wire cases own the mutations, and
+// a browser clicking through the same transitions would race them.
+
+test('the DSL catalog page lists rules for a catalog', async ({ page }) => {
+  const crashes: string[] = [];
+  page.on('pageerror', (e) => crashes.push(e.message));
+
+  await page.goto('/operate/dsl/lal');
+  await expect(page.locator('.catalog')).toBeVisible({ timeout: 45_000 });
+  // The LAL rule base-compose mounts. Its presence proves the page is reading
+  // the live catalog rather than rendering an empty shell.
+  await expect(page.getByText('horizon-e2e').first()).toBeVisible({ timeout: 45_000 });
+
+  expect(crashes, 'an uncaught error during mount blanks the page').toEqual([]);
+});
+
+test('the capture history page mounts with its per-catalog filters', async ({ page }) => {
+  const crashes: string[] = [];
+  page.on('pageerror', (e) => crashes.push(e.message));
+
+  await page.goto('/operate/live-debug/history');
+  await expect(page.locator('.dh')).toBeVisible({ timeout: 45_000 });
+
+  // Capture history is stored in THIS BROWSER, not on the server — the page
+  // says so itself. A session started over the API therefore never appears
+  // here, so this asserts the page's own furniture (the mal/lal/oal filters)
+  // rather than content the wire cases created. Populating it would mean
+  // driving a capture through the debugger UI, which would race the wire
+  // cases' mutations.
+  const filters = page.locator('.dh button');
+  expect(await filters.count()).toBeGreaterThan(2);
+
+  expect(crashes).toEqual([]);
+});
+
+test('the live debugger offers the live rule catalog', async ({ page }) => {
+  const crashes: string[] = [];
+  page.on('pageerror', (e) => crashes.push(e.message));
+
+  await page.goto('/operate/live-debug/lal');
+  await expect(page.locator('#app')).toBeVisible();
+
+  // The page opens as a configuration form, not an editor — Monaco appears
+  // only once a capture has data. What matters at this stage is that the rule
+  // list came from OAP: horizon-e2e is the LAL rule base-compose mounts, so
+  // seeing it selectable proves the catalog reached the UI.
+  const ruleFile = page.locator('select').first();
+  await expect(ruleFile).toBeVisible({ timeout: 45_000 });
+  await expect(ruleFile.locator('option', { hasText: 'horizon-e2e' })).toHaveCount(1);
+
+  expect(crashes).toEqual([]);
+});
+
+test('the overview template admin renders the stored templates', async ({ page }) => {
+  const crashes: string[] = [];
+  page.on('pageerror', (e) => crashes.push(e.message));
+
+  await page.goto('/admin/overview-templates');
+  await expect(page.locator('.ot')).toBeVisible({ timeout: 45_000 });
+
+  expect(crashes).toEqual([]);
+});
+
+test('the layer dashboard admin mounts', async ({ page }) => {
+  const crashes: string[] = [];
+  page.on('pageerror', (e) => crashes.push(e.message));
+
+  await page.goto('/admin/layer-dashboards');
+  await expect(page.locator('#app')).toBeVisible();
+
+  // templates.mode is live, so this page renders what OAP holds. Layer keys
+  // are enum values rendered verbatim in every locale, which makes them safe
+  // to match; an empty rail would mean the seed-and-read round trip failed,
+  // the same break the wire assertions catch from the other side.
+  // Several, not an exact count: the rail is paged, so pinning the number
+  // would make an unrelated layer being added or removed fail this test.
+  const layerKeys = page.locator('code');
+  await expect(layerKeys.first()).toBeVisible({ timeout: 45_000 });
+  expect(await layerKeys.count()).toBeGreaterThan(2);
+
+  expect(crashes).toEqual([]);
+});
diff --git a/test/e2e/playwright/specs/bff/entities.spec.ts b/test/e2e/playwright/specs/bff/entities.spec.ts
new file mode 100644
index 0000000..f4acfd7
--- /dev/null
+++ b/test/e2e/playwright/specs/bff/entities.spec.ts
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { test, expect, type APIRequestContext } from '@playwright/test';
+import { PROVIDER_SERVICE, LAYER, WINDOW_MINUTES } from '../fixture.js';
+
+// The entity tiers below a service — instances and endpoints — plus alarms.
+// All are produced by the same fixture; none needs a stack of its own.
+
+/** Routes below a service want the full identity, not just an id. */
+async function providerIdentity(api: APIRequestContext) {
+  const roster = await (await api.get(`/api/layer/${LAYER}/services`)).json();
+  const svc = roster.services.find((s: { name: string }) => s.name === PROVIDER_SERVICE);
+  expect(svc, 'the provider must be in the roster').toBeDefined();
+  return `serviceId=${encodeURIComponent(svc.id)}&service=${encodeURIComponent(svc.name)}&normal=${svc.normal}`;
+}
+
+test('instances carry the agent-reported attributes', async ({ request: api }) => {
+  const q = await providerIdentity(api);
+  const body = await (
+    await api.get(`/api/layer/${LAYER}/instances?${q}&windowMinutes=${WINDOW_MINUTES}`)
+  ).json();
+
+  const names = body.instances.map((i: { name: string }) => i.name);
+  expect(names).toContain('provider1');
+
+  const inst = body.instances.find((i: { name: string }) => i.name === 'provider1');
+  // Language and attributes drive the instance dashboard's entity gating; an
+  // instance that registers without them renders a stripped-down page.
+  expect(inst.language).toBe('JAVA');
+  expect(inst.attributes.length).toBeGreaterThan(0);
+});
+
+test('endpoints list the demo app operation', async ({ request: api }) => {
+  const q = await providerIdentity(api);
+  const body = await (
+    await api.get(`/api/layer/${LAYER}/endpoints?${q}&windowMinutes=${WINDOW_MINUTES}`)
+  ).json();
+
+  expect(body.reachable).toBe(true);
+  const names = body.endpoints.map((e: { name: string }) => e.name);
+  expect(names).toContain('POST:/users');
+  for (const ep of body.endpoints) {
+    expect(ep.id, `${ep.name} must carry an endpoint id`).toBeTruthy();
+  }
+});
+
+test('endpoint dependency resolves for a real endpoint', async ({ request: api }) => {
+  const q = await providerIdentity(api);
+  const eps = await (await api.get(`/api/layer/${LAYER}/endpoints?${q}`)).json();
+  const ep = eps.endpoints[0];
+
+  const body = await (
+    await api.get(
+      `/api/layer/${LAYER}/endpoint-dependency?${q}` +
+        `&endpointId=${encodeURIComponent(ep.id)}&endpoint=${encodeURIComponent(ep.name)}` +
+        `&windowMinutes=${WINDOW_MINUTES}`,
+    )
+  ).json();
+
+  expect(body.endpoint).toBe(ep.name);
+  // The relation metrics the dependency view charts. Missing config here means
+  // the page renders a graph with no measurements on its edges.
+  expect(body.config.linkMetrics.length).toBeGreaterThan(0);
+});
+
+test('an identity without its name is refused, not answered', async ({ request: api }) => {
+  const roster = await (await api.get(`/api/layer/${LAYER}/services`)).json();
+  const svc = roster.services[0];
+  // Half an identity must be an error. Answering with an empty list reads as
+  // "this service has no endpoints" and sends an operator down the wrong path.
+  const res = await api.get(
+    `/api/layer/${LAYER}/endpoint-dependency?serviceId=${encodeURIComponent(svc.id)}`,
+  );
+  expect((await res.json()).error).toBe('incomplete_service');
+});
+
+test('alarms fire from OAP and are counted', async ({ request: api }) => {
+  const end = Date.now();
+  const start = end - 60 * 60 * 1000;
+
+  const count = await (await api.get(`/api/alarms/count?startTime=${start}&endTime=${end}`)).json();
+  // OAP's bundled alarm rules fire against the demo traffic on their own — no
+  // rule is installed by the fixture, so this also proves the default
+  // alerting pipeline is running.
+  expect(count.total).toBeGreaterThan(0);
+  expect(count.firing).toBeLessThanOrEqual(count.total);
+
+  const list = await (
+    await api.get(`/api/alarms?startTime=${start}&endTime=${end}&pageSize=10`)
+  ).json();
+  expect(list.msgs.length).toBeGreaterThan(0);
+
+  const first = list.msgs[0];
+  expect(first.message, 'an alarm must carry its message').toBeTruthy();
+  expect(first.scope, 'an alarm must name the scope it fired on').toBeTruthy();
+  // Alarm ids key on the alarmed entity rather than the firing instance, so
+  // they are not unique on their own — the row key needs the timestamp too.
+  expect(first.startTime).toBeGreaterThan(0);
+});
diff --git a/test/e2e/playwright/specs/ui/entities.spec.ts b/test/e2e/playwright/specs/ui/entities.spec.ts
new file mode 100644
index 0000000..eb843e1
--- /dev/null
+++ b/test/e2e/playwright/specs/ui/entities.spec.ts
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { test, expect } from '@playwright/test';
+import { LAYER } from '../fixture.js';
+
+// The tabs below the service dashboard, and the alarms page. Each is a
+// separate render path over data the core fixture already produces.
+
+test('the instance tab renders a dashboard for a real instance', async ({ page }) => {
+  const crashes: string[] = [];
+  page.on('pageerror', (e) => crashes.push(e.message));
+
+  await page.goto(`/layer/${LAYER}/instance`);
+
+  // Same template renderer as the service tab, driven by the instance scope.
+  // An empty widget grid here means the scope never resolved an entity —
+  // instance metrics are a different OAP scope, and querying the wrong one
+  // returns empty rather than erroring.
+  const widgets = page.locator('.widget');
+  await expect(widgets.first()).toBeVisible({ timeout: 45_000 });
+  await expect(page.getByText('provider1').first()).toBeVisible({ timeout: 45_000 });
+
+  expect(crashes).toEqual([]);
+});
+
+test('the endpoint tab renders a dashboard for a real endpoint', async ({ page }) => {
+  const crashes: string[] = [];
+  page.on('pageerror', (e) => crashes.push(e.message));
+
+  await page.goto(`/layer/${LAYER}/endpoint`);
+
+  const widgets = page.locator('.widget');
+  await expect(widgets.first()).toBeVisible({ timeout: 45_000 });
+  await expect(page.getByText('POST:/users').first()).toBeVisible({ timeout: 45_000 });
+
+  expect(crashes).toEqual([]);
+});
+
+test('the API dependency tab mounts and resolves an endpoint', async ({ page }) => {
+  const crashes: string[] = [];
+  page.on('pageerror', (e) => crashes.push(e.message));
+
+  await page.goto(`/layer/${LAYER}/dependency`);
+  await expect(page.locator('#app')).toBeVisible();
+  // The demo app's endpoint reaching this view proves the endpoint scope
+  // resolved; the dependency graph itself needs a second endpoint to be
+  // interesting, which this fixture does not produce.
+  await expect(page.getByText('POST:/users').first()).toBeVisible({ timeout: 45_000 });
+
+  expect(crashes).toEqual([]);
+});
+
+test('the alarms page lists what OAP is firing', async ({ page }) => {
+  const crashes: string[] = [];
+  page.on('pageerror', (e) => crashes.push(e.message));
+
+  await page.goto('/alarms');
+
+  // OAP's bundled rules fire against the demo traffic without the fixture
+  // installing any rule, so rows are expected rather than optional.
+  const rows = page.locator('.ax__rows .ax__row');
+  await expect(rows.first()).toBeVisible({ timeout: 45_000 });
+  // The entity an alarm fired on is the operator's first question; a row that
+  // renders without it is unactionable.
+  await expect(rows.first().locator('.ax__row-entity-name')).not.toBeEmpty();
+
+  expect(crashes).toEqual([]);
+});
diff --git a/test/e2e/script/prepare/alarm-count.sh b/test/e2e/script/prepare/alarm-count.sh
new file mode 100755
index 0000000..2660382
--- /dev/null
+++ b/test/e2e/script/prepare/alarm-count.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#     alarm-count.sh <base-url>
+#
+# The alarm routes take an explicit epoch-millisecond window rather than a
+# rolling `windowMinutes`, so the bounds have to be computed per call — which
+# a static verify-case URL cannot do.
+
+set -eu
+
+BASE="${1:?usage: alarm-count.sh <base-url>}"
+END=$(node -e 'process.stdout.write(String(Date.now()))')
+START=$(node -e 'process.stdout.write(String(Date.now() - 60 * 60 * 1000))')
+
+bash "$(dirname "$0")/horizon-get.sh" "${BASE}" "/api/alarms/count?startTime=${START}&endTime=${END}"
diff --git a/test/e2e/script/prepare/dsl-lifecycle.sh b/test/e2e/script/prepare/dsl-lifecycle.sh
new file mode 100755
index 0000000..1bcd45d
--- /dev/null
+++ b/test/e2e/script/prepare/dsl-lifecycle.sh
@@ -0,0 +1,82 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#     dsl-lifecycle.sh <base-url> <step>
+#
+# Walks the runtime-rule lifecycle a step at a time, so each verify case can
+# assert one transition. MUTATES OAP — `admin` case only.
+#
+# The rule under test is `horizon-e2e`, deliberately: it is the LAL rule
+# base-compose mounts, so it HAS a bundled twin on disk. revertToBundled is
+# refused with `no_bundled_twin` for any rule pushed ad-hoc, which makes an
+# invented name useless for testing restore.
+#
+# Steps, and the contract each one pins:
+#   debug-start   a debug session needs the rule LIVE, not merely pushed —
+#                 OAP answers rule_not_found until the apply reaches APPLIED
+#   revert-active revertToBundled on an ACTIVE rule is REFUSED; restore is a
+#                 two-step flow, inactivate first
+#   inactivate    the soft pause — synchronous, no schema change
+#   revert        …and only then does the bundled rule come back
+
+set -eu
+
+BASE="${1:?usage: dsl-lifecycle.sh <base-url> <step>}"
+STEP="${2:?usage: dsl-lifecycle.sh <base-url> <step>}"
+RULE=horizon-e2e
+
+USER="${HORIZON_E2E_USER:-e2e}"
+PASSWORD="${HORIZON_E2E_PASSWORD:-e2e-passw0rd}"
+JAR=$(mktemp)
+trap 'rm -f "${JAR}"' EXIT
+curl -sSf -c "${JAR}" -X POST "${BASE}/api/auth/login" \
+  -H 'Content-Type: application/json' \
+  -d "{\"username\":\"${USER}\",\"password\":\"${PASSWORD}\"}" > /dev/null
+
+case "${STEP}" in
+  debug-start)
+    curl -sSf -b "${JAR}" -X POST "${BASE}/api/debug/session" \
+      -H 'Content-Type: application/json' \
+      -d "{\"clientId\":\"e2e\",\"catalog\":\"lal\",\"name\":\"${RULE}\",\"ruleName\":\"${RULE}\",\"durationSeconds\":30}"
+    ;;
+  sessions)
+    curl -sSf -b "${JAR}" "${BASE}/api/debug/sessions"
+    ;;
+  revert-active)
+    # NO -f here, deliberately. The refusal is an HTTP 409 — semantically
+    # right, since it conflicts with the rule's current state — and `curl -f`
+    # discards the body of any 4xx, which is exactly the body carrying the
+    # contract. Emit the code alongside it so the case pins both.
+    body=$(curl -sS -o /dev/null -w '%{http_code}' -b "${JAR}" -X POST \
+      "${BASE}/api/rule/delete?catalog=lal&name=${RULE}&mode=revertToBundled")
+    status=$(curl -sS -b "${JAR}" -X POST \
+      "${BASE}/api/rule/delete?catalog=lal&name=${RULE}&mode=revertToBundled" \
+      | sed -n 's/.*"applyStatus":"\([a-z_]*\)".*/\1/p')
+    printf '{"httpCode": %s, "applyStatus": "%s"}\n' "${body}" "${status}"
+    ;;
+  inactivate)
+    curl -sSf -b "${JAR}" -X POST "${BASE}/api/rule/inactivate?catalog=lal&name=${RULE}"
+    ;;
+  revert)
+    curl -sSf -b "${JAR}" -X POST \
+      "${BASE}/api/rule/delete?catalog=lal&name=${RULE}&mode=revertToBundled"
+    ;;
+  *)
+    echo "unknown step: ${STEP}" >&2
+    exit 1
+    ;;
+esac
diff --git a/test/e2e/script/prepare/dsl-push.sh b/test/e2e/script/prepare/dsl-push.sh
new file mode 100755
index 0000000..f77b611
--- /dev/null
+++ b/test/e2e/script/prepare/dsl-push.sh
@@ -0,0 +1,55 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#     dsl-push.sh <base-url> <catalog> <name>
+#
+# Hot-updates a runtime rule. The rule body is text/plain, not JSON, so
+# horizon-post.sh cannot carry it.
+#
+# MUTATES OAP — only the `admin` case may call this. A rule pushed under any
+# other case would change the backend its neighbours are asserting against.
+
+set -eu
+
+BASE="${1:?usage: dsl-push.sh <base-url> <catalog> <name>}"
+CATALOG="${2:?usage: dsl-push.sh <base-url> <catalog> <name>}"
+NAME="${3:?usage: dsl-push.sh <base-url> <catalog> <name>}"
+
+USER="${HORIZON_E2E_USER:-e2e}"
+PASSWORD="${HORIZON_E2E_PASSWORD:-e2e-passw0rd}"
+
+JAR=$(mktemp)
+trap 'rm -f "${JAR}"' EXIT
+
+curl -sSf -c "${JAR}" -X POST "${BASE}/api/auth/login" \
+  -H 'Content-Type: application/json' \
+  -d "{\"username\":\"${USER}\",\"password\":\"${PASSWORD}\"}" > /dev/null
+
+# A minimal but VALID rule: it must parse, or OAP rejects it structurally and
+# the apply phase never reaches APPLIED. Deliberately inert — it sinks nothing
+# and matches nothing, so it cannot alter what other assertions observe.
+curl -sSf -b "${JAR}" -X POST "${BASE}/api/rule?catalog=${CATALOG}&name=${NAME}" \
+  -H 'Content-Type: text/plain' \
+  --data-binary "rules:
+  - name: ${NAME}
+    layer: GENERAL
+    dsl: |
+      filter {
+        sink {
+        }
+      }
+"