-
Notifications
You must be signed in to change notification settings - Fork 0
m9 com api documentation
Status: Implemented, PRs open for review. Tracked by issue #11 and sub-issues #66, #137, and #138, delivered as a linear stack of three pull requests: #139 ← #140 ← #141. Merging and issue closure remain maintainer actions.
docs/TODO.md M9 has one checklist item — docs/com-api.md documenting COM activation
steps, required capabilities, out-of-proc/in-proc differences, and fallback behavior —
but docs/com-api.md already existed and was not a stub. So M9 was not "write a missing
document." It was "make the existing document true again, and finish the one sub-topic
it never covered."
Two things had made it untrue:
-
The document stopped tracking the code.
docs/com-api.mdwas last edited 2026-07-27;src/core/WingetComSource.cppchanged again 2026-07-30 (M6, issue #56, which moved COM apartment ownership fromWingetComSourcetomain.cpp). The document still described the earlier arrangement. -
Parts of it were written from
docs/PLAN.md's design intent, not the shipped implementation — thepackageQuerycapability claim and theCreateCompositePackageCatalogoption were never reconciled with what was built.
-
#66 / PR #139 — rewrite
docs/com-api.mdagainst the implementation. Restructured into sections answering each M9 checklist sub-topic plus the build-time projection story the checklist implies: "Build-time projection," "Activation" (corrected apartment ownership), "Out-of-proc vs in-proc" (the sub-topic that was previously only a passing mention —CLSCTX_LOCAL_SERVERonly, no in-proc fallback, and the consequences), "What happens when" (constructor-vs-enumeratePackages()activation split), "Enumeration," "Failure and fallback" (new HRESULT/status-code tables, the corrected--source autodegrade contract), "Capabilities / permissions," and "Extending this code." Records ADR-0034 in a newdocs/adr-phase-7.md(docs/adr-phase-6.mdwas 869 lines, well pastdocs/adr.md's 200-line split rule), backed by a live verification run. -
#137 / PR #140 — reconcile the surrounding documents.
docs/PLAN.md§3/§10/§11,AGENTS.md§10, andREADME.mdstill contradicted ADR-0034 in places (thewinrt::init_apartment()risk note, the hedged alias-gap note, thepackageQueryclaim, unchecked Definition-of-Done boxes M2 through M8 had already satisfied). No source file changed in this layer. -
#138 / PR #141 — retire stale source comments and close bookkeeping.
src/core/PackageSourceError.hstill called the--source comexit-code mapping "an open question" that #56 had settled;src/rules/RuleSet.cppstill referenced aWingetComSource-ownedComApartmentthat #56 removed.docs/adr-phase-2.mdADR-0009 gained a dated amendment note (not a rewrite) for the two facts it recorded that later changed.docs/TODO.mdM9 and M8's stale README checkbox were both checked. Comment-only source changes; fullDebug|Release×x64|ARM64build andvstest.console.exere-run per the project's Definition of Done.
Building Release|x64 and running scan --source com --verbose against a real, working
winget installation (winget list succeeded; App Installer 1.30.80.0) reproduced
winrt::create_instance<PackageManager> — the exact call WingetComSource makes —
failing with HRESULT_FROM_WIN32(APPMODEL_ERROR_NO_PACKAGE) (0x80073D54). Two
throwaway, non-committed probes narrowed this precisely: a bare CoCreateInstance of the
same CLSID requesting only IUnknown succeeded; requesting the typed IPackageManager
interface failed with that HRESULT. --source auto degraded cleanly to an identical,
correct filesystem-scan result.
This is recorded in ADR-0034 and docs/com-api.md as an observed, environment- and
possibly version-specific data point, not a general rule — M9 is scoped to
documentation only, so no source change was attempted to investigate or fix it. Whether
it warrants a follow-up bug-investigation issue is left to the project owner.
-
Debug|Release×x64|ARM64all build clean at every layer that touchedsrc/(layer 1 and layer 3; layer 2 was doc-only). -
vstest.console.exereports 405/405 forDebug|x64/Release|x64, unchanged across all three layers since no test or production logic changed. - Live COM verification (
scan --source com|auto|fs --verbose) recorded in ADR-0034. - Documentation cross-read:
docs/com-api.md,docs/PLAN.md§3/§10/§11,AGENTS.md§6/§10,README.md, anddocs/TODO.mdread back together to confirm agreement with each other and withsrc/.
- #66, #137, and #138 are merged and closed; #11 reflects their completion.
-
docs/TODO.mdM9 is checked with issue + ADR evidence; M8's stale README box is resolved. -
docs/com-api.mdanswers all four checklist sub-topics. -
docs/adr-phase-7.mdADR-0034 exists,docs/adr.md's index has its row, and the live-run evidence — including what could not be verified — is recorded there. - No
*_ja.mdfile was read or changed.docs/com-api_ja.mdpredates ADR-0009 and stays out of sync; bringing it current is an explicit human follow-up, not part of this milestone. - Closing #11 does not close #1 — M0's #21 (CI) and #22 (automated vulnerability gate) remain open.