Remove dead auth code + stale references after Jinja2 removal #152

Closed
opened 2026-03-14 13:36:49 +00:00 by forgejo_admin · 0 comments
Contributor

Lineage

plan-pal-e-docs → Phase 4 → Phase 4d (post-sunset cleanup)

Repo

forgejo_admin/pal-e-docs

User Story

As a maintainer
I want dead code removed after the Jinja2 sunset
So that the codebase is clean and doesn't confuse future contributors

Context

QA review of PR #151 (Jinja2 removal) identified 3 non-blocking nits — dead code that was only used by the now-deleted frontend.

File Targets

  • src/pal_e_docs/blocks/compiler.py — remove stale docstring referencing deleted sanitize/autolink/wrap_tables modules
  • src/pal_e_docs/auth.py — remove dead functions: verify_password, authenticate_user, get_current_user (no longer called after SessionMiddleware removal)
  • src/pal_e_docs/config.py — remove orphan secret_key field (was only used by SessionMiddleware)

Files NOT to touch:

  • src/pal_e_docs/routes/ — API routes, don't change
  • src/pal_e_docs/models.py — don't change
  • src/pal_e_docs/blocks/parser.py — don't change

Acceptance Criteria

  • No references to deleted modules (sanitize, autolink, wrap_tables) in docstrings
  • Dead auth functions removed from auth.py
  • secret_key removed from config
  • All tests pass
  • App starts cleanly

Test Expectations

  • Run command: pytest tests/ -v

Constraints

  • Check that nothing else imports the auth functions before deleting. The User model may still be needed.
  • Only remove what's truly dead — don't touch anything that might be used by API routes

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes

Closes #152

  • pal-e-docs — project
### Lineage `plan-pal-e-docs` → Phase 4 → Phase 4d (post-sunset cleanup) ### Repo `forgejo_admin/pal-e-docs` ### User Story As a maintainer I want dead code removed after the Jinja2 sunset So that the codebase is clean and doesn't confuse future contributors ### Context QA review of PR #151 (Jinja2 removal) identified 3 non-blocking nits — dead code that was only used by the now-deleted frontend. ### File Targets - `src/pal_e_docs/blocks/compiler.py` — remove stale docstring referencing deleted sanitize/autolink/wrap_tables modules - `src/pal_e_docs/auth.py` — remove dead functions: `verify_password`, `authenticate_user`, `get_current_user` (no longer called after SessionMiddleware removal) - `src/pal_e_docs/config.py` — remove orphan `secret_key` field (was only used by SessionMiddleware) Files NOT to touch: - `src/pal_e_docs/routes/` — API routes, don't change - `src/pal_e_docs/models.py` — don't change - `src/pal_e_docs/blocks/parser.py` — don't change ### Acceptance Criteria - [ ] No references to deleted modules (sanitize, autolink, wrap_tables) in docstrings - [ ] Dead auth functions removed from `auth.py` - [ ] `secret_key` removed from config - [ ] All tests pass - [ ] App starts cleanly ### Test Expectations - Run command: `pytest tests/ -v` ### Constraints - Check that nothing else imports the auth functions before deleting. The User model may still be needed. - Only remove what's truly dead — don't touch anything that might be used by API routes ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes Closes #152 ### Related - `pal-e-docs` — project
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
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
ldraney/pal-e-api#152
No description provided.