docs(debt): separate entries with blank lines and drop derived export totals #14212
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14212"
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 janzezno on 2026-10-31T23:42:28Z.
What
Options 2 and 3 of #12521, as agreed there: a blank line between the entries of every technical debt file, no export or declaration totals in entries, and a script that applies the reformat so open pull requests can rerun it when they rebase. One file per entry and
merge=unionare left out.Three commits:
tools/debt_format.py, the check and the rule.python3 tools/debt_format.pyadds a blank line before each top-level entry (-at the start of a line) ofdocs/dev/TechnicalDebt.mdanddocs/dev/debt/*.mdthat follows a non-blank line, and lists the files it changed. Nothing else changes: nested items, tables and continuation lines stay as they are.--checkchanges nothing, lists the files and exits with 1.python3 tools/debt_format.py resolve, during a stopped rebase or merge: for each conflicted debt file it separates the entries of the base, ours and theirs versions, merges them again withgit merge-file, stages the files that merge cleanly and formats the other debt files. Two rules settle the hunks the count removal leaves. When one side only renumbered lines in which the other side dropped numbers, the other side's lines are taken. When every word one side changed in a hunk was a number it replaced, the hunk is merged word by word under the same rule. The remaining hunks keep conflict markers, with the base section undermerge.conflictStyle=diff3, and the command exits with 1.debt-spacing: an entry the pull request adds or edits directly after a non-blank line.debt_split.pyandstubgen.pywrite separated entries.debt_format.py resolveon a conflict.test_check_conventions_debt_labels.pyfrom #15470 puts a blank line between the two entries of its fixture.libSceNKWebKit.md. No check, test or tool reads these totals, so no check changes for them.python3 tools/debt_format.py: 4945 blank lines in 200 files, and no other line.Like #12862, commits 2 and 3 are regenerated on the
mainthey land on: this version is regenerated onmainb259b261af, and I regenerate it again ifmainconflicts with it before it lands. On5c184f22eb, 1135 of the 1745 open pull requests change a debt file.After this lands, every open pull request that adds or edits a debt entry fails
debt-spacinguntil it rebases or runspython3 tools/debt_format.py, and most of them conflict in the debt files until it rebases and runsresolve, as with the AGC split.Overlaps:
write_debtintools/debt_split.pyand went first (merged 2026-11-05). The regeneration keeps itspreambleargument:write_lf(path, space_debt(render(f"# {name} technical debt", sections, order, preamble))).RULEStable intools/check_conventions.py; it was closed without merging, so that overlap is gone.docs/dev/debt/libSceLibcInternal.md; as proposed it went first (merged 2026-11-06), and the regeneration picks up its entry.add_testat the same spot of the rootCMakeLists.txtand thedebt-labelscheck and helpers at the same spots oftools/check_conventions.py; it went first (merged 2026-11-07), and the regeneration keeps both sides of each hunk.debt_splitadd_testnext to the newdebt_formatone in the rootCMakeLists.txt; as proposed, whichever was ready first landed, and it went first (merged 2026-11-09), so it is in this branch's base.CMakeLists.txt,CONTRIBUTING.md,docs/dev/TechnicalDebt.mdandtools/check_conventions.pywith this branch. They merge without conflicts, and its fold keeps a spaced file spaced, so either can land first. If it goes first, this branch is regenerated right after a fold.Tested
Arch Linux, Python 3.14.9, git 2.56.0. Regenerated on
mainb259b261af; the conventions check, the debt tool tests (also withcore.autocrlf=true) and thedebt_report.pycomparison were rerun there, the full tools suite on105c9e4d91and the open pull request numbers on5c184f22eb.git diff --ignore-blank-linesis empty). The whole branch againstmainis the count edits of commit 2 plus empty lines.python3 tools/check_conventions.py --base b259b261af: no errors. 7debt-lengthwarnings for entries that were over 1000 characters before commit 2 edited them: five inlibSceHmd2.md, the pending-exports entry oflibSceLibreSsl3.md(1393 characters onmain) and theResourceRequestBaseentry oflibSceNKWebKit.md(1821).tools/tests/test_debt_format.py(12 tests),test_debt_split.py,test_check_conventions_debt_length.py,test_check_conventions_comments.py,test_check_conventions_blob_reads.py,test_check_conventions_doc_links.py,test_stubgen.pyandtest_stubgen_stdout_newlines.pypass. Of the 116tools/tests/test_*.py, 115 pass;test_run_report_schema.py(nojsonschemahere) fails onmaintoo. The debt, stubgen and conventions debt tests also pass withcore.autocrlf=truein the global git config, as on the Windows runner:test_debt_format.pyruns its repositories withcore.autocrlf=false, since a CRLF checkout made theresolvetest compare CRLF bytes.python3 tools/check_test_registration.py --scripts: 274 test scripts, each run.python3 tools/debt_report.py --jsongives the same file, section, labels, names and reason for all 6355 entries onmain, after commit 2 and after commit 3; only the line numbers move.5c184f22eb, 1135 change a debt file. For each one I merged every debt file it changes withgit merge-file(base: the merge base, ours:mainor this branch, theirs: the head):maintodayresolveresolveAfter
resolve, 40 pull requests that conflict today merge cleanly and 31 that merge cleanly today conflict. 27 of those 31 conflict in a file whose totals commit 2 changes; the other 4 come from the blank lines alone. No merged fileresolveleaves clean has an entry without its blank line. The last row is also the steady state of the layout: with all three versions formatted, today's pull requests conflict in 342 cases instead of 356. The word-by-word rule settles 79 hunks in 70 pull requests where a pull request changed a total and other words of the same entry; only the total is replaced by this branch's wording and the rest of the change is kept.Not built: no source file changes.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-11-06T20:24:41Z.
Review: CHANGES_REQUESTED
main(mergeable: CONFLICTING), only in debt files:libSceFreeType.md,libSceFreeTypeOt.md,libSceLibcInternal.md(#14158's entry),libSceNKWebKit.md,libSceRegMgr.md,libkernel.md,libkernel_sys.md. Regenerate commits 2 and 3 on currentmain, as you described, and push.debt-spacingrule read as described.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T05:23:26Z.
Review: COMMENTED
Reviewed — no blocking findings
The inspected formatter and convention-checker changes show no verified blocking defect, but the full review is incomplete because many changed files were not read and checks were not run.
What I ran
Read the prepared description, commit list, diff, and manifest for head
6b4941bfe250142672c12b48b7b6c706b9691452. Inspected the changed logic and tests intools/debt_format.py,tools/check_conventions.py,tools/tests/test_debt_format.py,tools/debt_split.py, andtools/stubgen.pythroughrepo_read.py. No commands or tests were run.Results
Findings
Blocking
None in the code inspected.
Non-blocking
None.
Not verified
The changed documentation files and other changed files listed in the manifest were not read in full; their wording and content changes are not verified. The full test suite and the author-reported checks were not run in this review. I read the description, commit list, diff, manifest, and the five repository files listed above; many changed files were excluded from the review folder because they were too large.
To get this to a good state
Nothing is required. Optional: complete review of the unread changed files and run the relevant checks before making a formal approval decision.
Pull request closed