ccqa 1.48.0 → 1.48.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/ccqa.mjs +9 -6
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/bin/ccqa.mjs
CHANGED
|
@@ -9936,6 +9936,12 @@ const HUB_READ_CONCURRENCY = 4;
|
|
|
9936
9936
|
* source that cannot be read warns, and `degraded` flips when the failure
|
|
9937
9937
|
* leaves absence ambiguous (the ledger itself, or the legacy sources while
|
|
9938
9938
|
* no ledger answers).
|
|
9939
|
+
*
|
|
9940
|
+
* The ledger is read first and, once it answers, alone. The legacy sources
|
|
9941
|
+
* resolve every retained run against the whole event stream — minutes each on
|
|
9942
|
+
* a hub of any age — and reading them alongside a ledger that answers in one
|
|
9943
|
+
* request meant waiting for the slow source to confirm what the fast one had
|
|
9944
|
+
* already said (and then discarding it, since the ledger wins).
|
|
9939
9945
|
*/
|
|
9940
9946
|
async function loadCoverageEdges(input) {
|
|
9941
9947
|
if (input == null) return {
|
|
@@ -9947,11 +9953,9 @@ async function loadCoverageEdges(input) {
|
|
|
9947
9953
|
const existing = candidates.get(key);
|
|
9948
9954
|
if (!existing || candidate.measuredAt > existing.measuredAt) candidates.set(key, candidate);
|
|
9949
9955
|
};
|
|
9950
|
-
const [ledger
|
|
9951
|
-
|
|
9952
|
-
|
|
9953
|
-
collectReportEdges(input, merge)
|
|
9954
|
-
]);
|
|
9956
|
+
const [ledger] = await Promise.allSettled([collectLedgerEdges(input, merge)]);
|
|
9957
|
+
const ledgerAnswered = ledger.status === "fulfilled" && ledger.value;
|
|
9958
|
+
const legacy = ledgerAnswered ? [] : await Promise.allSettled([collectStreamEdges(input, merge), collectReportEdges(input, merge)]);
|
|
9955
9959
|
let skipped = 0;
|
|
9956
9960
|
let legacyBroken = false;
|
|
9957
9961
|
for (const result of legacy) if (result.status === "rejected") {
|
|
@@ -9963,7 +9967,6 @@ async function loadCoverageEdges(input) {
|
|
|
9963
9967
|
warn(`select-specs: ${skipped} measured run(s) on the hub could not be read; treating the measurements as unreadable rather than absent`);
|
|
9964
9968
|
}
|
|
9965
9969
|
if (ledger.status === "rejected") warn(`select-specs: could not read the hub's coverage-edge ledger (${errMessage(ledger.reason)})`);
|
|
9966
|
-
const ledgerAnswered = ledger.status === "fulfilled" && ledger.value;
|
|
9967
9970
|
const degraded = ledger.status === "rejected" || !ledgerAnswered && legacyBroken;
|
|
9968
9971
|
return {
|
|
9969
9972
|
edges: new Map([...candidates].map(([key, c]) => [key, {
|
package/dist/package.json
CHANGED