test(grpc-data): A03 phase 1 permits exactly one RefreshRequired after the held-set takeover (still forbids extra condition events); docs: the deploy hold settles on any completion, is bounded, reports held, and resyncs once

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Joseph Doherty
2026-11-25 04:07:58 -05:00
parent 6bdca132fe
commit dc5ed011ce
3 changed files with 24 additions and 4 deletions
+12 -2
View File
@@ -360,7 +360,17 @@ An origin streams its alarm condition state to a peer that negotiated `condition
review, S1. Earlier text here said a deploy's adds/removes arrive as deltas; only a fixture could do that.)
- **A consumer deploy holds its imported conditions.** The consumer's own deploy publishes an empty mapping set while its
catalog attempt is in progress; that set is undecided, not a removal. Conditions are held and handed to the next runner
(same nodes, same EventIds); only the settled set decides a removal (A4 F1–F3).
(same nodes, same EventIds); only the settled set decides a removal (A4 F1–F3). A4 review round 2 bounds and settles it:
- The runtime publishes the placements and the "undecided" flag as one value (`ProjectedMappingSet`), so no reader pairs
a settled flag with the attempt's empty list.
- **Any** completion settles the set. A failed or degraded apply leaves the catalog unactivated, so the settled set is
empty and the held conditions are removed. (Browse anchors still stay retained until a successful activation.)
- An attempt that never completes is bounded. The held conditions go `BadNoCommunication` on the connection's stale
timeout, as for any stream gap, and are removed past `ProjectedConditionOptions.MaxHold` (5 min, 2.5× the deploy apply
deadline). Until then they stay charged to the host caps and diagnostics show the connection as `held`.
- The runner that takes a held set over sends **RefreshRequired once** at its first barrier. While the set was held
nothing imported was visible, so an event queued then was dropped and a ConditionRefresh replayed nothing. RefreshRequired
is a Server-object event, not a condition event: EventIds are kept and no condition event is added.
- **Priority and overflow.** A control or ack at the head of the stream goes first, then condition frames, then queued
values. Condition production is pull-based: a slow consumer leaves records in the bounded condition-state hub. The item
notices an eviction of records it has not read the next time it reads the hub. If its previous snapshot's last chunk is
@@ -598,7 +608,7 @@ The AdminUI **Data connections** page (`/clusters/{id}/data-connections`) shows,
"Imported conditions" line. It reads "no condition-bearing mapping (or evidence unavailable)" when there is none, or when the
node is older than A4. Otherwise it shows:
- `stream` state (idle, connecting, snapshotting or live) and `last snapshot` (UTC, or "none since start");
- `stream` state (idle, connecting, snapshotting, live, or held — kept across an undecided deploy, see the condition stream lifetime) and `last snapshot` (UTC, or "none since start");
- `conditions` materialised, with the `state unknown` count (`state_known = false`);
- `node budget` charged against the host condition limit;
- `RefreshRequired`, `resyncs` and `capacity rejections` counts;