@rotorsoft/act-tck 1.27.15 → 1.27.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4158,6 +4158,40 @@ var runStoreTck = (options) => {
4158
4158
  expect8(seen[0].pii).toEqual({ email: "u@example.com", name: "Ursula" });
4159
4159
  expect8(seen[0].data).toEqual({ amount: 1 });
4160
4160
  });
4161
+ it7("query_stats head/tail never carry pii \u2014 introspection surface is pii-safe (#1294)", async () => {
4162
+ const s = `pii-stats-${uid()}`;
4163
+ await store.commit(
4164
+ s,
4165
+ [
4166
+ {
4167
+ name: "Incremented",
4168
+ data: { amount: 1 },
4169
+ pii: { email: "head@example.com" }
4170
+ },
4171
+ {
4172
+ name: "Incremented",
4173
+ data: { amount: 2 },
4174
+ pii: { email: "tail@example.com" }
4175
+ }
4176
+ ],
4177
+ make_meta({ stream: s })
4178
+ );
4179
+ const heads = await store.query_stats([s], {
4180
+ tail: true
4181
+ });
4182
+ const h = heads.get(s);
4183
+ expect8(h?.head?.pii == null).toBe(true);
4184
+ expect8(h?.tail?.pii == null).toBe(true);
4185
+ const full = await store.query_stats([s], {
4186
+ tail: true,
4187
+ count: true,
4188
+ names: true
4189
+ });
4190
+ const f = full.get(s);
4191
+ expect8(f?.head?.pii == null).toBe(true);
4192
+ expect8(f?.tail?.pii == null).toBe(true);
4193
+ expect8(f?.count).toBe(2);
4194
+ });
4161
4195
  it7("passes through events without pii (pii is null or undefined on load)", async () => {
4162
4196
  const s = `pii-none-${uid()}`;
4163
4197
  await store.commit(