Task 13: fluxer-devserver fixture server #13

Closed
opened 2026-11-11 08:01:24 +00:00 by charles · 0 comments
Owner

Files:

  • Create: crates/fluxer-devserver/src/{lib.rs,main.rs,http.rs,gateway.rs,scenario.rs}, fixtures/scenarios/basic.toml
  • Test: crates/fluxer-devserver/tests/scenario.rs

Interfaces:

  • Produces: DevServer::spawn(fixtures_dir: &Path, scenario: &str) -> DevServer { instance_url: Url } (axum on an ephemeral port): serves /api/.well-known/fluxer (endpoints pointing at itself), /api/v1/auth/login (accepts login = "demo", password = "demo"; login = "mfa" returns the MFA fixture, totp code 000000 succeeds), /users/@me, /channels/{id}/messages paginating fixtures/rest/messages_page.json style data generated from the scenario, POST messages echoing a Message with the request nonce, typing, ack; gateway at /gateway speaking the real protocol (HELLO 41250 → expects IDENTIFY → READY from ready.json; zstd-stream when requested), then plays the scenario's timeline ([[event]] after_ms = 500, t = "MESSAGE_CREATE", fixture = "message_create.json"), and after a send echoes MESSAGE_CREATE for it. basic.toml: 2 guilds, 6 channels, 120 messages in #general, one typing burst, one presence change.
  • Binary fluxer-devserver --fixtures fixtures --scenario basic prints the instance URL.

Plan: https://git.forked.io/charles/fluxer-native/src/branch/foundation/docs/superpowers/plans/2026-11-11-foundation.md (section "Task 13")

**Files:** - Create: `crates/fluxer-devserver/src/{lib.rs,main.rs,http.rs,gateway.rs,scenario.rs}`, `fixtures/scenarios/basic.toml` - Test: `crates/fluxer-devserver/tests/scenario.rs` **Interfaces:** - Produces: `DevServer::spawn(fixtures_dir: &Path, scenario: &str) -> DevServer { instance_url: Url }` (axum on an ephemeral port): serves `/api/.well-known/fluxer` (endpoints pointing at itself), `/api/v1/auth/login` (accepts `login = "demo"`, `password = "demo"`; `login = "mfa"` returns the MFA fixture, totp code `000000` succeeds), `/users/@me`, `/channels/{id}/messages` paginating `fixtures/rest/messages_page.json` style data generated from the scenario, `POST messages` echoing a `Message` with the request `nonce`, `typing`, `ack`; gateway at `/gateway` speaking the real protocol (HELLO 41250 → expects IDENTIFY → READY from `ready.json`; zstd-stream when requested), then plays the scenario's timeline (`[[event]] after_ms = 500, t = "MESSAGE_CREATE", fixture = "message_create.json"`), and after a send echoes `MESSAGE_CREATE` for it. `basic.toml`: 2 guilds, 6 channels, 120 messages in `#general`, one typing burst, one presence change. - Binary `fluxer-devserver --fixtures fixtures --scenario basic` prints the instance URL. --- Plan: https://git.forked.io/charles/fluxer-native/src/branch/foundation/docs/superpowers/plans/2026-11-11-foundation.md (section "Task 13")
charles added this to the Foundation milestone 2026-11-11 08:01:24 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#13
No description provided.