Review: Remove deprecated NoteTypes from enum

review-482-2026-03-27 Review

review ready

Verdict: READY

Template Completeness

  • [x] Type -- Feature
  • [x] Lineage -- Related to claude-custom #180 (spike), depends on pal-e-api#224
  • [x] Repo -- forgejo_admin/pal-e-api
  • [x] User Story -- developer wants minimal unambiguous type system
  • [x] Context -- audit found 7 types to remove, prerequisites documented
  • [x] File Targets -- 2 files to modify, 2 exclusion categories documented
  • [x] Acceptance Criteria -- 9 criteria covering all 7 types + backward compat + tests
  • [x] Test Expectations -- unit tests for rejection + queryability, run command provided
  • [x] Constraints -- ordering dependency (#224 first), frontend separation noted
  • [x] Checklist -- standard PR/tests/no-unrelated
  • [x] Related -- project, parent spike, prerequisite issue
  • [x] Review History -- previous review findings and fixes documented

Traceability

  • [x] story:pm-scope label -- PM scoping the type system (board item #482)
  • [x] arch:note-system label -- note-system architecture component (board item #482)
  • [x] Forgejo issue -- forgejo_admin/pal-e-api#225, currently closed with status:approved label

File Targets

  • [x] src/pal_e_docs/schemas.py -- verified: NoteType Literal at line 6 in local checkout has 14 types. The 7 deprecated types (reference, journal, incident, post, todo, issue, milestone) are absent in the local codebase. The production API still has the old enum (confirmed via 422 response rejecting "review" type).
  • [x] src/pal_e_docs/routes/notes.py -- verified: VALID_STATUSES dict at line 45 has 14 entries matching the 14 active types in local checkout. No deprecated type entries present locally.
  • [x] Files NOT to touch correctly identified -- alembic (no migration needed, String column), frontend files (separate pal-e-app ticket)

Repo Placement

Correct. Issue filed on forgejo_admin/pal-e-api, file targets are in pal-e-api (src/pal_e_docs/ is the pal-e-api source tree at ~/pal-e-docs). Frontend cleanup explicitly scoped out to a separate pal-e-app ticket.

Dependencies

  • pal-e-api#224 (data migration) -- prerequisite, confirmed closed. Board item #481 is in done column.
  • claude-custom#180 (spike: note type audit) -- parent spike, currently in_progress on board (item #478). This ticket is a child deliverable of the spike.
  • No undocumented dependencies found.

Acceptance Criteria

All 9 criteria are testable by an agent. The 7 type rejection criteria can be verified via API calls. "Existing notes with old types still readable" is verifiable (test_include_cold.py at line 72 already tests this pattern by inserting a legacy "todo" note directly into DB and verifying it reads back). "All tests pass" is verifiable via pytest. No missing criteria detected.

Blast Radius

  • test_include_cold.py inserts a legacy note_type="todo" directly into DB (bypassing schema) -- this is intentional and correct for testing backward compatibility with pre-existing data.
  • test_retype_migration.py references old types as source data in migration tests -- correct, these test the migration path.
  • Frontend (pal-e-app colors.ts, app.css) still has color mappings for old types -- correctly scoped out as a separate ticket.
  • No other downstream consumers affected. The SDK (pal-e-docs-sdk) and MCP (pal-e-docs-mcp) pass through note_type strings; they don't validate against the enum.

Decomposition

2 file targets in 1 repo, 9 acceptance criteria (but 7 are identical pattern -- remove from Literal), estimated under 5 minutes. No decomposition needed.

Recommendation

No action needed. The Forgejo issue is closed with status:approved. The local codebase already reflects the desired state (deprecated types removed from NoteType Literal and VALID_STATUSES). Production API has not yet been deployed with the new types -- the deploy is a separate operational step. This ticket is scope-complete and ready for board column update to done.