Skip to content

[codex] Make kanban migrations tolerate duplicate columns#21021

Draft
shenqistart wants to merge 1 commit intoNousResearch:mainfrom
shenqistart:codex/kanban-migration-duplicate-column
Draft

[codex] Make kanban migrations tolerate duplicate columns#21021
shenqistart wants to merge 1 commit intoNousResearch:mainfrom
shenqistart:codex/kanban-migration-duplicate-column

Conversation

@shenqistart
Copy link
Copy Markdown

Summary

  • Make kanban optional-column migrations tolerate duplicate-column races when another process adds the same column between PRAGMA inspection and ALTER TABLE.
  • Add a regression test that simulates the racing duplicate-column path.

Root Cause

The migration cached a table-column snapshot once, then issued multiple ALTER TABLE ADD COLUMN statements from that stale view. If the gateway dispatcher or another Hermes process migrated the same SQLite DB concurrently, SQLite could raise duplicate column name, causing the dispatcher tick to fail.

Validation

  • ./venv/bin/python -m py_compile hermes_cli/kanban_db.py tests/hermes_cli/test_kanban_core_functionality.py
  • ./venv/bin/python -m pytest tests/hermes_cli/test_kanban_core_functionality.py -q (142 passed, 1 skipped)

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard labels May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants