Remove deprecated NoteTypes from enum (reference, journal, incident, post, todo, issue, milestone) #225

Closed
opened 2026-03-28 01:54:47 +00:00 by forgejo_admin · 1 comment

Type

Feature

Lineage

Related to forgejo_admin/claude-custom #180 (spike: note type system audit).
Depends on pal-e-api#224 (data migration) completing first.

Repo

forgejo_admin/pal-e-api

User Story

As a developer
I want a minimal, unambiguous type system
So that I can quickly categorize work without overlapping categories

Context

The audit found 7 types that don't justify the enforcement chain. Data migration (#224) moves all notes away from these types. This ticket removes them from the enum so new notes can't use them.

Prerequisites completed:

  • Todo triage: 0 open todo notes remain (11 triaged to Forgejo issues or marked done)
  • Milestone re-parenting: 0 milestone-typed notes remain (6 retyped to doc, 12 plans detached)

File Targets

Files to modify:

  • src/pal_e_docs/schemas.py -- remove reference, journal, incident, post, todo, issue, milestone from NoteType Literal
  • src/pal_e_docs/routes/notes.py -- remove 7 entries from VALID_STATUSES dict

Files NOT to touch:

  • alembic/ -- no migration needed (note_type is plain String)
  • Frontend files (colors.ts, app.css) -- those are in pal-e-app, separate ticket needed

Acceptance Criteria

  • create_note(note_type="reference") returns 422
  • create_note(note_type="journal") returns 422
  • create_note(note_type="incident") returns 422
  • create_note(note_type="post") returns 422
  • create_note(note_type="todo") returns 422
  • create_note(note_type="issue") returns 422
  • create_note(note_type="milestone") returns 422
  • Existing notes with old types still readable (GET works)
  • All tests pass

Test Expectations

  • Unit test: all 7 rejected types return 422 on create
  • Unit test: existing notes with old types still queryable via list_notes
  • Run command: pytest tests/ -v

Constraints

  • Must run AFTER data migration (#224) — all notes retyped away from these types
  • Frontend color cleanup (pal-e-app colors.ts, app.css) is a SEPARATE ticket on pal-e-app repo

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • project-pal-e-agency
  • forgejo_admin/claude-custom #180 -- parent spike
  • forgejo_admin/pal-e-api #224 -- prerequisite (data migration)

Review History

  • review-225-2026-03-27: NEEDS_REFINEMENT — File targets listed wrong repo (colors.ts/app.css are in pal-e-app), ACs only covered 4 of 7 types, stale milestone/todo counts. Fixed in this update.
### Type Feature ### Lineage Related to `forgejo_admin/claude-custom #180` (spike: note type system audit). Depends on pal-e-api#224 (data migration) completing first. ### Repo `forgejo_admin/pal-e-api` ### User Story As a developer I want a minimal, unambiguous type system So that I can quickly categorize work without overlapping categories ### Context The audit found 7 types that don't justify the enforcement chain. Data migration (#224) moves all notes away from these types. This ticket removes them from the enum so new notes can't use them. Prerequisites completed: - Todo triage: 0 open todo notes remain (11 triaged to Forgejo issues or marked done) - Milestone re-parenting: 0 milestone-typed notes remain (6 retyped to doc, 12 plans detached) ### File Targets Files to modify: - `src/pal_e_docs/schemas.py` -- remove reference, journal, incident, post, todo, issue, milestone from NoteType Literal - `src/pal_e_docs/routes/notes.py` -- remove 7 entries from VALID_STATUSES dict Files NOT to touch: - `alembic/` -- no migration needed (note_type is plain String) - Frontend files (colors.ts, app.css) -- those are in pal-e-app, separate ticket needed ### Acceptance Criteria - [ ] `create_note(note_type="reference")` returns 422 - [ ] `create_note(note_type="journal")` returns 422 - [ ] `create_note(note_type="incident")` returns 422 - [ ] `create_note(note_type="post")` returns 422 - [ ] `create_note(note_type="todo")` returns 422 - [ ] `create_note(note_type="issue")` returns 422 - [ ] `create_note(note_type="milestone")` returns 422 - [ ] Existing notes with old types still readable (GET works) - [ ] All tests pass ### Test Expectations - [ ] Unit test: all 7 rejected types return 422 on create - [ ] Unit test: existing notes with old types still queryable via list_notes - Run command: `pytest tests/ -v` ### Constraints - Must run AFTER data migration (#224) — all notes retyped away from these types - Frontend color cleanup (pal-e-app colors.ts, app.css) is a SEPARATE ticket on pal-e-app repo ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `project-pal-e-agency` - `forgejo_admin/claude-custom #180` -- parent spike - `forgejo_admin/pal-e-api #224` -- prerequisite (data migration) ### Review History - review-225-2026-03-27: NEEDS_REFINEMENT — File targets listed wrong repo (colors.ts/app.css are in pal-e-app), ACs only covered 4 of 7 types, stale milestone/todo counts. Fixed in this update.
forgejo_admin 2026-03-28 04:12:51 +00:00
Author
Owner

Scope Review: READY

Review note: review-482-2026-03-27
All template sections present, traceability complete (story:pm-scope, arch:note-system, Forgejo issue). Both file targets verified against local codebase -- deprecated types already removed from NoteType Literal and VALID_STATUSES. Prerequisite #224 confirmed closed. 2 files in 1 repo, under 5 minutes. No decomposition needed. Issue is already closed with status:approved; board item #482 is ready for done column.

## Scope Review: READY Review note: `review-482-2026-03-27` All template sections present, traceability complete (story:pm-scope, arch:note-system, Forgejo issue). Both file targets verified against local codebase -- deprecated types already removed from NoteType Literal and VALID_STATUSES. Prerequisite #224 confirmed closed. 2 files in 1 repo, under 5 minutes. No decomposition needed. Issue is already closed with status:approved; board item #482 is ready for done column.
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#225
No description provided.