@bli-cockpit/telemetry-core 0.1.103 → 0.1.104

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.
@@ -55,9 +55,10 @@ export interface StoredWindow {
55
55
  raw_chars: number;
56
56
  }
57
57
  /**
58
- * A source whose NEWEST row on record is a refusal: blind right now, however old the refusal is. The cron writes an
59
- * unchanged refusal about every six hours, not every pass, so a read that only looks inside the asked window loses an
60
- * ongoing outage the moment the window starts after the last refusal row (BLI-12855, the `--since 1h` that read as all clear).
58
+ * A source whose NEWEST row on record is a refusal: blind right now, however old the refusal is. The cron wrote an
59
+ * unchanged refusal about every six hours until BLI-25225 (every pass since), so a read that only looked inside the asked
60
+ * window lost an ongoing outage the moment the window started after the last refusal row (BLI-12855, the `--since 1h`
61
+ * that read as all clear). Reading the newest row keeps that true whatever the cron's cadence.
61
62
  */
62
63
  export interface StillRefusing {
63
64
  source: string;
@@ -263,8 +263,8 @@ export const TOWER_PATTERNS = [
263
263
  class: "benign",
264
264
  source: "^railway$",
265
265
  unit: "^logs-digest$",
266
- match: raw `^\[project-logs unit\] (not asked, platform refused earlier in this firing|refusal unchanged, not written again) reason=`,
267
- note: "the digest cron restating a refusal it already reported (the platform refused once this firing, or the stored refusal is unchanged); the first refusal is its own line and stays an alert",
266
+ match: raw `^\[project-logs unit\] (not asked, (platform|project) refused earlier in this firing|refusal row written|refusal unchanged, not written again) reason=`,
267
+ note: "the digest cron restating a refusal it already reported (the platform or, for Supabase, the project refused once this firing; the refusal's row was stored; or, before BLI-25225, the stored refusal was unchanged); the first refusal is its own line and stays an alert",
268
268
  basis: "Edward's QA of `cockpit logs railway --since 1h`, 2026-10-07: 272 such lines filled 6 of the 9 ERROR rows while three tokens were missing",
269
269
  },
270
270
  {
@@ -84,6 +84,7 @@ export declare const MemoryHookCountsSchema: z.ZodObject<{
84
84
  via_daemon: z.ZodOptional<z.ZodNumber>;
85
85
  via_direct: z.ZodOptional<z.ZodNumber>;
86
86
  skipped_trivial: z.ZodOptional<z.ZodNumber>;
87
+ skipped_automated: z.ZodOptional<z.ZodNumber>;
87
88
  billing_exhausted: z.ZodOptional<z.ZodNumber>;
88
89
  chars: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
89
90
  }, z.core.$strict>;
@@ -106,6 +107,7 @@ export declare const MemoryHookStatsFileSchema: z.ZodObject<{
106
107
  via_daemon: z.ZodOptional<z.ZodNumber>;
107
108
  via_direct: z.ZodOptional<z.ZodNumber>;
108
109
  skipped_trivial: z.ZodOptional<z.ZodNumber>;
110
+ skipped_automated: z.ZodOptional<z.ZodNumber>;
109
111
  billing_exhausted: z.ZodOptional<z.ZodNumber>;
110
112
  chars: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
111
113
  }, z.core.$strict>>>;
@@ -132,6 +134,8 @@ export interface MemoryHookWindow {
132
134
  viaMeasured: boolean;
133
135
  /** Trivial prompts the hook declined to search for (BLI-3881). A subset of skips. */
134
136
  skippedTrivial: number;
137
+ /** Background-task notifications the hook declined to search for (BLI-25241). A subset of skips. */
138
+ skippedAutomated: number;
135
139
  /**
136
140
  * BLI-3891: runs the provider refused because the account has no credit. A
137
141
  * subset of `failed`, summed only over buckets that carry the field, so a
@@ -141,6 +141,19 @@ export const MemoryHookCountsSchema = z
141
141
  * failed + skipped` still holds.
142
142
  */
143
143
  skipped_trivial: z.number().int().min(0).optional(),
144
+ /**
145
+ * BLI-25241 — the SUBSET of `skipped` that was a background task reporting
146
+ * back, not a person's prompt (`<task-notification>`). The hook runs on
147
+ * those too, and a review of 321 recall blocks on one laptop found 49% were
148
+ * attached to them. They are skipped, and counted here so a falling recall
149
+ * rate reads as "the host sent notifications", never as "the shelf was empty".
150
+ *
151
+ * OPTIONAL for the same reason `skipped_trivial` is: this schema is strict
152
+ * and a required field would turn every existing machine's history into
153
+ * `hook_stats_unrecognised_shape` overnight. Counted BESIDE `skipped`, so
154
+ * `runs = printed + empty + timeouts + failed + skipped` still holds.
155
+ */
156
+ skipped_automated: z.number().int().min(0).optional(),
144
157
  /**
145
158
  * BLI-3891 — the SUBSET of `failed` that was the ACCOUNT, not the code.
146
159
  *
@@ -211,6 +224,7 @@ export function emptyMemoryHookCounts() {
211
224
  failed: 0,
212
225
  skipped: 0,
213
226
  skipped_trivial: 0,
227
+ skipped_automated: 0,
214
228
  billing_exhausted: 0,
215
229
  // `chars` is deliberately NOT here (ticket 3934). An hour in which the
216
230
  // hook ran and never printed has no recall to measure, and seeding 41
@@ -239,6 +253,7 @@ export function summariseMemoryHookWindow(file, event, options) {
239
253
  viaDirect: 0,
240
254
  viaMeasured: false,
241
255
  skippedTrivial: 0,
256
+ skippedAutomated: 0,
242
257
  billingExhausted: 0,
243
258
  chars: blankCharsHistogram(),
244
259
  charsMeasured: false,
@@ -265,6 +280,8 @@ export function summariseMemoryHookWindow(file, event, options) {
265
280
  // Absent means an older writer never counted one, which sums as zero and
266
281
  // is honest: that machine genuinely skipped none, because it could not.
267
282
  total.skippedTrivial += counts.skipped_trivial ?? 0;
283
+ // Same rule (BLI-25241): an older writer could not count a notification skip.
284
+ total.skippedAutomated += counts.skipped_automated ?? 0;
268
285
  // Same rule (BLI-3891): absent means an older writer never counted one,
269
286
  // which sums as zero and is honest — that machine genuinely had none it
270
287
  // could name.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bli-cockpit/telemetry-core",
3
- "version": "0.1.103",
3
+ "version": "0.1.104",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",