@bli-cockpit/telemetry-core 0.1.102 → 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.
|
@@ -100,6 +100,19 @@ export declare const CollectorDiskReadingSchema: z.ZodObject<{
|
|
|
100
100
|
}>;
|
|
101
101
|
}, z.core.$strict>;
|
|
102
102
|
export type CollectorDiskReading = z.infer<typeof CollectorDiskReadingSchema>;
|
|
103
|
+
/**
|
|
104
|
+
* Ticket 24980. Raw evidence this machine staged and Tower never accepted, for longer than
|
|
105
|
+
* `STUCK_EVIDENCE_AFTER_HOURS`. Before this the count lived only in the laptop's own `cockpit status`:
|
|
106
|
+
* 65 objects on the reference Mac failed from 2026-10-17 while doctor, Setup and the ops board read green.
|
|
107
|
+
* A count and the reason most of them carry, nothing else. A staged copy whose bytes are gone from the
|
|
108
|
+
* disk is not counted: there is nothing left to send, and its session re-stages from the source.
|
|
109
|
+
*/
|
|
110
|
+
export declare const STUCK_EVIDENCE_AFTER_HOURS = 24;
|
|
111
|
+
export declare const RawEvidenceStuckReadingSchema: z.ZodObject<{
|
|
112
|
+
object_count: z.ZodNumber;
|
|
113
|
+
top_reason: z.ZodNullable<z.ZodString>;
|
|
114
|
+
}, z.core.$strict>;
|
|
115
|
+
export type RawEvidenceStuckReading = z.infer<typeof RawEvidenceStuckReadingSchema>;
|
|
103
116
|
export declare const CollectorHeartbeatSchema: z.ZodObject<{
|
|
104
117
|
schema_version: z.ZodLiteral<"collector-heartbeat.v1">;
|
|
105
118
|
generated_at: z.ZodString;
|
|
@@ -146,6 +159,10 @@ export declare const CollectorHeartbeatSchema: z.ZodObject<{
|
|
|
146
159
|
staging_at_cap: "staging_at_cap";
|
|
147
160
|
}>;
|
|
148
161
|
}, z.core.$strict>>;
|
|
162
|
+
raw_evidence_stuck: z.ZodOptional<z.ZodObject<{
|
|
163
|
+
object_count: z.ZodNumber;
|
|
164
|
+
top_reason: z.ZodNullable<z.ZodString>;
|
|
165
|
+
}, z.core.$strict>>;
|
|
149
166
|
memory_install: z.ZodOptional<z.ZodObject<{
|
|
150
167
|
schema_version: z.ZodLiteral<"memory-install-receipt.v1">;
|
|
151
168
|
checked_at: z.ZodString;
|
|
@@ -98,6 +98,20 @@ export const CollectorDiskReadingSchema = z
|
|
|
98
98
|
gate: CollectorDiskGateSchema,
|
|
99
99
|
})
|
|
100
100
|
.strict();
|
|
101
|
+
/**
|
|
102
|
+
* Ticket 24980. Raw evidence this machine staged and Tower never accepted, for longer than
|
|
103
|
+
* `STUCK_EVIDENCE_AFTER_HOURS`. Before this the count lived only in the laptop's own `cockpit status`:
|
|
104
|
+
* 65 objects on the reference Mac failed from 2026-10-17 while doctor, Setup and the ops board read green.
|
|
105
|
+
* A count and the reason most of them carry, nothing else. A staged copy whose bytes are gone from the
|
|
106
|
+
* disk is not counted: there is nothing left to send, and its session re-stages from the source.
|
|
107
|
+
*/
|
|
108
|
+
export const STUCK_EVIDENCE_AFTER_HOURS = 24;
|
|
109
|
+
export const RawEvidenceStuckReadingSchema = z
|
|
110
|
+
.object({
|
|
111
|
+
object_count: z.number().int().nonnegative().max(1_000_000),
|
|
112
|
+
top_reason: z.string().trim().min(1).max(120).regex(/^[a-z0-9_:.-]+$/iu).nullable(),
|
|
113
|
+
})
|
|
114
|
+
.strict();
|
|
101
115
|
export const CollectorHeartbeatSchema = z
|
|
102
116
|
.object({
|
|
103
117
|
schema_version: z.literal(COLLECTOR_HEARTBEAT_SCHEMA_VERSION),
|
|
@@ -208,6 +222,8 @@ export const CollectorHeartbeatSchema = z
|
|
|
208
222
|
* predates it or could not measure", never "the disk is fine".
|
|
209
223
|
*/
|
|
210
224
|
disk: CollectorDiskReadingSchema.optional(),
|
|
225
|
+
/** Ticket 24980. Evidence never accepted for over a day. Absent: an older collector, or a read that failed. */
|
|
226
|
+
raw_evidence_stuck: RawEvidenceStuckReadingSchema.optional(),
|
|
211
227
|
/**
|
|
212
228
|
* BLI-3729. Is BLI Memory actually switched on for both agent hosts on
|
|
213
229
|
* this machine? Six words computed by reading the host configs BACK, not
|
|
@@ -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
|
|
59
|
-
* unchanged refusal about every six hours
|
|
60
|
-
* ongoing outage the moment the window
|
|
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
|
|
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.
|