> 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/phase06-session02-room-authority-and-participant-identity-contracts/tasks.md).

# Task Checklist

**Session ID**: `phase06-session02-room-authority-and-participant-identity-contracts` **Total Tasks**: 24 **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          | 2      | 2      | 0         |
| Foundation     | 4      | 4      | 0         |
| Implementation | 13     | 13     | 0         |
| Testing        | 5      | 5      | 0         |
| **Total**      | **24** | **24** | **0**     |

***

## Setup (2 tasks)

Initial context verification and implementation note setup.

* [x] T001 \[S0602] Review Session 01 baseline, routing matrix, Session 02 stub, and package READMEs; record cross-package scope (`.spec_system/specs/phase06-session02-room-authority-and-participant-identity-contracts/implementation-notes.md`)
* [x] T002 \[S0602] Verify focused War Room baseline commands and no-Cloudflare credential assumptions before code changes (`.spec_system/specs/phase06-session02-room-authority-and-participant-identity-contracts/implementation-notes.md`)

***

## Foundation (4 tasks)

Shared contracts and Worker authority foundation.

* [x] T003 \[S0602] Extend War Room authority, revision, expiration, idempotency, and deterministic error contracts (`packages/protocol/src/warroom.ts`) with schema-validated input and explicit error mapping
* [x] T004 \[S0602] \[P] Add protocol authority parser and contract tests (`packages/protocol/tests/warroom.test.ts`) with exhaustive enum handling and malformed-input coverage
* [x] T005 \[S0602] Create room-local Worker authority helper (`apps/warroom/src/authority.ts`) with expiration, rotation, duplicate-action idempotency, and replay failure handling
* [x] T006 \[S0602] \[P] Add Worker authority helper unit tests (`apps/warroom/tests/authority.test.ts`) with expired, mismatched, rotated, duplicate, and replayed authority cases

***

## Implementation (13 tasks)

Main cross-package authority behavior.

* [x] T007 \[S0602] Update Worker create, join, and snapshot behavior (`apps/warroom/src/index.ts`) with authority issuance, room revision metadata, and duplicate-trigger prevention while in-flight
* [x] T008 \[S0602] Harden Worker approve and reject behavior (`apps/warroom/src/index.ts`) with leader authority, expected revision, stale-decision errors, idempotency protection, transaction boundaries, and compensation on failure
* [x] T009 \[S0602] Harden Worker socket and reconnect behavior (`apps/warroom/src/index.ts`) with participant authority, pending-state rejection, expiration handling, and cleanup on socket replacement
* [x] T010 \[S0602] Extend Worker lifecycle tests (`apps/warroom/tests/warroom.test.ts`) with stale, duplicate, expired, malformed, mismatched, replayed, reconnect, and unavailable authority flows
* [x] T011 \[S0602] Update web War Room client requests and response parsing (`apps/web/src/lib/warRoomClient.ts`) with authority metadata, expected revisions, new error codes, timeout handling, and explicit failure mapping
* [x] T012 \[S0602] Update browser identity hint handling (`apps/web/src/lib/warRoomIdentity.ts`) to separate display hints from authority state with state reset or revalidation on re-entry
* [x] T013 \[S0602] Update War Room store authority state (`apps/web/src/store/useWarRoomStore.ts`) with duplicate-trigger guards, stale snapshot revalidation, Worker URL change cleanup, and scoped rollback on error
* [x] T014 \[S0602] Update War Room UI copy helpers (`apps/web/src/lib/warRoomUi.ts`) with bounded authority, expired, replay, mismatch, non-leader, and stale-state messages
* [x] T015 \[S0602] Update War Room panel authority display (`apps/web/src/components/WarRoomPanel.tsx`) with explicit loading, empty, error, offline states, accessible labels, focus-safe controls, and no hosted-identity wording
* [x] T016 \[S0602] \[P] Document protocol authority ownership and proof limits (`packages/protocol/README_protocol.md`)
* [x] T017 \[S0602] \[P] Document Worker authority behavior, compact errors, and non-hosted identity limits (`apps/warroom/README_warroom.md`)
* [x] T018 \[S0602] \[P] Document browser authority state, local-only fallback, stale-state cleanup, and non-erasure wording (`apps/web/README_web.md`)
* [x] T019 \[S0602] \[P] Update stable API, privacy, and War Room operations docs (`docs/api/README_api.md`, `docs/privacy-and-security.md`, `docs/runbooks/war-room-operations.md`) with authority metadata limits and Phase 07/08 deferrals

***

## Testing (5 tasks)

Focused verification and session closeout evidence.

* [x] T020 \[S0602] \[P] Extend web client authority tests (`apps/web/tests/warRoomClient.test.ts`) with request bodies, socket URL handling, new error mapping, and sensitive-output exclusions
* [x] T021 \[S0602] \[P] Extend web store authority tests (`apps/web/tests/warRoomStore.test.ts`) with create, join, approve, reject, reconnect, Worker URL change, hydration, duplicate, stale, and rollback flows
* [x] T022 \[S0602] \[P] Extend War Room panel authority tests (`apps/web/tests/WarRoomPanel.test.tsx`) with visible authority state, bounded failures, accessible labels, and no hosted-identity wording
* [x] T023 \[S0602] Run focused protocol, Worker, and web War Room tests plus package typechecks; record command results (`.spec_system/specs/phase06-session02-room-authority-and-participant-identity-contracts/implementation-notes.md`)
* [x] T024 \[S0602] Validate ASCII encoding and LF line endings for changed files; update implementation notes (`.spec_system/specs/phase06-session02-room-authority-and-participant-identity-contracts/implementation-notes.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 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://faction-os.gitbook.io/faction-os-docs/.spec_system/archive/sessions/phase06-session02-room-authority-and-participant-identity-contracts/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.
