mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 06:06:10 +00:00
chore(release): v1.4.38.7
Rollup recompute observability + admin trigger. - POST /api/admin/rollups/recompute synchronously folds one user or re-runs the boot-discovery loop on demand. Admin-gated. - slim_summaries live-fallback now annotates `fallback_reason` and `missing_types[]` so the operator can map a slow cold-mount to the type missing DAY-bucket coverage without DB shell access. - Boot-backfill discovery now logs every result, including the silent "no users to backfill" case — the previous shape made it impossible to tell "discovery ran cleanly + found nothing" apart from "discovery never executed". See CHANGELOG.md.
This commit is contained in:
1 parent
80b1fcb8d0
commit
9cc5ececa7
5 files changed
+175
-2
No files matched your search
@@ -217,6 +217,26 @@ export async function computeSummariesSlice(
|
||||
if (isFullyCovered(coverage)) {
|
||||
return computeFromRollups(userId);
|
||||
}
|
||||
// v1.4.38.7 — annotate the live fallback with the per-type
|
||||
// coverage map so the operator can see WHICH type stranded the
|
||||
// request on the live aggregator. Without this the wide-event only
|
||||
// says `path:"live"`, and "why" requires shell access to the DB.
|
||||
const missing: string[] = [];
|
||||
for (const [type, hasBuckets] of coverage.entries()) {
|
||||
if (!hasBuckets) missing.push(type);
|
||||
}
|
||||
annotate({
|
||||
meta: {
|
||||
analytics: {
|
||||
slim_summaries: {
|
||||
fallback_reason: "partial_rollup_coverage",
|
||||
missing_types: missing,
|
||||
covered_count: coverage.size - missing.length,
|
||||
total_types: coverage.size,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
return computeFromLiveAggregate(userId);
|
||||
}
|
||||
|
||||
|
||||
@@ -1960,7 +1960,13 @@ export async function startReminderWorker() {
|
||||
"error",
|
||||
`[rollup-full-backfill] boot discovery failed: ${error}`,
|
||||
);
|
||||
} else if (enqueued > 0 || skipped > 0) {
|
||||
} else {
|
||||
// v1.4.38.7 — log the discovery result on every boot, including
|
||||
// the silent `enqueued=0 skipped=0` case. Without this, an
|
||||
// operator chasing "analytics is slow" cannot tell whether the
|
||||
// discovery query ran successfully (and found nothing to fold)
|
||||
// vs. silently no-op'd. The line is one row per worker boot, so
|
||||
// the log cost is negligible.
|
||||
workerLog(
|
||||
"info",
|
||||
`[rollup-full-backfill] boot discovery: enqueued=${enqueued} skipped=${skipped}`,
|
||||
|
||||
Reference in new issue
Block a user