Repository navigation
feat(tools): keep technical debt in one file per library - #4411
Conversation
|
+1 |
|
Strong +1. Keeping |
|
LGTM. |
|
Rebase handoff — rebased onto current This PR restructures the technical-debt ledger into one file per library ( One consequence worth knowing for future PRs: any PR that adds a technical-debt entry while this one is open should target Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
To pick it up: Head is |
|
Thanks, the first- On the two conflicts: #4448 is rebased on current |
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
8b30984 to
342a8c4
Compare
What
docs/dev/TechnicalDebt.mdhad 684 entries in four sections, and most pull requests append to the same section ends, so it was the most common conflict: 176 open pull requests touch it. This keeps one file per library or component underdocs/dev/debt/, withTechnicalDebt.mdas the index.docs/dev/debt/<name>.md: an entry goes to the file named after the firstcore/path it links:<name>forcore/libs/prx/<name>/..., otherwisecore/<name>/...(shader,relinker,libs), so a recompiler entry that also cites a driver test stays inshader.md, under the same###sections and order as before. Entries that link neither (Build, the 4 cross-library "Unknown function info" lines, 3 Functional lines) and the Silent stubs preamble stay in the index;#silent-stubsand#functionalanchors still exist there. Links are rewritten to../../../.python3 tools/debt_split.py split, nothing edited by hand; on a rebase it is regenerated rather than rebased.tools/debt_split.py:splitmoves every library or component entry in the index to its file, appending to existing files (idempotent: also fixes an entry a clean merge left in the index).resolve, run during a rebase stopped onTechnicalDebt.md, takes the stopped commit's change between the merge base and its version (stages 1 and 3), applies its added, edited and removed entries to the debt files (an addition goes after the entry it followed), keepsmain's index and stages everything. It refuses, leaving the conflict as it was, when the change also edits lines that stay in the index or when an edited/removed entry was also changed onmain.check_conventions.py):debt-filerule: an added entry whose name is not the file it is in (including the index) fails, naming the right file. The naming rule lives once, incheck_conventions.debt_name, whichdebt_split.pyimports.stubgen.pydefault debt link is relative todocs/dev/debt/.resolve.Tested
doc-link.tools/tests/test_debt_split.py(registered asdebt_split): split by first core link, split appending to existing files without duplicating the index note, andresolvein real rebases: added + edited + removed entries (order kept, emptied file deleted, index equal tomain's), refusal on index lines, refusal on an entrymainalso changed, refusal outside a conflict. Mutations (drop the delete, drop the index-line guard, always insert the note) each fail a test.test_check_conventions_comments.py: silent-stub cases moved to a library file; new cases fordebt-file(library entry in the index, in another library's file, component file, entry without a core link stays, entry filed by its first core link). Mutations (rule disabled; links resolved from the index instead of their own file) fail 2 and 4 tests.tools/testssuites pass;check_conventions.py --base upstream/mainpasses.TechnicalDebt.mdonto this branch, runningresolveat every stop:mainresolvehandles every stopdebt-filereports andsplitmoves (2)main(checked for all 6)resolvehandles theTechnicalDebt.mdpartSo no pull request gets a new conflict it cannot resolve with
resolveexcept the 4 that edit index lines (the same hand merge as today).@boykopovar this changes where technical debt lives (layout call). @oneandonlydean after merge, authors rebase and run
python3 tools/debt_split.py resolvewhenTechnicalDebt.mdconflicts; I can run it on the open pull requests we have edit access to.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)