> 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/phase17-session03-server-routes-and-websocket-parity/tasks.md).

# Task Checklist

**Session ID**: `phase17-session03-server-routes-and-websocket-parity` **Total Tasks**: 24 **Estimated Duration**: 3-4 hours **Created**: 2026-06-05

***

## Legend

* `[x]` = Completed
* `[ ]` = Pending
* `[P]` = Parallelizable (can run with other \[P] tasks)
* `[S1703]` = Session reference (phase 17, session 03)
* `TNNN` = Task ID

***

## Progress Summary

| Category       | Total  | Done   | Remaining |
| -------------- | ------ | ------ | --------- |
| Setup          | 3      | 3      | 0         |
| Foundation     | 5      | 5      | 0         |
| Implementation | 12     | 12     | 0         |
| Testing        | 4      | 4      | 0         |
| **Total**      | **24** | **24** | **0**     |

***

## Setup (3 tasks)

Initial verification and route placement preparation.

### apps/server

* [x] T001 \[S1703] Verify Session 01 protocol and Session 02 manager prerequisites against current server callers (`apps/server/src/managers/noticeBoard.ts`)
* [x] T002 \[S1703] Audit current Notice Board route ownership and mount order for canonical router extraction (`apps/server/src/routes/heroes.ts`)
* [x] T003 \[S1703] Audit current WebSocket hydration and `post_notice` handling for expanded notice fields (`apps/server/src/ws/handlers.ts`)

***

## Foundation (5 tasks)

Shared contracts, validation scaffolding, and route module setup.

### packages/protocol

* [x] T004 \[S1703] \[P] Extend Notice Board event contract tests for hydrate, message, resolve, and expanded `post_notice` shapes (`packages/protocol/tests/events.test.ts`)
* [x] T005 \[S1703] \[P] Extend Notice Board REST contract tests for canonical and compatibility route response types (`packages/protocol/tests/rest.test.ts`)

### apps/server

* [x] T006 \[S1703] Create dedicated Notice Board router scaffold with route-local validation helpers and compact error mapping (`apps/server/src/routes/noticeBoard.ts`)
* [x] T007 \[S1703] Mount Notice Board router in root and `/api` route groups before generic read routes (`apps/server/src/server.ts`)
* [x] T008 \[S1703] Remove legacy Notice Board handlers from the generic read router after dedicated router mount (`apps/server/src/routes/heroes.ts`)

***

## Implementation (12 tasks)

Canonical routes, compatibility adapters, and WebSocket parity.

### apps/server

* [x] T009 \[S1703] Implement active-room resolution helper for canonical routes with local fallback and explicit room override handling (`apps/server/src/routes/noticeBoard.ts`)
* [x] T010 \[S1703] Implement `GET /notice-board` query validation and manager list mapping with bounded pagination, validated filters, and deterministic ordering (`apps/server/src/routes/noticeBoard.ts`)
* [x] T011 \[S1703] Implement compatibility `GET /notices` adapter returning `{ notices }` from the same manager list path (`apps/server/src/routes/noticeBoard.ts`)
* [x] T012 \[S1703] Implement `GET /notice-board/context` validation and context response mapping with schema-validated input and explicit error mapping (`apps/server/src/routes/noticeBoard.ts`)
* [x] T013 \[S1703] Implement canonical `POST /notice-board` body validation with duplicate-trigger prevention while in-flight and schema-validated input (`apps/server/src/routes/noticeBoard.ts`)
* [x] T014 \[S1703] Implement author, priority, tag, target, parent, expiration, and content normalization for canonical posts (`apps/server/src/routes/noticeBoard.ts`)
* [x] T015 \[S1703] Implement related-file boundary validation for repository- or worktree-relative paths with unsafe path rejection (`apps/server/src/routes/noticeBoard.ts`)
* [x] T016 \[S1703] Implement compatibility `POST /notice` adapter preserving `body`, `severity`, and `targets` behavior while storing canonical notices (`apps/server/src/routes/noticeBoard.ts`)
* [x] T017 \[S1703] Implement `POST /notice-board/:id/resolve` route with active-room resolution and idempotent success response (`apps/server/src/routes/noticeBoard.ts`)
* [x] T018 \[S1703] Emit `notice_board_message` and `notice_resolved` frames with canonical and compatibility payload keys (`apps/server/src/routes/noticeBoard.ts`)
* [x] T019 \[S1703] Update WebSocket hydration and `post_notice` handler pass-through for expanded Notice Board fields (`apps/server/src/ws/handlers.ts`)
* [x] T020 \[S1703] Update WebSocket `post_notice` validation for expanded Notice Board fields while preserving current compatibility behavior (`apps/server/src/ws/clientMessageValidation.ts`)

***

## Testing (4 tasks)

Focused verification and quality checks.

### apps/server

* [x] T021 \[S1703] \[P] Add real-mode canonical route tests for post, list, context, resolve, debug, filters, and unsafe related files (`apps/server/tests/noticeBoardRoutes.test.ts`)
* [x] T022 \[S1703] \[P] Update WebSocket tests for persisted hydrate, expanded `post_notice`, compatibility post, and resolve event behavior (`apps/server/tests/websocket.test.ts`)
* [x] T023 \[S1703] Update legacy route tests to assert `/notice` and `/notices` compatibility after router extraction (`apps/server/tests/routes.test.ts`)

### Cross-package

* [x] T024 \[S1703] Run focused server/protocol tests, typechecks, and ASCII/LF validation for session files (`.spec_system/specs/phase17-session03-server-routes-and-websocket-parity/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 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/phase17-session03-server-routes-and-websocket-parity/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.
