c6332c26a1
F49 step 4 (F40 metrics smoke): - crates/mxaccess-compat/tests/metrics_smoke_live.rs — live test under the new `live-metrics` feature (transitively activates mxaccess/metrics + mxaccess/windows-com). Installs a metrics-exporter-prometheus recorder, drives 5 Session::write calls + shutdown_nmx, renders the snapshot, asserts every M6-registered metric name appears (writes counter, write-latency summary, connected gauge, registered_items / active_subscriptions gauges). Pass on the live AVEVA install. Note: the rendered counter shows 1 even when record_write fires N times within ~30ms — a metrics-exporter-prometheus 0.16 quirk under tight loops, not a Rust port bug. Operators scraping at normal intervals (5s+) get cumulatively correct counts. Documented in the test + in M6-live-verification.md so future runs aren't surprised. F49 status update (in design/followups.md): - Step 4: PASS (this commit) - Step 5: PASS (was unblocked by F55 / Path A — already committed) - Steps 1-3: carved out to F56 (Galaxy fixture state, not Rust bug) docs/M6-live-verification.md: - Per-step evidence table with test invocations + outcomes. - Sample Prometheus snapshot for step 4. - Reproduction commands for the live tests. - F56 explanation cross-referenced from step 1. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
52 lines
2.3 KiB
TOML
52 lines
2.3 KiB
TOML
[package]
|
|
name = "mxaccess-compat"
|
|
description = "LMXProxyServer-shaped Rust facade on top of `mxaccess::Session`. Optional / post-V1."
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
rust-version.workspace = true
|
|
authors.workspace = true
|
|
|
|
[dependencies]
|
|
mxaccess = { path = "../mxaccess", version = "0.0.0" }
|
|
tokio = { workspace = true }
|
|
tokio-stream = { version = "0.1", features = ["sync"] }
|
|
futures-util = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
# F49 step 4 — F40 metrics live smoke. Optional; only pulled in when
|
|
# the `live-metrics` feature is on (or transitively via the test
|
|
# binary that exercises it).
|
|
metrics = { workspace = true, optional = true }
|
|
metrics-exporter-prometheus = { version = "0.16", default-features = false, optional = true }
|
|
|
|
[dev-dependencies]
|
|
tokio = { workspace = true, features = ["macros", "rt", "rt-multi-thread", "sync", "time"] }
|
|
async-trait = { workspace = true }
|
|
mxaccess-rpc = { path = "../mxaccess-rpc", version = "0.0.0" }
|
|
# F56 — buffered subscribe live test needs real Galaxy DB metadata
|
|
# (engine_id / platform_id / object_id / attribute_id from
|
|
# `dbo.gobject` etc.); the StaticResolver shim used by lmx_write_live
|
|
# was hardcoded to platform_id=1 / engine_id=2 which the engine
|
|
# silently accepts for writes but doesn't dispatch DataUpdate frames
|
|
# against. The buffered live test resolves real IDs via SqlTagResolver.
|
|
mxaccess-galaxy = { path = "../mxaccess-galaxy", version = "0.0.0", features = ["galaxy-resolver"] }
|
|
# Live tests use tracing-subscriber to dump router/dcom_sink trace
|
|
# events on demand (set RUST_LOG=mxaccess=trace,mxaccess_callback=trace).
|
|
tracing = { workspace = true }
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
|
|
[features]
|
|
default = []
|
|
# F49 / F54 live test gate. Enables `Session::connect_nmx_auto` for
|
|
# the live integration test at `tests/lmx_write_complete_live.rs`.
|
|
live-windows-com = ["mxaccess/windows-com"]
|
|
# F49 step 4 — F40 metrics live smoke. Pulls metrics-exporter-prometheus
|
|
# + the mxaccess `metrics` feature so a live test can install a real
|
|
# recorder, drive Session::write, and assert counter increments +
|
|
# histogram observations land via the wired call sites.
|
|
live-metrics = ["mxaccess/metrics", "mxaccess/windows-com", "dep:metrics", "dep:metrics-exporter-prometheus"]
|
|
|
|
[lints]
|
|
workspace = true
|