tools: label technical debt entries by what would close them, missing tests and removed links #15469
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-11-03T13:46:49Z.
Finding which technical debt entries someone can close today means rereading 345 files. On
main(4f41f4c375) they hold 5,518 entries, and 121 of them say what would close them withCloses when:(#6758). I'd like to add a report that labels every entry, so a contributor can ask for, say, entries that need only code and have no test.What it reports
tools/debt_report.pyreadsTechnicalDebt.mdanddocs/dev/debt/*.mdwith the helperscheck_conventions.pyalready has. It labels each entry and prints one line per entry with counts, or JSON with--json. It filters by debt file and by--label. It changes no file and always exits 0.console,firmware,gpu,titleorcodeCloses when:text if there is one, otherwise the entry: e.g. "unknown signature" or "parameterless declaration for import resolution" givefirmware; "not measured on a console" or "unverified on a PS5" giveconsole; "fails on RADV" or "not measured on other drivers" givegpu; anything else iscodeno-test<name>_nid_postfixcountwindows,macos,linuxstale?core/file no longer existsCounts on
main:python3 tools/debt_report.py --label code --label no-testlists 207 entries. The onestale?entry is inlibScePlayerInvitationDialog.md: it linksExport.cpp, which19044c17b5removed.Accuracy
I checked entries by hand against the text and the code:
no-test: labelled entries that have no testThe
no-testrow for sample 2 counts only its first 30 entries: the verdicts for the other 30 were recorded out of order.Most remaining errors:
code.no-test: entries whose names sit only in the NID table below them get no label.I also tried two more
stale?rules and dropped them. "The entry says the function throws but its body does not" and "a silent stub whose function now throws" were right in 0 of 44 flags. Functions throw through helpers and macros, or only for some inputs, and entries name functions they don't claim throw.An optional
Labels:trailerWhere the inference is wrong, an entry can end with
Labels:, the wayCloses when:works:Labels: console, windows. A label given there replaces the inferred labels of its family.testedremoves an inferredno-test.check_conventions.pygets a warning, not an error, for a label outside that list. It checks only entry lines.No entry has to be edited for this. The trailer is added only when someone already changes that entry. A mass edit of the debt files would conflict with most open pull requests (#12521), and the blank-line reformat in #14212 doesn't affect the parser.
Proposed pull request
tools/debt_report.pyandtools/tests/test_debt_report.py;debt-labelswarning incheck_conventions.pywith its test;TechnicalDebt.mdnext to theCloses when:one.It changes no debt entry. The branch is ready: https://github.com/LeandroLP23/AnyPS5/tree/tools/debt-labels
Questions:
codeis the default and covers a third of the entries.AI-assisted: yes (Claude Code)