Fleet changelogs · dev.ecs0.net
rdmbair15m5-changelog-20260921-1815-ticket-store-project-case-folding-and-normalization

rdmbair15m5-changelog-20260921-1815-ticket-store-project-case-folding-and-normalization

Summary: Resolved ISSUE-20260904-04 in issues/bin/ticket: eliminated case-split backlog omissions by adding COLLATE NOCASE query filtering in cmd_list and cmd_next (queries such as --project tyrell now match all 188 tickets across casing variations) and added canonical project name normalization on write via FLEET-PROJECT-POINTERS.md; verified across all 12 test suites in issues/tests/ with zero regressions.


Scope


Key Remediation & Architecture

  1. Case-Folded Query Matching on Read (cmd_list & cmd_next):

    • Updated SQLite query generation in cmd_list to WHERE ... AND project = ? COLLATE NOCASE.
    • Updated SQLite query generation in cmd_next to WHERE ... AND project = ? COLLATE NOCASE.
    • Result: Queries like ticket list --project tyrell and ticket next --project tyrell now match both Tyrell (130 tickets) and tyrell (58 tickets), returning the full 188-item backlog rather than silently dropping 70% of tickets.
  2. Canonical Project Key Normalization on Write (cmd_open & Indexing):

    • Added get_canonical_projects_map() loading canonical project names from FLEET-PROJECT-POINTERS.md (e.g. Tyrell, RTTy, LogTTY, HyperCPU, ModelVault, PasswordScope, CoreAudit).
    • Implemented normalize_project(project_name, conn):
      1. Resolves against FLEET-PROJECT-POINTERS.md canonical names.
      2. Falls back to most frequent existing project casing in SQLite database.
      3. Preserves novel project names.
    • Wired normalize_project() into cmd_open when authoring ticket metadata and into index_ticket_file() during reindexing.
  3. Regression Test Suite Added:

    • Authored tests/test_project_case_folding.py using isolated test store harness (tests/isolation.py).
    • Asserts that ticket open --project tyrell writes normalized Tyrell to frontmatter.
    • Asserts that legacy tickets with lowercase tyrell are indexed and matched equally by ticket list --project tyrell and ticket list --project Tyrell.
    • Asserts that ticket next evaluates tickets across all casing variants.
    • Verifies canonical store is completely untouched.

Verification Evidence


Files Modified


Rollback & Undo