Skip to content

test(e2e): stagehand MQTT state and hot list - #572

Merged
stakach merged 2 commits into
developfrom
feat/stagehand-mqtt-e2e
Oct 14, 2026
Merged

stakach merged 2 commits into
developfrom
feat/stagehand-mqtt-e2e

Conversation

@stakach

@stakach stakach commented Oct 14, 2026

Copy link
Copy Markdown
Member

What

End-to-end coverage for stagehand's MQTT path, against the local PlaceOS stack:

driver --> redis --> source --> mosquitto <-- nginx /api/mqtt/ <-- stagehand
  • Stack: e2e/stack now runs source and mosquitto (rest-api auth, as deployed). up.sh seeds a Broker for source (API key, Support) and the stagehand OAuth app. It also seeds place/e2e/state_harness.cr from PlaceOS/drivers master: a UDP device whose statuses are set through exec. A harness the build farm can't build fails only the stagehand specs, not the bring-up.
  • Specs (apps/stagehand/e2e/local, new local Playwright project):
    • Publishing: SH-MQTT-01 to 04.
    • Hot list: SH-HOT-01 and 02.
    • Lifecycle: SH-MQTT-10 to 15 and 17. Each one changes a system the way an admin would, then requires a fresh client's retained topics for the system to equal what its module order, names, zones and module state imply, so stale, missing and wrong-index topics all fail.
  • Stagehand fix (SH-HOT-02): stagehand cached a system's module list forever, so a module added later could never raise an alert. It now refetches, at most every 5s, before dropping an unknown device.

Backend dependency

The lifecycle specs need PlaceOS/source v1.22.1 (PlaceOS/source#65), which fixes the field reports: alerts for deleted modules, and alerts on the old index after a reorder. latest (placeos-2.2610.1) doesn't have it yet. Until it does, run with E2E_SOURCE_IMAGE=placeos/source:nightly or a local build (see e2e/README.md, "MQTT"). The advisory CI job runs only the workplace suite, so it isn't affected. It does bring up the extra services and seed the harness.

Testing

Coverage and gaps are in E2E_USER_STORIES.md §5. Not covered: a status with a TTL that expires in redis keeps its last value on the broker.

🤖 Generated with Claude Code

stakach and others added 2 commits October 15, 2026 00:54
… alert

The module list was cached on a system's first alert and never refreshed,
so a module added to the system afterwards could never raise an alert.
On a miss the list is now fetched again, at most every 5 seconds, and the
alert list is checked again once that window has passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…stack

The stack now runs source and mosquitto (with rest-api auth, as deployed),
seeds a Broker for source and a state harness driver from PlaceOS/drivers,
and serves stagehand for a new `local` Playwright project.

The specs hold the broker to the truth: what a fresh client is handed for
a system must equal what its modules, names, zones and state imply. They
cover publishing, the hot list, reorder, removal, module and system delete,
rename, moving a system between levels and cleared statuses. The lifecycle
specs need PlaceOS/source v1.22.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
frontend-templates Ignored Ignored Oct 14, 2026 1:54pm UTC

@stakach
stakach merged commit 7eb640d into develop Oct 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant