> 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/sessions/phase24-session03-browser-safe-evidence-assets-file-hardening/tasks.md).

# Task Checklist

**Session ID**: `phase24-session03-browser-safe-evidence-assets-file-hardening` **Total Tasks**: 25 **Estimated Duration**: 3.5-4 hours **Created**: 2026-06-07

***

## Legend

* `[x]` = Completed
* `[ ]` = Pending
* `[P]` = Parallelizable (can run with other \[P] tasks)
* `[SNNMM]` = Session reference (NN=phase number, MM=session number)
* `TNNN` = Task ID

***

## Progress Summary

| Category       | Total  | Done   | Remaining |
| -------------- | ------ | ------ | --------- |
| Setup          | 3      | 3      | 0         |
| Foundation     | 6      | 6      | 0         |
| Implementation | 12     | 12     | 0         |
| Testing        | 4      | 4      | 0         |
| **Total**      | **25** | **25** | **0**     |

***

## Setup (3 tasks)

Initial verification and environment preparation.

* [x] T001 \[S2403] Verify current source compliance asset permissions and default blocked states (`docs/sources/source-compliance-youtube.md`)
* [x] T002 \[S2403] Confirm private generated asset roots and ignored cache conventions (`.gitignore`)
* [x] T003 \[S2403] Confirm current Trend Finder bridge registration and token patterns (`vite.config.ts`)

***

## Foundation (6 tasks)

Core contracts and base implementations.

* [x] T004 \[S2403] \[P] Extend Trend Finder browser schema with additive evidence asset and asset run summary defaults with types matching declared contract and exhaustive enum handling (`src/extensions/trend-finder/schema.ts`)
* [x] T005 \[S2403] \[P] Extend Engine Trace browser schema with bounded asset summary states and deterministic ordering (`src/extensions/trend-finder/engine-trace.ts`)
* [x] T006 \[S2403] \[P] Create private evidence asset manifest helper with schema-validated entries, path containment, atomic writes, and idempotency protection (`scripts/extensions/trend-finder/evidence-assets.ts`)
* [x] T007 \[S2403] \[P] Extend source adapter contracts for reviewed asset candidates and source support metadata with compliance enforced at the boundary closest to the source (`scripts/extensions/trend-finder/sources/types.ts`)
* [x] T008 \[S2403] \[P] Create token-gated local asset file bridge with loopback checks, explicit roots, content-type allowlists, bounded file sizes, and no-store dynamic responses (`scripts/lib/trend-finder-asset-bridge.ts`)
* [x] T009 \[S2403] Register the asset bridge in Vite middleware with explicit generated roots and refresh-token authorization (`vite.config.ts`)

***

## Implementation (12 tasks)

Main feature implementation.

* [x] T010 \[S2403] Derive reviewed asset candidate states from Apify normalization while keeping unapproved media, thumbnails, transcripts, and raw fields blocked (`scripts/extensions/trend-finder/sources/apify-normalizers.ts`)
* [x] T011 \[S2403] Merge asset manifest state into collected evidence with schema-validated input and explicit error mapping (`scripts/extensions/trend-finder/collector.ts`)
* [x] T012 \[S2403] Prune stale asset manifest entries from the active evidence keep set with cleanup on scope exit for all acquired resources (`scripts/extensions/trend-finder/collector.ts`)
* [x] T013 \[S2403] Emit sanitized asset trace events and summaries with unsafe key/value rejection (`scripts/extensions/trend-finder/engine-trace.ts`)
* [x] T014 \[S2403] Project asset summary metrics and notes into Engine Replay with explicit loading, empty, error, and offline states (`src/extensions/trend-finder/engine-replay-model.ts`)
* [x] T015 \[S2403] Add asset preview fields and fallback labels to evidence view models with exhaustive asset status handling (`src/extensions/trend-finder/view-model.ts`)
* [x] T016 \[S2403] \[P] Create compact accessible evidence asset preview component with stable dimensions, alt text, focus support, and blocked/missing/pruned fallbacks (`src/extensions/trend-finder/components/evidence-asset-preview.tsx`)
* [x] T017 \[S2403] Wire evidence asset preview into evidence cards with platform-appropriate accessibility labels, focus management, and input support (`src/extensions/trend-finder/components/evidence-links.tsx`)
* [x] T018 \[S2403] Surface asset availability, failure, and pruning states in Engine Replay view without exposing private paths (`src/extensions/trend-finder/views/engine-replay-view.tsx`)
* [x] T019 \[S2403] Update Trend Finder fixtures with available, unsupported, blocked, failed, missing, and pruned asset states (`src/extensions/trend-finder/fixtures.ts`)
* [x] T020 \[S2403] Update committed live-data fallback shape for additive asset fields (`src/data/live-data.example.json`)
* [x] T021 \[S2403] Update Trend Finder UI, pipeline, and runtime provenance docs for asset contracts, retention, pruning, and bridge hardening (`docs/extensions/trend-finder-ui-surfaces.md`)

***

## Testing (4 tasks)

Verification and quality assurance.

* [x] T022 \[S2403] \[P] Write evidence asset helper tests for manifest validation, root containment, atomic writes, blocked states, keep sets, and stale pruning (`scripts/extensions/trend-finder/__tests__/evidence-assets.test.ts`)
* [x] T023 \[S2403] \[P] Write asset bridge tests for method, token, loopback, traversal, content-type, missing file, oversized file, and header behavior (`scripts/lib/__tests__/trend-finder-asset-bridge.test.ts`)
* [x] T024 \[S2403] Extend Trend Finder schema, collector, and Engine Replay tests for asset defaults, summaries, warnings, and UI fallback states (`src/lib/__tests__/trend-finder-schema.test.ts`)
* [x] T025 \[S2403] Run focused Trend Finder tests, bridge tests, docs checks, and ASCII validation (`package.json`)

***

## Completion Checklist

Before marking session complete:

* [x] All tasks marked `[x]`
* [x] All tests passing
* [x] All files ASCII-encoded
* [x] implementation-notes.md updated
* [x] Ready for the validate workflow step

***

## Next Steps

Run the validate workflow step to verify session completeness.


---

# 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/sessions/phase24-session03-browser-safe-evidence-assets-file-hardening/tasks.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.
