> For the complete documentation index, see [llms.txt](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/phases/phase_29/session_09_source_death_baseline_alarm.md).

# Session 09: Source-Death Baseline Alarm

**Session ID**: `phase29-session09-source-death-baseline-alarm` **Status**: Not Started **Estimated Tasks**: \~12-25 **Estimated Duration**: 2-4 hours

***

## Objective

Distinguish a genuinely quiet run from a silent source or adapter death. Maps the Tier 3 source-death baseline alarm idea.

***

## Scope

### In Scope (MVP)

* Persist a private last-good per-source evidence-count baseline keyed by source ID.
* Warn when a configured source that previously returned evidence now returns zero accepted rows.
* Distinguish disabled/unconfigured/skipped sources from source-death warnings.
* Surface the warning in collection health and Engine Replay without exposing private baseline paths.

### Out of Scope

* Auto-disabling or re-enabling any source.
* Exposing the private baseline file path or counts beyond safe warning labels.

***

## Prerequisites

* [ ] Session 07 complete (uses the narrated trace/warning path established there).

***

## Deliverables

1. Private last-good per-source baseline keyed by source ID.
2. Source-death warning that excludes disabled/unconfigured/skipped sources.
3. Collection-health and Engine Replay surfacing without private paths.
4. Unit tests for zeroed-live, first-run, and disabled-source cases.

***

## Success Criteria

* [ ] A zeroed previously-live source trips a source-death warning.
* [ ] A first run and a disabled source do not trip the warning.
* [ ] No private baseline path or raw count leaks into browser-safe surfaces.
* [ ] Payload budget and privacy scans remain green.

***

## Key Files

* `scripts/extensions/trend-finder/collector.ts`
* `scripts/extensions/trend-finder/engine-trace.ts`
* `scripts/extensions/trend-finder/private-diagnostics.ts`
* `src/extensions/trend-finder/schema.ts`
* `src/extensions/trend-finder/view-model.ts`
* `src/extensions/trend-finder/views/sources-view.tsx`
* `src/extensions/trend-finder/engine-replay-model.ts`

***

## Comparison Notes (folded from comparison plan)

**Effort:** Medium. **Boundary risk:** None. Tier 3 polish. **Depends on Session 07** - uses the narrated trace/warning path established there.

**Source-death baseline alarm.** TrendingAI compares current per-source counts with `data/.source-baseline.json` and warns when a previously live source returns zero. Trend Finder adoption: persist a private last-good per-source baseline and distinguish silent adapter/feed death from a quiet run.

**TrendingAI source pointers.** `src/harvesters/orchestrator.ts` (`checkSourceDeath`).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/phases/phase_29/session_09_source_death_baseline_alarm.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
