> For the complete documentation index, see [llms.txt](https://faction-os.gitbook.io/faction-os-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://faction-os.gitbook.io/faction-os-docs/.spec_system/archive/sessions/phase05-session05-federation-event-redaction-and-cockpit-integration/tasks.md).

# Task Checklist

**Session ID**: `phase05-session05-federation-event-redaction-and-cockpit-integration` **Total Tasks**: 22 **Estimated Duration**: 3-4 hours **Created**: 2026-05-30

***

## 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 | 9      | 9      | 0         |
| Testing        | 4      | 4      | 0         |
| **Total**      | **22** | **22** | **0**     |

***

## Setup (3 tasks)

Initial configuration and environment preparation.

### Cross-package

* [x] T001 \[S0505] Verify Sessions 01-04 War Room prerequisites, redaction baseline, and current safe socket frame behavior before widening federation (`.spec_system/PRD/phase_05/war_room_payload_redaction_baseline.md`)
* [x] T002 \[S0505] Verify existing protocol, Worker, web store, client, panel, battlefield, replay, and export tests that constrain redacted federation scope (`packages/protocol/tests/warroom.test.ts`)
* [x] T003 \[S0505] Confirm package README boundaries still mark Worker federation as optional external transfer before implementation edits (`apps/web/README_web.md`)

***

## Foundation (6 tasks)

Core contract, helper, and test foundations.

### packages/protocol

* [x] T004 \[S0505] Define redacted federation event allowlist types and validators with schema-validated input and explicit error mapping (`packages/protocol/src/warroom.ts`)
* [x] T005 \[S0505] \[P] Add protocol tests for allowlisted event families, invalid enum values, unknown fields, bounded strings, blocked nested keys, and catch-up typing (`packages/protocol/tests/warroom.test.ts`)

### apps/web

* [x] T006 \[S0505] \[P] Create outbound redaction and inbound remote-context helpers with types matching declared contract and exhaustive enum handling (`apps/web/src/lib/warRoomFederation.ts`)
* [x] T007 \[S0505] \[P] Add federation helper tests for blocked categories, bounded labels, local truth isolation, and safe inbound mapping (`apps/web/tests/warRoomFederation.test.ts`)
* [x] T008 \[S0505] Extend War Room store state for remote contexts, outbound send status, catch-up merge, and cleanup on scope exit for all acquired resources (`apps/web/src/store/useWarRoomStore.ts`)

### apps/warroom

* [x] T009 \[S0505] Update Worker socket test fixtures for redacted federation frames, sender exclusion, rejected sensitive frames, and catch-up assertions (`apps/warroom/tests/warroom.test.ts`)

***

## Implementation (9 tasks)

Main redacted federation implementation.

### packages/protocol

* [x] T010 \[S0505] Implement protocol parser support for compact hero state, bounded mission state, room notice, focus, cursor, and presence frames with authorization-adjacent blocked-field rejection (`packages/protocol/src/warroom.ts`)

### apps/warroom

* [x] T011 \[S0505] Implement Worker persistence, sender-excluded broadcast, and catch-up filtering for validated federation frames with timeout, retry/backoff, and failure-path handling preserved (`apps/warroom/src/index.ts`)

### apps/web

* [x] T012 \[S0505] Add typed socket send helper or connection send wrapper with duplicate-trigger prevention while in-flight and serialization failure handling (`apps/web/src/lib/warRoomClient.ts`)
* [x] T013 \[S0505] Implement outbound store action for redacted local cockpit context with authorization enforced at the connected-room boundary closest to the resource (`apps/web/src/store/useWarRoomStore.ts`)
* [x] T014 \[S0505] Handle inbound remote\_event and catch-up frames into dedicated remote context with state reset or revalidation on re-entry (`apps/web/src/store/useWarRoomStore.ts`)
* [x] T015 \[S0505] \[P] Create battlefield remote participant overlay with platform-appropriate accessibility labels, focus management, and input support (`apps/web/src/components/battlefield/RemoteParticipantOverlay.tsx`)
* [x] T016 \[S0505] Wire remote overlay into the battlefield without mutating local hero selection, local hero counts, or local mission truth (`apps/web/src/components/battlefield/Battlefield.tsx`)
* [x] T017 \[S0505] Update War Room panel federation summary, remote context counts, privacy copy, and unavailable states with explicit loading, empty, error, and offline states (`apps/web/src/components/WarRoomPanel.tsx`)
* [x] T018 \[S0505] Guard replay, export, notification, adapter, settings, and localStorage adjacency so remote room data is never persisted as local session truth (`apps/web/src/store/useWarRoomStore.ts`)

***

## Testing (4 tasks)

Verification and quality assurance.

### apps/warroom

* [x] T019 \[S0505] \[P] Add Worker tests for sensitive payload rejection before persistence, sender exclusion, catch-up filtering, recent-event caps, and safe error envelopes (`apps/warroom/tests/warroom.test.ts`)

### apps/web

* [x] T020 \[S0505] \[P] Add store and panel tests for outbound send gating, inbound remote context, privacy copy, cleanup, duplicate prevention, and sensitive-data absence (`apps/web/tests/warRoomStore.test.ts`)
* [x] T021 \[S0505] \[P] Add battlefield, replay, and export tests proving remote overlays are separate from local truth and remote frames do not enter replay/export payloads (`apps/web/tests/WarRoomBattlefieldOverlay.test.tsx`)

### Cross-package

* [x] T022 \[S0505] Run focused protocol, Worker, web, replay/export tests, relevant package typechecks, and ASCII/LF validation for all Session 05 files (`packages/protocol/tests/warroom.test.ts`)

***

## 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 implement workflow step to begin AI-led implementation.


---

# 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://faction-os.gitbook.io/faction-os-docs/.spec_system/archive/sessions/phase05-session05-federation-event-redaction-and-cockpit-integration/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.
