tools: check_known_wrong reads a marker spelled inside an assertNotIn literal as a live marker

Open Beginner friendly
#2,125 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

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

Research direction

Start with tools/check_known_wrong.py and its tests in tools/tests/test_known_wrong.py; add the failing case described in the issue for a tracked Python file containing a closed marker only inside an assertNotIn literal. Then adjust the checker and remove the two-piece spelling at tools/tests/test_quest_hand_pose_log_wiring.py:162. Done means the new test passes and python3 tools/check_known_wrong.py --online accepts the literal.

Written by the indexing model from the issue text.

Description

backlog bug

Evidence at 9dea09ef

tools/check_known_wrong.py --online collects every KNOWN-WRONG #<n> it finds in tracked files (MARKED, then closed_issues) and fails when the named issue is closed. It skips markdown fences and backtick spans, and exempts its own two files (tools/check_known_wrong.py, tools/tests/test_known_wrong.py), but it does not skip a Python string literal. The exemptions and the skip, quoted: if rel == "tools/check_known_wrong.py" or rel == "tools/tests/test_known_wrong.py": followed by continue # the checker and its test spell the marker as data (:145-146); if rel in ("tools/check_known_wrong.py", "tools/tests/test_known_wrong.py"): followed by continue (:163-164); if rel.endswith(".md"): before CODE_SPAN.sub(...) is the only text stripping inside marked_issues (:169-170). A test that asserts a stale marker is absent has to spell that marker, and the spelling is then read as a live one: tools/tests/test_quest_hand_pose_log_wiring.py:162 made the checker fail on closed issue #1986 until the literal was split in two pieces (a workaround, not a fix of the checker).

Not shown

How many other tests assert the absence of a marker. git grep -n 'assertNotIn("KNOWN-WRONG' over tools/tests finds the cases to count.

Falsifier

A test file with self.assertNotIn("KNOWN-WRONG #<closed issue>", ...) passes python3 tools/check_known_wrong.py --online. Today it fails.

Work

  1. A failing case in tools/tests/test_known_wrong.py first: a tracked Python file that spells a closed marker only inside an assertNotIn literal.
  2. Teach the checker to skip assertion literals (or accept an explicit exemption), then drop the two-piece spelling at the call site.

꩜🌸

Dominant language
C++
Stars
2
Forks
5
Avg merge
2h 59m
Merged PRs (30d)
790

Getting set up

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 EchoTools/nevr-runtime

All issues in EchoTools/nevr-runtime

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.