Add 'board' to NoteType enum #222

Open
opened 2026-03-27 21:14:44 +00:00 by forgejo_admin · 2 comments

Type

Feature

Context

template-board was created (2026-03-27) as the fractal decomposition template for tickets exceeding the 5-minute agent rule. Convention note-conventions and convention-kanban-over-plans both reference board as a first-class note type. However, the API NoteType enum doesn't include board — creating a board note requires using doc as a workaround.

User Story

As Betty Sue, I want to create board notes with note_type: board so decomposition boards are properly typed and queryable.

Lineage

Discovered during template-board dogfood session (2026-03-27). Three board notes (board-161-scope-review-pipeline, board-188-worktree-isolation, board-183-convention-updates) had to use doc type as workaround.

Repo

forgejo_admin/pal-e-api

File Targets

  • src/pal_e_docs/models.py — add board = "board" to NoteType enum
  • src/pal_e_docs/schemas.py — if NoteType is duplicated here

Acceptance Criteria

  1. create_note(note_type="board") succeeds
  2. list_notes(note_type="board") returns board notes
  3. Existing board notes can be migrated from doc→board

Test Expectations

  • Existing tests pass after enum addition
  • New test: create a note with note_type="board" and verify it round-trips

Constraints

  • Alembic migration needed for the enum change
  • No breaking changes to existing note types

Checklist

  • Add board to NoteType enum in models.py
  • Alembic migration for enum
  • Verify SDK/MCP accept the new type
  • Migrate 3 workaround board notes from doc→board
  • template-board — the template that needs this type
  • note-conventions — documents board as first-class type
  • convention-kanban-over-plans — references template-board
### Type Feature ### Context `template-board` was created (2026-03-27) as the fractal decomposition template for tickets exceeding the 5-minute agent rule. Convention `note-conventions` and `convention-kanban-over-plans` both reference `board` as a first-class note type. However, the API NoteType enum doesn't include `board` — creating a board note requires using `doc` as a workaround. ### User Story As Betty Sue, I want to create board notes with `note_type: board` so decomposition boards are properly typed and queryable. ### Lineage Discovered during `template-board` dogfood session (2026-03-27). Three board notes (`board-161-scope-review-pipeline`, `board-188-worktree-isolation`, `board-183-convention-updates`) had to use `doc` type as workaround. ### Repo `forgejo_admin/pal-e-api` ### File Targets - `src/pal_e_docs/models.py` — add `board = "board"` to `NoteType` enum - `src/pal_e_docs/schemas.py` — if NoteType is duplicated here ### Acceptance Criteria 1. `create_note(note_type="board")` succeeds 2. `list_notes(note_type="board")` returns board notes 3. Existing board notes can be migrated from doc→board ### Test Expectations - Existing tests pass after enum addition - New test: create a note with `note_type="board"` and verify it round-trips ### Constraints - Alembic migration needed for the enum change - No breaking changes to existing note types ### Checklist - [ ] Add `board` to NoteType enum in models.py - [ ] Alembic migration for enum - [ ] Verify SDK/MCP accept the new type - [ ] Migrate 3 workaround board notes from doc→board ### Related - `template-board` — the template that needs this type - `note-conventions` — documents board as first-class type - `convention-kanban-over-plans` — references template-board
Author
Owner

This issue is already implemented. PR #201 (commit 0c3863b, merged 2026-03-24) added board to the NoteType:

  • src/pal_e_docs/schemas.pyboard added to NoteType = Literal[...]
  • src/pal_e_docs/routes/notes.py"board": ["active", "archived"] added to VALID_STATUSES
  • tests/test_note_type_enum.pytest_board_valid_status test added and passing

No Alembic migration was needed because note_type is a plain String column in the database (not a DB-level enum). Validation happens at the application layer via the Pydantic Literal type in schemas.py.

Remaining checklist item (migrate 3 workaround board notes from doc to board) is a data operation, not a code change — can be done via the API or MCP tools.

Closing as already resolved.

This issue is already implemented. PR #201 (commit `0c3863b`, merged 2026-03-24) added `board` to the NoteType: - **`src/pal_e_docs/schemas.py`** — `board` added to `NoteType = Literal[...]` - **`src/pal_e_docs/routes/notes.py`** — `"board": ["active", "archived"]` added to `VALID_STATUSES` - **`tests/test_note_type_enum.py`** — `test_board_valid_status` test added and passing No Alembic migration was needed because `note_type` is a plain `String` column in the database (not a DB-level enum). Validation happens at the application layer via the Pydantic `Literal` type in schemas.py. Remaining checklist item (migrate 3 workaround board notes from `doc` to `board`) is a data operation, not a code change — can be done via the API or MCP tools. Closing as already resolved.
Author
Owner

Closing — Already Resolved

The board note type was already added in PR #201 (merged 2026-03-24):

  • schemas.py has NoteType = Literal[..., "board"]
  • routes/notes.py has VALID_STATUSES["board"] = ["active", "archived"]
  • Test exists in test_note_type_enum.py

The create_note(note_type="board") failure we hit was caused by MCP server caching old SDK imports. A session restart would have surfaced the working type.

Migrated 3 workaround board notes from doc→board type. Closing.

## Closing — Already Resolved The `board` note type was already added in PR #201 (merged 2026-03-24): - `schemas.py` has `NoteType = Literal[..., "board"]` - `routes/notes.py` has `VALID_STATUSES["board"] = ["active", "archived"]` - Test exists in `test_note_type_enum.py` The `create_note(note_type="board")` failure we hit was caused by MCP server caching old SDK imports. A session restart would have surfaced the working type. Migrated 3 workaround board notes from doc→board type. Closing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo_admin/pal-e-api#222
No description provided.