I have observed on a fresh install of 3.7.2 that the packageupdatesmatching() function does not correctly report updates unless a legacy packages promise implementation is used.
To reproduce bring up a fresh instance that is not fully updated. And without adding any packages promises try use packageupdatesmatching.
"updates_available" data => packageupdatesmatching(".", ".", ".", ".");
"amount_updates" int => length("updates_available");
"updates_available_str" string => storejson(updates_available);
"$(amount_updates) packages can be updated";
Now, after adding a legacy package promise you should be able to get the package inventory.
package_policy => "add";
I think that packageupdatesmatching() should look for inventory from the new inventory implementation and use that if it exists first, if it does not exist then it should fall back to looking at the legacy inventory.