Task 14: apps/fluxer runtime (effect executor, config, logging) #14

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

Files:

  • Create: apps/fluxer/src/{main.rs,runtime.rs,config.rs,logging.rs,debug_info.rs,record.rs}
  • Test: apps/fluxer/tests/runtime.rs

Interfaces:

  • Produces: Runtime::new(config: Config, paths: Paths) -> Runtime; fn start(self) -> (mpsc::Sender<CoreEvent>, mpsc::Receiver<CoreEvent>, Handle) — a tokio task owning App, receiving CoreEvents (from UI and I/O), calling apply, executing each Effect (Api via ApiClient, gateway via Connection, persist via fluxer-platform, notify via Task 23, schedule via tokio::time::sleep) and publishing AppSnapshot (an Arc<App> clone-on-write; App: Clone) over a watch channel for the UI. Idempotent Api GETs retried with backoff (3 tries); everything else fails once → EffectFailed.
  • Config from env/flags: FLUXER_INSTANCE / --instance, FLUXER_LOG (tracing_subscriber::EnvFilter), --devserver [scenario] (spawns DevServer, points instance at it, logs in as demo automatically), --record <dir> (tee of gateway frames and REST bodies to files with Authorization, token, email values replaced by "<redacted>"), --debug-info (prints version, git sha, OS, GPU adapter name via wgpu::Instance::enumerate_adapters, backend, paths). Logging: tracing-appender daily rotation in paths.log_dir, plus stderr; panic hook writes panic-<ts>.txt there.

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

**Files:** - Create: `apps/fluxer/src/{main.rs,runtime.rs,config.rs,logging.rs,debug_info.rs,record.rs}` - Test: `apps/fluxer/tests/runtime.rs` **Interfaces:** - Produces: `Runtime::new(config: Config, paths: Paths) -> Runtime`; `fn start(self) -> (mpsc::Sender<CoreEvent>, mpsc::Receiver<CoreEvent>, Handle)` — a tokio task owning `App`, receiving `CoreEvent`s (from UI and I/O), calling `apply`, executing each `Effect` (`Api` via `ApiClient`, gateway via `Connection`, persist via `fluxer-platform`, notify via Task 23, schedule via `tokio::time::sleep`) and publishing `AppSnapshot` (an `Arc<App>` clone-on-write; `App: Clone`) over a `watch` channel for the UI. Idempotent `Api` GETs retried with backoff (3 tries); everything else fails once → `EffectFailed`. - `Config` from env/flags: `FLUXER_INSTANCE` / `--instance`, `FLUXER_LOG` (`tracing_subscriber::EnvFilter`), `--devserver [scenario]` (spawns `DevServer`, points instance at it, logs in as demo automatically), `--record <dir>` (tee of gateway frames and REST bodies to files with `Authorization`, `token`, `email` values replaced by `"<redacted>"`), `--debug-info` (prints version, git sha, OS, GPU adapter name via `wgpu::Instance::enumerate_adapters`, backend, paths). Logging: `tracing-appender` daily rotation in `paths.log_dir`, plus stderr; panic hook writes `panic-<ts>.txt` there. --- Plan: https://git.forked.io/charles/fluxer-native/src/branch/foundation/docs/superpowers/plans/2026-11-11-foundation.md (section "Task 14")
charles added this to the Foundation milestone 2026-11-11 08:01:25 +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#14
No description provided.