test(grpc-data): A2a — revocation test awaits the worker teardown; README conditions profile

This commit is contained in:
Joseph Doherty
2026-11-24 12:42:17 -05:00
parent ba0555d4a5
commit 45a3eee9c8
2 changed files with 12 additions and 1 deletions
+10
View File
@@ -93,6 +93,16 @@ the consumer's connection and exports, and seeds a second principal `fixture-noh
the probe's `--scenario history` origin RPCs, the CLI `historyread` and the CONSUMER `history` node-probe operation, and checks
value parity. Without `--history` the rig, the seed and every D-scenario are unchanged.
## A2a conditions profile (opt-in)
`rig.py up --run-id <id> --conditions` adds `compose.conditions.yml`: the seeder grants `AlarmSubscribe` on both SOURCE exports
and adds one scripted alarm, `ScalarHigh` (`modbus/plc/scalar > 100`), on the SOURCE equipment. The dev
`DataConnections__ConditionKeySecret` is already set on both `source-*` services. `python3 scripts/validation/grpc-data/conditions_smoke.py
--run-id <id>` raises the alarm through the device control API (register 20 := 150), then runs the probe's `--scenario conditions`
on both SOURCE listeners: the Primary must stream a snapshot (`total`, the active record, `snapshot_complete`) and, after the
probe clears the alarm, a delta; the Secondary must refuse the condition item (`Unavailable`, Primary-only). Without
`--conditions` the rig, the seed and every D-scenario are unchanged.
## H3 projected-history gate (opt-in)
`rig.py up --run-id <id> --history [--history-backend sqlserver|questdb]` — `questdb` layers `compose.history.questdb.yml`:
@@ -149,7 +149,8 @@ public sealed class GrpcDataConditionStreamTests
var after = await stream.DrainAsync(f);
after.OfType<DataSubscriptionConditions>().SelectMany(x => x.Items).Count().ShouldBeLessThan(400);
stream.Ended.ShouldBeTrue("a revoked condition item ends the stream, like a revoked v1 value item");
// Frames already prepared before the revocation are bounded by the queue; nothing is produced after it.
// The worker's teardown (after the reader ended) releases the condition item.
await stream.Session.Completion.WaitAsync(TimeSpan.FromSeconds(10), Ct);
f.StreamOf(stream, allowMissing: true).ShouldBeNull();
}