tooling: report GDK knowledge coverage #3291
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3291
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3289"
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?
@lambirou on GitHub · 2026-11-28 05:25 UTC · original
lambirou:gdk/knowledge-report→main· +2241 −0 · 4 files · 2 commits · merged 2026-11-28 08:24 UTCThe GDK knowledge plan ends with a merged report: total facts, per-category coverage, conflicts between sources, and shim exports that have no fact behind them. This adds that report and keeps the knowledge tree outside the repository.
tools/gdk_knowledge_report.py normalizes layouts, ABI facts, exports, runtime observations, platform profiles and shader cases into module, kind, name, value, source and confidence. It reports size conflicts (including layout versus ABI sizeof), cross-module type-size differences, ordinal conflicts, enum conflicts and other value conflicts with deterministic ordering. It also reads the shim .def files, ignores the local x2w_* and X2W* helpers, follows the xcrdapi -> dstorage_xs alias, and lists shim functions with no matching fact.
Measured on 28 November 2026 from the current knowledge tree:
Commands:
python -B tests/gdk_knowledge_report_check.py
python -B tools/gdk_knowledge_report.py report --root D:\gdk-oracle\knowledge --json D:\gdk-oracle\knowledge\coverage.json --markdown D:\gdk-oracle\knowledge\report.md --defs src
The check passed on Windows and runs on Linux without the GDK. The real coverage and report were written next to the knowledge index, and the index now records the six present categories, 28,785 facts, zero conflicts and zero shim gaps.
The report records limits rather than treating counts as proof: a layout is one compiler and macro set, an export name is not a signature or a test, and a runtime observation is one host and one runtime build.
9a5bb201f7to4942e55715github-bot referenced this pull request2026-11-28 05:48:54 +00:00
@JohnConnorNPC on GitHub · 2026-11-28 08:02 UTC · original
Thanks for this. I reviewed head
4942e557by reading it and running the new check (no Windows build, Wine or GPU; a stdlib-only tool doesn't need them). It merges cleanly intomainc3204a9c(git merge-tree --write-treerc=0), andtests/gdk_knowledge_report_check.pyprintsgdk_knowledge_report_check: okon the merged tree. The Linux CI job showstests/gdk_knowledge_report_check.py (ok, 1.2s)andall 248 checks passed.--defs srcreproduces the body's 70 shims. It looks ready from our side, and nothing below is blocking.Suggestions:
_associate_shimsbuildsexact = {fact["name"] for fact in facts}, so a fact of any kind in any module counts, and so does the.definternal name. With one layout classXMemAllocin moduleotherand one shader caseXMemFree, 4 of the 13 xmem shims count as covered (XMemAllocDefaultandXMemFreeDefaultthrough their internal names). A mutant that matches only same-module export facts still passes the check, so the test pins neither rule. Either matchkind == exportfacts in the shim's module (plus an explicit alias table), or reword both sentences to "matched a fact name".grep -c -i 'dstorage\|xcrdapi'gives 0 for the tool, the test and the doc. The XCRDAPI shim is covered only by the module-blind match in 1.main,tools/gdk_abi_probe.py parsewrites{"facts": {"sizeof(Shared)": 32}}, and the report rejects that file witherror: abi/alpha.json facts must be a JSON array(rc=2). The probe landed after this branch's merge-base. If a hand conversion to an array keeps thesizeof(X)names, nothing is compared: layoutShared=16 against an ABI factsizeof(Shared)=32 gives--checkrc=0 and 0 conflicts. Accepting the probe's mapping form (strippingsizeof(...)) and reporting how many ABI sizes were compared with a layout would tell "0 conflicts" apart from "0 overlap".<unnamed-tag>exclusion or the missing-ordinal rule (a mutant of each still passes).--requirecounts files, not facts, so emptyclasses,factsandexportsarrays pass--require layouts,abi,exports --checkwith 0 facts. The.defparser'sstartswith("LIBRARY")andstartswith("EXPORTS")would also match an export named likeLibraryX(no repo.defhas one).exports-all.jsonis silently ignored onceexports/holds any file, and the input table doesn't say so.This comment was AI-assisted.