> 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-session06-deployment-environment-and-diagnostics/tasks.md).

# Task Checklist

**Session ID**: `phase05-session06-deployment-environment-and-diagnostics` **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     | 5      | 5      | 0         |
| Implementation | 10     | 10     | 0         |
| Testing        | 4      | 4      | 0         |
| **Total**      | **22** | **22** | **0**     |

***

## Setup (3 tasks)

Initial configuration and environment preparation.

### Cross-package

* [x] T001 \[S0506] Verify Sessions 03-05 validation, redacted federation boundaries, and current Worker deployment docs before planning diagnostics (`.spec_system/specs/phase05-session05-federation-event-redaction-and-cockpit-integration/validation.md`)
* [x] T002 \[S0506] Review current web/Worker docs for stale stub wording, Worker URL assumptions, health checks, and Cloudflare credential boundaries (`docs/deployment.md`)
* [x] T003 \[S0506] Confirm no database, schema migration, hosted auth, analytics, public replay, or required Cloudflare credential scope is introduced (`.spec_system/CONVENTIONS.md`)

***

## Foundation (5 tasks)

Core structures and base implementations.

### apps/web

* [x] T004 \[S0506] \[P] Create War Room diagnostic helper for Worker URL source labels, health states, safe copy, and local-only fallbacks with explicit loading, empty, error, and offline states (`apps/web/src/lib/warRoomDiagnostics.ts`)
* [x] T005 \[S0506] \[P] Add diagnostic helper tests for default/custom/local URLs, rate-limit copy, stale state prevention, and sensitive-data absence (`apps/web/tests/warRoomDiagnostics.test.ts`)
* [x] T006 \[S0506] Extend War Room client health response parsing and failure mapping with timeout, rate-limit, malformed response, and unavailable handling (`apps/web/src/lib/warRoomClient.ts`)

### apps/warroom

* [x] T007 \[S0506] Add compact Worker health metadata for service, time, rate-limit config, and deployment-safe labels without account ids or request details (`apps/warroom/src/index.ts`)
* [x] T008 \[S0506] \[P] Add Worker health tests for metadata, no sensitive fields, and rate-limit values (`apps/warroom/tests/warroom.test.ts`)

***

## Implementation (10 tasks)

Main feature implementation.

### apps/web

* [x] T009 \[S0506] Implement browser-safe default Worker URL loading before localStorage overrides with state reset or revalidation on re-entry (`apps/web/src/lib/warRoomIdentity.ts`)
* [x] T010 \[S0506] Add War Room store diagnostic state and health-check action with duplicate-trigger prevention while in-flight and cleanup on Worker URL change (`apps/web/src/store/useWarRoomStore.ts`)
* [x] T011 \[S0506] Render War Room diagnostics controls, health status, rate-limit copy, and unavailable states with platform-appropriate accessibility labels, focus management, and input support (`apps/web/src/components/WarRoomPanel.tsx`)

### apps/warroom

* [x] T012 \[S0506] Add bounded post-deploy Worker health smoke check to the deploy workflow with secret-safe output and failure-path handling (`.github/workflows/warroom-deploy.yml`)

### Docs

* [x] T013 \[S0506] Update environment inventory for browser-safe Worker URL defaults, local Wrangler URL, deployed health URLs, and disabled-state behavior (`.env.local.example`)
* [x] T014 \[S0506] Update environment docs for active web Worker variables, operational Cloudflare variables, and future hosted-service boundaries (`docs/environments.md`)
* [x] T015 \[S0506] Update deployment and API docs for Worker health, custom domain, local Wrangler, rate limits, socket upgrade checks, and rollback commands (`docs/deployment.md`)
* [x] T016 \[S0506] Update architecture, privacy, and release guidance to remove stale stub wording and document optional redacted Worker diagnostics (`docs/ARCHITECTURE.md`)
* [x] T017 \[S0506] Create War Room operations runbook for local/deployed health checks, rate-limit/WAF posture, Wrangler tail, rollback, and privacy-safe incident notes (`docs/runbooks/war-room-operations.md`)
* [x] T018 \[S0506] Update package README boundaries for web diagnostics, Worker health metadata, deploy checks, and remaining Session 07 validation scope (`apps/web/README_web.md`)

***

## Testing (4 tasks)

Verification and quality assurance.

### apps/web

* [x] T019 \[S0506] \[P] Add client tests for enriched health parsing, invalid URLs, timeout/offline states, 429 retry-after copy, and malformed response handling (`apps/web/tests/warRoomClient.test.ts`)
* [x] T020 \[S0506] \[P] Add store and panel tests for health diagnostics, in-flight guards, Worker URL cleanup, accessible status regions, and sensitive-data absence (`apps/web/tests/warRoomStore.test.ts`)

### Cross-package

* [x] T021 \[S0506] \[P] Update workflow, runbook, web README, War Room README, API, privacy, and release docs for command consistency and stale-stub removal (`apps/warroom/README_warroom.md`)
* [x] T022 \[S0506] Run focused Worker/web tests, relevant package typechecks, workflow YAML review, docs-sensitive string review, and ASCII/LF validation for all Session 06 files (`apps/web/tests/warRoomDiagnostics.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-session06-deployment-environment-and-diagnostics/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.
