Skip to content

Fix tracking_freshness TD severity dropout and table wrap-blindness - #370

Open
Hidden-History wants to merge 1 commit into
mainfrom
fix/td1083-td1103-tracking-freshness-severity-and-wrap
Open

Hidden-History wants to merge 1 commit into
mainfrom
fix/td1083-td1103-tracking-freshness-severity-and-wrap

Conversation

@Hidden-History

Copy link
Copy Markdown
Owner

Summary

  • render_td_index enumerated only HIGH/MEDIUM/LOW plus a literal UNSPECIFIED bucket, so an open CRITICAL record was tallied into the Open count but never printed in the breakdown. Rewritten to use the same residual pattern as render_bugs_index: sum the known buckets and report the remainder as other/unspecified, so no severity value — including one not yet invented — can be silently dropped.
  • _STATUS_TABLE_RE and _SEV_TABLE_RE only matched a table cell on a single line, so a hard-wrapped Status or Severity cell (e.g. TECH-DEBT-934) returned no match at all. Both regexes now tolerate a cell wrapped across lines, while refusing to cross into a line that opens a new table row, so a malformed cell missing its closing pipe still cannot swallow the next row.

Test plan

  • tests/unit/test_tracking_freshness_skill.py — 184 passed, including 6 new tests (2 wrap-tolerance cases + 1 adjacent-row non-swallow guard for each of Status/Severity, plus 2 CRITICAL/residual breakdown cases for the TD writer)
  • _ai-memory/pov/skills/aim-tracking-freshness/tests/test_tracking_freshness_integration.py — passed
  • _ai-memory/pov/skills/aim-tracking-freshness/tests/test_decision_log_coverage.py — passed
  • _ai-memory/pov/skills/aim-tracking-freshness/tests/test_verify_code_state.py — passed
  • New tests observed red against the unmodified source before the fix, green after
  • black, ruff, isort clean on both changed files

render_td_index enumerated only HIGH/MEDIUM/LOW plus a literal
UNSPECIFIED bucket, so an open CRITICAL record was tallied into the
Open count but never printed in the breakdown. Rewrite it to use the
same residual pattern as render_bugs_index: sum the known buckets and
report the remainder as other/unspecified, so no severity value -
including one not yet invented - can be silently dropped.

_STATUS_TABLE_RE and _SEV_TABLE_RE only matched a table cell on a
single line, so a hard-wrapped Status or Severity cell returned no
match at all. Both regexes now tolerate a cell wrapped across lines,
while refusing to cross into a line that opens a new table row, so a
malformed cell missing its closing pipe still cannot swallow the next
row.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant