fix: remove stale Board import from alembic/env.py #262

Merged
forgejo_admin merged 1 commit from 261-fix-remove-stale-board-import-from-alemb into main 2026-04-12 17:09:32 +00:00
Contributor

Summary

Remove the stale Board import from alembic/env.py that causes ImportError on every CI run since the Board model was removed from src/pal_e_docs/models.py.

Changes

  • alembic/env.py: Removed Board from the import block (1 line deletion)

Test Plan

  • ruff check . and ruff format --check . pass
  • python -c "from pal_e_docs.models import Block, BoardItem, CompiledPage, Note, NoteLink, NoteRevision, NoteTag, Project, Repo, Tag, User" succeeds
  • CI pipeline should no longer fail on ImportError

Review Checklist

  • ruff check passes
  • ruff format passes
  • Remaining imports verified working

None.

Closes #261

## Summary Remove the stale `Board` import from `alembic/env.py` that causes `ImportError` on every CI run since the Board model was removed from `src/pal_e_docs/models.py`. ## Changes - `alembic/env.py`: Removed `Board` from the import block (1 line deletion) ## Test Plan - `ruff check .` and `ruff format --check .` pass - `python -c "from pal_e_docs.models import Block, BoardItem, CompiledPage, Note, NoteLink, NoteRevision, NoteTag, Project, Repo, Tag, User"` succeeds - CI pipeline should no longer fail on ImportError ## Review Checklist - [x] ruff check passes - [x] ruff format passes - [x] Remaining imports verified working ## Related Notes None. ## Related Closes #261
Closes #261

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Contributor

PR #262 Review

DOMAIN REVIEW

Tech stack: Python / FastAPI / SQLAlchemy / Alembic (pal-e-api backend).

Critical factual error in the PR premise. The PR summary and issue #261 claim that Board was removed from models.py and that importing it causes an ImportError. This is incorrect.

Board is fully defined in src/pal_e_docs/models.py at line 253:

class Board(Base):
    __tablename__ = "boards"
    ...

It is actively referenced by:

  • BoardItem.board relationship (models.py line 304)
  • src/pal_e_docs/routes/boards.py (imports and queries Board throughout)
  • scripts/migrate_boards_to_notes.py
  • tests/conftest.py (imports Board)
  • Multiple test files

Removing Board from the alembic/env.py import block would cause Alembic autogenerate to no longer see the boards table metadata. The next alembic revision --autogenerate would produce a migration that drops the boards table, which is a data-destructive outcome.

BLOCKERS

  1. False premise -- Board model still exists. The Board class is present in models.py and actively used across the codebase (routes, tests, relationships). Removing its import from alembic/env.py is incorrect and risks generating destructive Alembic migrations. This change must not be merged.

NITS

None -- the single-line change is itself the problem.

SOP COMPLIANCE

  • Branch named after issue (261-fix-remove-stale-board-import-from-alemb)
  • PR body follows template (Summary, Changes, Test Plan, Related)
  • Related references plan slug -- no plan slug referenced (minor for a bugfix, but the issue premise is wrong regardless)
  • No secrets committed

PROCESS OBSERVATIONS

The issue and PR were created based on an incorrect assumption that Board had been removed from models.py. Before creating fix PRs for import errors, the actual state of the codebase should be verified. If CI is truly failing with an ImportError on Board, the root cause is elsewhere (e.g., a deployment or environment issue), not a stale import.

Recommendation: Close this PR and issue #261. If there is a genuine CI failure, investigate the actual root cause rather than removing a valid import.

VERDICT: NOT APPROVED

## PR #262 Review ### DOMAIN REVIEW **Tech stack:** Python / FastAPI / SQLAlchemy / Alembic (pal-e-api backend). **Critical factual error in the PR premise.** The PR summary and issue #261 claim that `Board` was removed from `models.py` and that importing it causes an `ImportError`. This is incorrect. `Board` is fully defined in `src/pal_e_docs/models.py` at line 253: ```python class Board(Base): __tablename__ = "boards" ... ``` It is actively referenced by: - `BoardItem.board` relationship (models.py line 304) - `src/pal_e_docs/routes/boards.py` (imports and queries `Board` throughout) - `scripts/migrate_boards_to_notes.py` - `tests/conftest.py` (imports `Board`) - Multiple test files Removing `Board` from the `alembic/env.py` import block would cause Alembic autogenerate to no longer see the `boards` table metadata. The next `alembic revision --autogenerate` would produce a migration that **drops the `boards` table**, which is a data-destructive outcome. ### BLOCKERS 1. **False premise -- Board model still exists.** The `Board` class is present in `models.py` and actively used across the codebase (routes, tests, relationships). Removing its import from `alembic/env.py` is incorrect and risks generating destructive Alembic migrations. This change must not be merged. ### NITS None -- the single-line change is itself the problem. ### SOP COMPLIANCE - [x] Branch named after issue (`261-fix-remove-stale-board-import-from-alemb`) - [x] PR body follows template (Summary, Changes, Test Plan, Related) - [ ] Related references plan slug -- no plan slug referenced (minor for a bugfix, but the issue premise is wrong regardless) - [x] No secrets committed ### PROCESS OBSERVATIONS The issue and PR were created based on an incorrect assumption that `Board` had been removed from `models.py`. Before creating fix PRs for import errors, the actual state of the codebase should be verified. If CI is truly failing with an `ImportError` on `Board`, the root cause is elsewhere (e.g., a deployment or environment issue), not a stale import. **Recommendation:** Close this PR and issue #261. If there is a genuine CI failure, investigate the actual root cause rather than removing a valid import. ### VERDICT: NOT APPROVED
forgejo_admin deleted branch 261-fix-remove-stale-board-import-from-alemb 2026-04-12 17:09:33 +00:00
Commenting is not possible because the repository is archived.
No description provided.