Commit Graph

9 Commits

Author SHA1 Message Date
pulse-triage[bot]
cb61f75419 Preserve canonical Unicode and duplicate-key encoding in raw patches
Normalise newly added fields and identity anchors through the exact-number decoder/encoder; require byte-for-byte parent-oracle equivalence as well as values, including lone surrogate and invalid UTF-8 controls.

Contract-Neutral: Preserve the existing exact emitted JSON patch representation for additions and identity anchors.
Change-source: pulse-maintainer
2026-10-06 12:13:08 +01:00
pulse-triage[bot]
4f1dc52bc3 Keep the root identity anchor in the first decoded raw field map
Avoid a second full current-object decoding while retaining the exact parent merge-patch identity rule for object/object and replacement transitions.

Contract-Neutral: Same merge-patch values and identity anchoring; removes a redundant current-object decode only.
Change-source: pulse-maintainer
2026-10-06 12:11:02 +01:00
pulse-triage[bot]
ee8b88df69 Reduce repeated work in connected dashboard broadcasts
Precompute canonical registry sort keys once per row, compare immutable JSON
object fields before decoding unchanged nested metadata, and reuse one exact
baseline-to-current frame within a serial dispatch. Each client's hydration,
frame limit, queue acceptance and tenant selection remain authoritative.
No cross-broadcast conversion or content-hash cache is introduced.

Reported connected-path evidence: Pulse #2199, AndyProsser comment 6013106749.

Contract-Neutral: Same canonical ordering, exact-number JSON merge semantics and per-client/tenant state protocol; only transient computation and allocations change.
Change-source: pulse-maintainer
2026-10-06 12:08:50 +01:00
pulse-triage[bot]
666912d732 Preserve numeric counter precision in dashboard deltas
Compare and emit exact JSON number tokens instead of converting keyed resource, infrastructure and alert payloads through float64. Adjacent large counters must not disappear, and changed nested objects and arrays must not be rounded. Retain single-value parsing, merge removals, identity binding, per-client baselines and tenant isolation. Keep an exact parent helper for same-executable synthetic cost comparisons.

Change-source: pulse-maintainer
Contract-Neutral: Restore authoritative JSON numeric values; existing delta schema, keying, tenant isolation and queue lineage are unchanged.
2026-10-06 09:32:29 +01:00
pulse-triage[bot]
4b01e25cdf Remove redundant connected-dashboard projection and snapshot copies
List the continuity-aware registry once, decorate one owned host projection, and sort final frontend rows rather than a second estate-sized conversion array. Encode concrete frontend resources directly into immutable snapshot buffers, decoding every authoritative ID from those bytes; leave generic marshalers and all other fields on the existing path. Keep live freshness, alert and lifecycle semantics without a cache.

Change-source: pulse-maintainer
2026-10-01 11:32:30 +01:00
pulse-triage[bot]
901274ee92 Reduce snapshot and clone allocations without trusting ID hints
Batch WebSocket identity decoding from the encoded arrays and retain decoder-owned entry buffers. Keep canonical metadata refresh on every resource clone while replacing membership maps with small scope slices and a single sensitivity-tag scan. Preserve delta identity, scope ordering, policy precedence and clone isolation with reference/fuzz and transition tests.

Adapt the remaining performance work proposed in Pulse PR #2342 for issue #2199. The contributor's first-ID check cannot verify a stale tail; this candidate uses standard JSON decoding for every encoded identity instead. Keep the imported contributor history and branch unchanged.

Co-authored-by: Andy Prosser <andy.prosser@icloud.com>
Based-on: https://github.com/rcourtman/Pulse/pull/2342
Original-Commit: 0cbfa43186
Change-source: pulse-maintainer
2026-09-30 13:21:56 +01:00
rcourtman
0fece386c4 Ship active alerts as per-client keyed deltas
Second increment of the resource-payload-static-metadata gap: the full
activeAlerts array (~37-75KB at mock-estate churn) re-shipped whenever
any single alert changed. Alerts now ride the generalized keyed delta
transport: the per-field keying and transition handling in the state
delta engine is a declarative keyedDeltaFields list shared with the
connected-infrastructure projection, and activeAlertsDelta carries
id-keyed merge patches, removed ids, and order. Measured on the mock
estate the per-tick alert payload drops to 184-1981 bytes.

One boundary held deliberately fixed: alert application timing does not
change. The client applies alert deltas to an isolated baseline and
feeds the exact same applyActiveAlerts path immediately on arrival,
input-active or not — alert lifecycle truth never waits for the
operator-input idle gate (alerts subsystem boundary, documented in
6ecdc81d1), and the pending-acknowledgment safeguards see byte-
equivalent records. Alerts handed to the store are cloned so it never
adopts baseline-owned objects. Deltas without a baseline are ignored
and heal on the next full payload; unkeyable entries fall back to
whole-field diffing.

Remaining gap scope unchanged: snapshot-side static metadata
(canonicalIdentity alias history ~609KB per snapshot, and the partially
regressed aiSafeSummary/policy omissions) stays open under
resource-payload-static-metadata.
2026-08-26 18:23:50 +01:00
rcourtman
f3d3434652 Ship the infrastructure projection as per-client keyed deltas
First increment of the resource-payload-static-metadata gap: the
connected-infrastructure reporting projection was re-shipped whole
(~55-60KB at 50-node scale) on every realtime broadcast even though
measurement showed the only field that ever changes tick-to-tick is
lastSeen, and the client deep-reconciled all 69 rich items per tick —
the dominant reactive cost inside every websocket message after the
resource merge itself.

The projection now rides the same per-client keyed delta engine as
resources. buildClientStateSnapshot keys it by id beside the resource
map, and buildClientStateDelta emits connectedInfrastructureDelta with
id-keyed JSON merge patches, removed ids, and order through one shared
keyed-array builder. Measured on the mock estate the per-tick payload
drops from ~55-60KB to 0.7-4KB of timestamp patches. Entries that
cannot key by id fall the whole field back to plain whole-payload
diffing, and keyed/unkeyed baseline transitions re-ship the full array
once, so the keyed path can never corrupt the projection.

The client mirrors the resource baseline pattern: full payloads
establish an isolated raw baseline, deltas apply as merge patches
through the now-generic keyed apply helper, and the store sync hands
reconcile reference-stable objects for untouched items so a tick
reconciles only what changed instead of deep-walking the projection.
Deltas without a baseline are ignored and heal on the next full
payload; the operator-input deferral gate carries the pending changed
ids across a gesture and flushes them in the same coalesced batch.

The remaining gap scope (snapshot-side static metadata such as
canonicalIdentity alias history, ~609KB per snapshot) stays open under
resource-payload-static-metadata.
2026-08-26 18:09:34 +01:00
rcourtman
962d297803 fix(websocket): send resource deltas after initial state
Refs #1601
Refs #1665
Refs #1497
2026-08-06 00:48:37 +01:00