> 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/phase08-session04-war-room-and-hosted-identity-release-gate/tasks.md).

# Task Checklist

**Session ID**: `phase08-session04-war-room-and-hosted-identity-release-gate` **Total Tasks**: 25 **Estimated Duration**: 3-4 hours **Created**: 2026-05-31

***

## 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 | 13     | 13     | 0         |
| Testing        | 3      | 3      | 0         |
| **Total**      | **25** | **25** | **0**     |

***

## Setup (3 tasks)

Initial configuration and environment preparation.

### Cross-cutting

* [x] T001 \[S0804] Verify analyzer state, completed Sessions 01-03 prerequisites, Phase 08 routing, and cross-package package context before implementation (`.spec_system/PRD/phase_08/session_04_war_room_and_hosted_identity_release_gate.md`)
* [x] T002 \[S0804] Review Session 02/03 erasure inventory, Worker boundary rows, release risk matrix, hosted identity guardrails, and current War Room authority behavior before writing code (`.spec_system/PRD/phase_08/unified_erasure_inventory.md`)
* [x] T003 \[S0804] Create implementation note scaffold and record that Session 04 targets Worker room-state deletion plus hosted identity no-claim gates without full trusted unified erasure or active hosted auth claims (`.spec_system/specs/phase08-session04-war-room-and-hosted-identity-release-gate/implementation-notes.md`)

***

## Foundation (6 tasks)

Core structures and base implementations.

### packages/protocol

* [x] T004 \[S0804] Add Worker erasure preview/confirm contracts, confirmation phrase, response statuses, audit labels, verification labels, parser helpers, and exhaustive enum handling (`packages/protocol/src/warroom.ts`)
* [x] T005 \[S0804] \[P] Add Worker runtime claim labels and unsupported full-trusted-erasure guardrails derived from Phase 08 inventory (`packages/protocol/src/erasure.ts`)
* [x] T006 \[S0804] \[P] Add hosted identity release gate and no-claim summary derived from existing planned/unavailable guardrail contracts (`packages/protocol/src/hostedIdentity.ts`)

### apps/warroom

* [x] T007 \[S0804] \[P] Create Worker room erasure helper for sanitized previews, receipts, audit output, verification, partial-failure summaries, and no raw room/authority payload output (`apps/warroom/src/roomErasure.ts`)
* [x] T008 \[S0804] Update Worker erasure inventory metadata to expose room-state runtime and verification status without claiming full trusted unified erasure (`apps/warroom/src/erasureInventory.ts`)

### apps/web

* [x] T009 \[S0804] \[P] Add typed War Room erasure preview/confirm client helpers with explicit loading, timeout, malformed-response, authority-error, and offline states (`apps/web/src/lib/warRoomClient.ts`)

***

## Implementation (13 tasks)

Main feature implementation.

### apps/warroom

* [x] T010 \[S0804] Wire Durable Object `/erasure/preview` and `/erasure/confirm` routes with schema-validated input and explicit error mapping (`apps/warroom/src/index.ts`)
* [x] T011 \[S0804] Enforce room leader authority, expected revision, confirmation phrase, and idempotency key at the Durable Object boundary closest to room storage (`apps/warroom/src/index.ts`)
* [x] T012 \[S0804] Implement confirmed room-state deletion, socket closure, redacted erasure receipt storage, duplicate-trigger handling, and post-delete verification with partial-failure reporting (`apps/warroom/src/index.ts`)
* [x] T013 \[S0804] \[P] Write Worker helper tests for sanitized preview counts, absent/unknown state, stale authority counts, duplicate idempotency counts, receipts, verification, and partial failures (`apps/warroom/tests/roomErasure.test.ts`)
* [x] T014 \[S0804] Write Durable Object route tests for preview, confirm, room absence, leader authority, non-leader authority, stale revision, duplicate requests, replayed idempotency keys, socket closure, and redaction (`apps/warroom/tests/warroom.test.ts`)
* [x] T015 \[S0804] \[P] Write routed Worker tests for erasure endpoint CORS, malformed requests, authority failures, no raw response output, and room not found behavior (`apps/warroom/tests/worker.test.ts`)

### packages/protocol

* [x] T016 \[S0804] \[P] Write protocol tests for Worker erasure contracts, parser failures, confirmation requirements, audit/verification labels, hosted identity no-claim gate, and unsupported full-erasure claims (`packages/protocol/tests/warroom.test.ts`)

### apps/server

* [x] T017 \[S0804] Add hosted identity release gate fields to diagnostics snapshots without enabling hosted account runtime, OAuth, SSO, organization, analytics consent, production audit, or trusted erasure claims (`apps/server/src/lib/hostedIdentity.ts`)
* [x] T018 \[S0804] \[P] Write server hosted identity diagnostics tests for release gate no-claim status, auth boundary, env redaction, account value redaction, and raw authority value redaction (`apps/server/tests/hostedIdentityDiagnostics.test.ts`)

### apps/web

* [x] T019 \[S0804] Update War Room leave/reset, authority, and erasure copy to distinguish browser context reset, Worker room-state deletion, hosted identity, production-hosted validation, and full trusted unified erasure (`apps/web/src/lib/warRoomUi.ts`)
* [x] T020 \[S0804] Update War Room store/panel state for Worker erasure preview/confirm visibility, in-flight guard, reset-on-reentry behavior, and no-overclaim messaging (`apps/web/src/store/useWarRoomStore.ts`)
* [x] T021 \[S0804] \[P] Write web tests for War Room erasure client behavior, hosted identity release gate copy, leave/reset no-overclaim wording, disabled/unavailable states, focus behavior, and redacted output (`apps/web/tests/warRoomClient.test.ts`)

### Cross-cutting docs

* [x] T022 \[S0804] Update release, privacy/security, API, hosted-services, environment, War Room README, web README, and runbook docs for Worker erasure behavior, hosted identity no-claim gates, and residual full-trusted-erasure limitations (`docs/release.md`)

***

## Testing (3 tasks)

Verification and quality assurance.

### Cross-cutting

* [x] T023 \[S0804] Run focused Vitest coverage and affected typechecks for protocol, warroom, web, and server hosted identity release gate work (`package.json`)
* [x] T024 \[S0804] Run docs/no-overclaim grep review plus whitespace, ASCII, LF, and `git diff --check` validation, then record command outcomes and residual risks (`.spec_system/specs/phase08-session04-war-room-and-hosted-identity-release-gate/implementation-notes.md`)
* [x] T025 \[S0804] Validate task checklist, implementation notes handoff, ASCII/LF status, and next-step readiness for the validate workflow after implementation completes (`.spec_system/specs/phase08-session04-war-room-and-hosted-identity-release-gate/tasks.md`)

***

## 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 for independent implementation validation.


---

# 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/phase08-session04-war-room-and-hosted-identity-release-gate/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.
