Merge summary: Rich markup swallows the [high]/[low]/[info] confidence prefixes on stale-assertion finding lines

Open Beginner friendly
#4,606 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
86/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
cli

Research direction

Start in src/specify_cli/merge/executor.py at _render_stale_findings, then read the console output policy in src/specify_cli/cli/console.py. Reproduce the rendering through specify_cli.cli.console and choose the supported literal-prefix approach. Done means stale-finding lines visibly retain [high], [medium], [low], or [info] in the merge summary.

Written by the indexing model from the issue text.

Description

priority:P3 type:finding

Observed

_render_stale_findings in src/specify_cli/merge/executor.py prints each stale-assertion finding line as:

console.print(f"  [{finding.confidence}] {finding.test_file.name}:{finding.test_line} — {finding.hint}")

The [{finding.confidence}] fragment (e.g. [high], [medium], [low], [info]) is interpreted by Rich as a markup style tag, not literal text — unknown style names are silently dropped at render time, so every finding line in the merge summary output appears WITHOUT its confidence prefix:

   tests/test_x.py:10 — Assertion references 'foo' ...

Verified live: console.print(' [info] test_x.py:10 — hint') through specify_cli.cli.console's CliConsole renders as ' test_x.py:10 — hint' — the bracket tag is consumed.

Expected

The confidence grade renders literally, e.g. by escaping the brackets (f" [[{finding.confidence}]] ..." → renders [high]) or by passing markup=False / a plain-text prefix, whichever matches the console seam's output policy (src/specify_cli/cli/console.py).

Severity / recurrence

NOTE (cosmetic — output legibility only). Found during self-review of PR #4605 (issue #3957); not folded there because it changes the rendered output shape of every grade line, not just the new info block, and is independent of #3957's noise/signal fix.

Provenance

Implementer self-review, sk-impl-spec-kitty-3957.

Dominant language
Python
Stars
1.6k
Forks
169
Avg merge
14h 45m
Merged PRs (30d)
361

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from spec-kitty/spec-kitty

All issues in spec-kitty/spec-kitty

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.