> 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_15/session_06_cross_job_integration_dream_freshness.md).

# Session 06: Cross-Job Integration And Dream Freshness Boundary

**Session ID**: `phase15-session06-cross-job-integration-dream-freshness` **Status**: Complete **Estimated Tasks**: \~14 **Estimated Duration**: 2-4 hours

***

## Objective

Prove scoped jobs can run in either order without erasing data and Dream can use recent agent aggregate data without forcing a Trend Finder refresh.

This session validates the interaction between Sessions 03-05 and closes the main risks before any timer-management work.

***

## Scope

### In Scope (MVP)

* Cross-job integration tests for agent and Trend Finder scoped writes
* Dream freshness checks against recent host/local aggregate data
* Status semantics for defaults, local timer intent, latest run state, and generated-data freshness
* Warning behavior for stale or missing scoped data
* Documentation of scoped job ordering and Dream boundaries
* Privacy checks for status output, summary logs, browser metadata, and committed templates

### Out of Scope

* Browser gateway or live control surface
* New Dream runtime features
* Timer installation

***

## Detailed Tasks

1. Add cross-job integration coverage for `agent-aggregate` followed by `trend-finder`.
2. Add cross-job integration coverage for `trend-finder` followed by `agent-aggregate`.
3. Verify scoped jobs do not erase each other's data in either run order.
4. Verify Dream can use recent host/local aggregate data without triggering Trend Finder.
5. Add stale or missing scoped-data warning behavior.
6. Ensure status distinguishes registry defaults, local timer intent, latest run state, and actual generated-data freshness.
7. Confirm generated-data freshness is not conflated with latest scheduler run state.
8. Confirm Dream freshness does not imply a browser gateway or live control surface.
9. Confirm Dream does not unexpectedly run heavy collectors unless explicitly configured.
10. Keep secrets, raw source payloads, prompts, auth paths, private machine paths, command bodies, Actor inputs, provider auth paths, and source dumps out of status output, summary logs, browser metadata, and committed templates.
11. Document scoped job ordering, freshness semantics, and Dream boundaries.
12. Run focused scheduler, aggregate, Dream, extension runner, and Trend Finder tests needed to validate cross-job behavior.

***

## Prerequisites

* [ ] Session 05 complete.
* [ ] Both scoped scheduler jobs are implemented.

***

## Deliverables

1. Integration tests for scoped jobs running in either order.
2. Dream freshness boundary checks.
3. Status and docs updates for freshness semantics.

***

## Handoff Gate

* [ ] Dream can use recent agent aggregate data without forcing Trend Finder.
* [ ] Scoped jobs can run in either order without erasing data.
* [ ] Status distinguishes defaults, local timer intent, latest run state, and actual generated-data freshness.

***

## Success Criteria

* [ ] Scoped jobs do not erase each other's data in either run order.
* [ ] Dream can use recent agent data without forcing Trend Finder.
* [ ] Status clearly distinguishes run state from generated-data freshness.


---

# 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_15/session_06_cross_job_integration_dream_freshness.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.
