@openmixer/plugin-qualify 0.20.0 → 0.20.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/bin/plugin-qualify-records-package.mjs +9 -7
- package/bin/plugin-qualify.mjs +34 -0
- package/dist/distributed-records.d.ts +16 -3
- package/dist/distributed-records.js +38 -4
- package/dist/distributed-records.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/judged-layer.d.ts +91 -0
- package/dist/judged-layer.js +144 -0
- package/dist/judged-layer.js.map +1 -0
- package/dist/judgement-line.d.ts +6 -0
- package/dist/judgement-line.js +20 -0
- package/dist/judgement-line.js.map +1 -0
- package/dist/measurement/cli.d.ts +2 -0
- package/dist/measurement/cli.js +25 -2
- package/dist/measurement/cli.js.map +1 -1
- package/dist/measurement/format.d.ts +2 -0
- package/dist/measurement/format.js +5 -0
- package/dist/measurement/format.js.map +1 -1
- package/dist/qualification-record.d.ts +8 -0
- package/dist/qualification-record.js +12 -2
- package/dist/qualification-record.js.map +1 -1
- package/dist/qualify-isolated.d.ts +5 -3
- package/dist/qualify-isolated.js +6 -4
- package/dist/qualify-isolated.js.map +1 -1
- package/dist/qualify-sync.d.ts +7 -2
- package/dist/qualify-sync.js +21 -11
- package/dist/qualify-sync.js.map +1 -1
- package/dist/records-package.d.ts +31 -4
- package/dist/records-package.js +149 -24
- package/dist/records-package.js.map +1 -1
- package/fixtures/records-rpi5-0.19.1/http___drumkv1.sourceforge.net_lv2@0.2-7d179bdcf9e5.default.probe.json +58 -0
- package/fixtures/records-rpi5-0.19.1/http___drumkv1.sourceforge.net_lv2@0.2-7d179bdcf9e5.default.qualification.json +305 -0
- package/fixtures/records-rpi5-0.19.1/http___samplv1.sourceforge.net_lv2@0.2-c9cd8fb3102f.default.probe.json +58 -0
- package/fixtures/records-rpi5-0.19.1/http___samplv1.sourceforge.net_lv2@0.2-c9cd8fb3102f.default.qualification.json +301 -0
- package/package.json +2 -2
- package/src/distributed-records.ts +41 -4
- package/src/index.ts +2 -0
- package/src/judged-layer.ts +197 -0
- package/src/judgement-line.ts +22 -0
- package/src/measurement/cli.ts +26 -2
- package/src/measurement/format.ts +8 -0
- package/src/qualification-record.ts +19 -2
- package/src/qualify-isolated.ts +6 -4
- package/src/qualify-sync.ts +22 -10
- package/src/records-package.ts +156 -25
- package/tools/lv2-measure.mjs +21 -2
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
3
3
|
// Copyright (C) 2026 Pau Aliagas <linuxnow@gmail.com>
|
|
4
4
|
/**
|
|
5
|
-
* `plugin-qualify-records-package`, the entry point: the Debian
|
|
6
|
-
* decision is in `src/records-package.ts`; this file reads argv, builds the
|
|
7
|
-
* and
|
|
5
|
+
* `plugin-qualify-records-package`, the entry point: the Debian packages of a device's qualification records, one per
|
|
6
|
+
* cell (rate and quantum). Every decision is in `src/records-package.ts`; this file reads argv, builds the packages,
|
|
7
|
+
* names what stayed out of each on stderr and each package on a line of stdout, in cell order.
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
9
|
+
import { buildRecordsPackages, parseRecordsPackageArgs, recordsPackageHelp } from "../dist/index.js";
|
|
10
10
|
|
|
11
11
|
const log = (line) => process.stderr.write(`plugin-qualify-records-package: ${line}\n`);
|
|
12
12
|
|
|
@@ -22,10 +22,12 @@ if ("help" in parsed) {
|
|
|
22
22
|
}
|
|
23
23
|
let built;
|
|
24
24
|
try {
|
|
25
|
-
built =
|
|
25
|
+
built = buildRecordsPackages(parsed.args);
|
|
26
26
|
} catch (e) {
|
|
27
27
|
log(e.message);
|
|
28
28
|
process.exit(2);
|
|
29
29
|
}
|
|
30
|
-
for (const
|
|
31
|
-
|
|
30
|
+
for (const b of built) {
|
|
31
|
+
for (const l of b.left) log(`${b.set}: ${l.name}: ${l.why}; left out`);
|
|
32
|
+
process.stdout.write(`${b.path}: ${b.set} at ${String(b.cell.rate)}/${String(b.cell.quantum)}, ${String(b.records)} records, ${String(b.files)} files\n`);
|
|
33
|
+
}
|
package/bin/plugin-qualify.mjs
CHANGED
|
@@ -29,6 +29,9 @@ import {
|
|
|
29
29
|
clapPinEntries,
|
|
30
30
|
defaultQualificationDir,
|
|
31
31
|
judgeExitCode,
|
|
32
|
+
judgedLayerHelpText,
|
|
33
|
+
judgedLayerOf,
|
|
34
|
+
parseJudgedLayerArgs,
|
|
32
35
|
judgeFiles,
|
|
33
36
|
mergeRunsByRecord,
|
|
34
37
|
judgeHelpText,
|
|
@@ -96,6 +99,37 @@ if (process.argv[2] === "judge") {
|
|
|
96
99
|
process.exit(judgeExitCode(result));
|
|
97
100
|
}
|
|
98
101
|
|
|
102
|
+
if (process.argv[2] === "judged-layer") {
|
|
103
|
+
const j = parseJudgedLayerArgs(process.argv.slice(3));
|
|
104
|
+
if (!j.ok) {
|
|
105
|
+
process.stderr.write(`plugin-qualify judged-layer: ${j.error}\n\n${judgedLayerHelpText()}`);
|
|
106
|
+
process.exit(2);
|
|
107
|
+
}
|
|
108
|
+
if ("help" in j) {
|
|
109
|
+
process.stdout.write(judgedLayerHelpText());
|
|
110
|
+
process.exit(0);
|
|
111
|
+
}
|
|
112
|
+
let record;
|
|
113
|
+
try {
|
|
114
|
+
record = JSON.parse(readFileSync(j.args.record, "utf8"));
|
|
115
|
+
} catch (e) {
|
|
116
|
+
process.stderr.write(`plugin-qualify judged-layer: ${j.args.record}: cannot read: ${e.message}\n`);
|
|
117
|
+
process.exit(2);
|
|
118
|
+
}
|
|
119
|
+
const l = judgedLayerOf(record, {
|
|
120
|
+
machineClass: j.args.machineClass,
|
|
121
|
+
pin: { files: j.args.files, layout: j.args.layout },
|
|
122
|
+
...(j.args.judgedBy === undefined ? {} : { judgedBy: j.args.judgedBy }),
|
|
123
|
+
...(j.args.address === undefined ? {} : { address: j.args.address }),
|
|
124
|
+
});
|
|
125
|
+
if (l.layer === null) {
|
|
126
|
+
process.stderr.write(`plugin-qualify judged-layer: ${j.args.record}: no judged layer: ${l.reason}\n`);
|
|
127
|
+
process.exit(1);
|
|
128
|
+
}
|
|
129
|
+
process.stdout.write(`${JSON.stringify(j.args.body ? l.body : l, null, 2)}\n`);
|
|
130
|
+
process.exit(0);
|
|
131
|
+
}
|
|
132
|
+
|
|
99
133
|
if (process.argv[2] === "adjust") {
|
|
100
134
|
const a = parseAdjustArgs(process.argv.slice(3));
|
|
101
135
|
if (!a.ok) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type GridCell } from "./measurement-grid.js";
|
|
1
2
|
import { type QualificationRecord, type RecordVerdict } from "./qualification-record.js";
|
|
2
3
|
import type { FileDigest, SyncItem, SyncOutcome, SyncPlugin } from "./qualify-sync.js";
|
|
3
4
|
/** Where a system's packages install the distributed records. */
|
|
@@ -25,6 +26,10 @@ export declare const BOARD_MODEL_FILE = "/proc/device-tree/model";
|
|
|
25
26
|
export declare function readBoardModel(): string | undefined;
|
|
26
27
|
/** The host class of a board the layer knows by its device-tree model: `rpi5` for a Raspberry Pi 5 or its compute module. */
|
|
27
28
|
export declare function hostClassOfBoard(model: string | undefined): string | undefined;
|
|
29
|
+
/** The architecture `uname -m` names, or `undefined` when it cannot be read. */
|
|
30
|
+
export declare function readMachine(): string | undefined;
|
|
31
|
+
/** The host class of a machine with no board name, by `uname -m`: `x86-64` for an x86_64 one; none for an architecture without a class. */
|
|
32
|
+
export declare function hostClassOfMachine(arch: string | undefined): string | undefined;
|
|
28
33
|
/** One distributed record, read: where it is, what it says, and the set it came with. */
|
|
29
34
|
export interface DistributedRecord {
|
|
30
35
|
readonly path: string;
|
|
@@ -52,6 +57,8 @@ export declare function readDistributedLayer(dirs: readonly string[], hostClass:
|
|
|
52
57
|
export declare function distributedUri(item: SyncItem, r: DistributedRecord): string;
|
|
53
58
|
/** What the sync's own judgment would make of the record's verdict for the host, as `outcomeOf` reads a run. */
|
|
54
59
|
export declare function outcomeOfVerdict(v: Pick<RecordVerdict, "measured" | "rating" | "deciding">): SyncOutcome;
|
|
60
|
+
/** The cells a record's grid holds, by rate then quantum: where the set it came in was measured. */
|
|
61
|
+
export declare function recordCells(record: Pick<QualificationRecord, "measurements">): GridCell[];
|
|
55
62
|
/** What the layer makes of one item. */
|
|
56
63
|
export type DistributedMatch =
|
|
57
64
|
/** No distributed record names the plugin: it is measured, and nothing is said. */
|
|
@@ -62,20 +69,26 @@ export type DistributedMatch =
|
|
|
62
69
|
| {
|
|
63
70
|
readonly status: "ignored";
|
|
64
71
|
readonly lines: readonly string[];
|
|
65
|
-
}
|
|
72
|
+
}
|
|
73
|
+
/** A set applies; `lines` names every set tried before it and why it was passed over. */
|
|
74
|
+
| {
|
|
66
75
|
readonly status: "applies";
|
|
67
76
|
readonly set: string;
|
|
68
77
|
readonly records: readonly DistributedRecord[];
|
|
69
78
|
readonly files: readonly string[];
|
|
79
|
+
readonly lines: readonly string[];
|
|
70
80
|
};
|
|
71
81
|
/**
|
|
72
82
|
* Whether the item is taken from the layer. The records that find it are tried one set at a time, in the order the
|
|
73
83
|
* layer read them. Of a set, only the records whose every file is installed with the SHA-256 it recorded (computed
|
|
74
84
|
* here by `digest`) count: a record of other bytes is another build of the plugin and is passed over. The set applies
|
|
75
85
|
* when at least one record of these bytes holds a verdict for `host`, and none of those verdicts is one the source
|
|
76
|
-
* could not measure; a set with no record of these bytes is a binary that differs.
|
|
86
|
+
* could not measure; a set with no record of these bytes is a binary that differs. A set is per machine class, rate
|
|
87
|
+
* and quantum: of these records, only the ones whose grid holds every cell in `cells` (the cells the sync runs at)
|
|
88
|
+
* count, so a set measured at another cell is passed over, naming the cells it was measured at, and never answers a
|
|
89
|
+
* sync at this one by the order its name sorts in (#317). No cells given asks nothing of the grid.
|
|
77
90
|
*/
|
|
78
|
-
export declare function matchDistributed(layer: DistributedLayer, item: SyncItem, host: string, digest: (files: readonly string[]) => readonly FileDigest[] | undefined): DistributedMatch;
|
|
91
|
+
export declare function matchDistributed(layer: DistributedLayer, item: SyncItem, host: string, digest: (files: readonly string[]) => readonly FileDigest[] | undefined, cells?: readonly GridCell[]): DistributedMatch;
|
|
79
92
|
/**
|
|
80
93
|
* The records of a match copied into `qualificationDir` and the plugins they make: the probe output first, byte for
|
|
81
94
|
* byte and read back through this version's reader, its SHA-256 the one the record names; then the record with the
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
* treats the plugin as one it measured.
|
|
13
13
|
*/
|
|
14
14
|
import { readFileSync, readdirSync } from "node:fs";
|
|
15
|
+
import { machine } from "node:os";
|
|
15
16
|
import { join, resolve } from "node:path";
|
|
17
|
+
import { cellKey } from "./measurement-grid.js";
|
|
16
18
|
import { clapPinUri, pinVerdictOf } from "./pins-file.js";
|
|
17
19
|
import { integrityOfProbeOutput } from "./probe-judge.js";
|
|
18
20
|
import { readProbeOutput, sha256Hex } from "./probe-output.js";
|
|
@@ -41,6 +43,19 @@ export function hostClassOfBoard(model) {
|
|
|
41
43
|
const m = /^Raspberry Pi (?:Compute Module )?(\d)(?:\s|$)/.exec(model.replace(/\0/g, "").trim());
|
|
42
44
|
return m === null ? undefined : `rpi${m[1]}`;
|
|
43
45
|
}
|
|
46
|
+
/** The architecture `uname -m` names, or `undefined` when it cannot be read. */
|
|
47
|
+
export function readMachine() {
|
|
48
|
+
try {
|
|
49
|
+
return machine();
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/** The host class of a machine with no board name, by `uname -m`: `x86-64` for an x86_64 one; none for an architecture without a class. */
|
|
56
|
+
export function hostClassOfMachine(arch) {
|
|
57
|
+
return arch?.trim() === "x86_64" ? "x86-64" : undefined;
|
|
58
|
+
}
|
|
44
59
|
export const EMPTY_LAYER = { clap: new Map(), lv2: new Map(), sets: [], records: 0 };
|
|
45
60
|
const RECORD_SUFFIX = ".qualification.json";
|
|
46
61
|
const names = (dir) => {
|
|
@@ -122,14 +137,24 @@ export function outcomeOfVerdict(v) {
|
|
|
122
137
|
return "qualified";
|
|
123
138
|
return v.rating === "unsuitable" ? "refused" : "unmeasured";
|
|
124
139
|
}
|
|
140
|
+
/** The cells a record's grid holds, by rate then quantum: where the set it came in was measured. */
|
|
141
|
+
export function recordCells(record) {
|
|
142
|
+
const seen = new Map();
|
|
143
|
+
for (const p of record.measurements?.grid ?? [])
|
|
144
|
+
seen.set(cellKey(p), { rate: p.rate, quantum: p.quantum });
|
|
145
|
+
return [...seen.values()].sort((a, b) => a.rate - b.rate || a.quantum - b.quantum);
|
|
146
|
+
}
|
|
125
147
|
/**
|
|
126
148
|
* Whether the item is taken from the layer. The records that find it are tried one set at a time, in the order the
|
|
127
149
|
* layer read them. Of a set, only the records whose every file is installed with the SHA-256 it recorded (computed
|
|
128
150
|
* here by `digest`) count: a record of other bytes is another build of the plugin and is passed over. The set applies
|
|
129
151
|
* when at least one record of these bytes holds a verdict for `host`, and none of those verdicts is one the source
|
|
130
|
-
* could not measure; a set with no record of these bytes is a binary that differs.
|
|
152
|
+
* could not measure; a set with no record of these bytes is a binary that differs. A set is per machine class, rate
|
|
153
|
+
* and quantum: of these records, only the ones whose grid holds every cell in `cells` (the cells the sync runs at)
|
|
154
|
+
* count, so a set measured at another cell is passed over, naming the cells it was measured at, and never answers a
|
|
155
|
+
* sync at this one by the order its name sorts in (#317). No cells given asks nothing of the grid.
|
|
131
156
|
*/
|
|
132
|
-
export function matchDistributed(layer, item, host, digest) {
|
|
157
|
+
export function matchDistributed(layer, item, host, digest, cells = []) {
|
|
133
158
|
const found = item.format === "clap" ? layer.clap.get(resolve(join(item.root, item.files[0]))) : layer.lv2.get(item.uri ?? "");
|
|
134
159
|
if (found === undefined || found.length === 0)
|
|
135
160
|
return { status: "none" };
|
|
@@ -151,7 +176,16 @@ export function matchDistributed(layer, item, host, digest) {
|
|
|
151
176
|
say(`distributed: ${distributedUri(item, found.find((r) => r.set === set))}: binary differs`);
|
|
152
177
|
continue;
|
|
153
178
|
}
|
|
154
|
-
const
|
|
179
|
+
const atCell = records.filter((r) => {
|
|
180
|
+
const held = new Set(recordCells(r.record).map(cellKey));
|
|
181
|
+
return cells.every((c) => held.has(cellKey(c)));
|
|
182
|
+
});
|
|
183
|
+
if (atCell.length === 0) {
|
|
184
|
+
const measuredAt = [...new Set(records.flatMap((r) => recordCells(r.record).map(cellKey)))];
|
|
185
|
+
say(`distributed: ${distributedUri(item, records[0])}: set ${set} measured at ${measuredAt.length === 0 ? "no cell" : measuredAt.join(", ")}`);
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
const judged = atCell.filter((r) => r.record.verdicts.some((v) => v.host === host));
|
|
155
189
|
if (judged.length === 0) {
|
|
156
190
|
say(`distributed: ${distributedUri(item, records[0])}: no verdict for ${host} in ${set}`);
|
|
157
191
|
continue;
|
|
@@ -161,7 +195,7 @@ export function matchDistributed(layer, item, host, digest) {
|
|
|
161
195
|
say(`distributed: ${distributedUri(item, unmeasured)}: unmeasured in ${set}, measured here`);
|
|
162
196
|
continue;
|
|
163
197
|
}
|
|
164
|
-
return { status: "applies", set, records, files: [...new Set(
|
|
198
|
+
return { status: "applies", set, records: atCell, files: [...new Set(atCell.flatMap((r) => r.record.binary.files.map((f) => f.path)))], lines };
|
|
165
199
|
}
|
|
166
200
|
return { status: "ignored", lines };
|
|
167
201
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distributed-records.js","sourceRoot":"","sources":["../src/distributed-records.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,sDAAsD;AACtD;;;;;;;;;;GAUG;AACH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAiB,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,eAA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C,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;IAC9H,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ export * from "./cost-fields.js";
|
|
|
22
22
|
export * from "./probe-output.js";
|
|
23
23
|
export * from "./probe-judge.js";
|
|
24
24
|
export * from "./qualification-record.js";
|
|
25
|
+
export * from "./judgement-line.js";
|
|
26
|
+
export * from "./judged-layer.js";
|
|
25
27
|
export * from "./probe-runner.js";
|
|
26
28
|
export * from "./measurement-grid.js";
|
|
27
29
|
export * from "./memory-bound.js";
|
package/dist/index.js
CHANGED
|
@@ -24,6 +24,8 @@ export * from "./cost-fields.js";
|
|
|
24
24
|
export * from "./probe-output.js";
|
|
25
25
|
export * from "./probe-judge.js";
|
|
26
26
|
export * from "./qualification-record.js";
|
|
27
|
+
export * from "./judgement-line.js";
|
|
28
|
+
export * from "./judged-layer.js";
|
|
27
29
|
export * from "./probe-runner.js";
|
|
28
30
|
export * from "./measurement-grid.js";
|
|
29
31
|
export * from "./memory-bound.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,sDAAsD;AACtD;;;GAGG;AACH,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cA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AAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { type PinVerdict } from "./pins-file.js";
|
|
2
|
+
import { type QualificationRecord } from "./qualification-record.js";
|
|
3
|
+
/** The host a judged layer is written for: the one that runs plugins, in workers of its own (PLUGIN_DB_ISOLATION_HOSTS). */
|
|
4
|
+
export declare const JUDGED_HOST = "plugin-hostd";
|
|
5
|
+
/**
|
|
6
|
+
* The hosting epoch of each host a layer is written for. The epoch is the host owner's to move, when a release of it
|
|
7
|
+
* changes how it hosts; plugin-hostd has declared no hosting change since records were written, so its epoch is 0.
|
|
8
|
+
*/
|
|
9
|
+
export declare const HOSTING_EPOCH: {
|
|
10
|
+
readonly "plugin-hostd": 0;
|
|
11
|
+
};
|
|
12
|
+
/** The plugin-db envelope version this writes (plugin-db data/store.schema.json). */
|
|
13
|
+
export declare const PLUGIN_DB_ENVELOPE = 1;
|
|
14
|
+
/** The pin a layer is written for, as plugin-db's pinned layer holds it. */
|
|
15
|
+
export interface LayerPin {
|
|
16
|
+
/** The `omx-files/1` SHA-256 of the plugin's files. */
|
|
17
|
+
readonly files: string;
|
|
18
|
+
/** `<scheme>:<sha256>` of the parameter layout, or null when the pin holds none. */
|
|
19
|
+
readonly layout: string | null;
|
|
20
|
+
}
|
|
21
|
+
export interface JudgedCell {
|
|
22
|
+
readonly rate: number;
|
|
23
|
+
readonly quantum: number;
|
|
24
|
+
readonly latencyMs?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface JudgedBody {
|
|
27
|
+
readonly verdict: PinVerdict;
|
|
28
|
+
readonly machineClass: string;
|
|
29
|
+
readonly host: {
|
|
30
|
+
readonly name: string;
|
|
31
|
+
readonly version: string;
|
|
32
|
+
readonly hostingEpoch: number;
|
|
33
|
+
};
|
|
34
|
+
readonly rules: string;
|
|
35
|
+
readonly recordSchema: string;
|
|
36
|
+
readonly cells: readonly JudgedCell[];
|
|
37
|
+
readonly conditions: Readonly<Record<string, string>>;
|
|
38
|
+
readonly latencyLineMs: number;
|
|
39
|
+
}
|
|
40
|
+
export interface JudgedLayer {
|
|
41
|
+
readonly envelope: typeof PLUGIN_DB_ENVELOPE;
|
|
42
|
+
readonly layer: "judged";
|
|
43
|
+
readonly address: string;
|
|
44
|
+
readonly pin: LayerPin;
|
|
45
|
+
readonly writer: "plugin-qualify";
|
|
46
|
+
readonly body: JudgedBody;
|
|
47
|
+
}
|
|
48
|
+
/** What the converter is given beside the record: the class word, the pin, and the rules when the record states none. */
|
|
49
|
+
export interface JudgedLayerInput {
|
|
50
|
+
/** The machine class word the record was measured on (`rpi5`, `x86-64`): the set's host class. */
|
|
51
|
+
readonly machineClass: string;
|
|
52
|
+
readonly pin: LayerPin;
|
|
53
|
+
/** plugin-db's address; by default `<format>:<id>`. */
|
|
54
|
+
readonly address?: string;
|
|
55
|
+
/** The rules of a record that states none: the plugin-qualify version that judged its set (the set's provenance). */
|
|
56
|
+
readonly judgedBy?: string;
|
|
57
|
+
}
|
|
58
|
+
/** Why a record has no judged layer, when it has none. */
|
|
59
|
+
export type NoLayer = {
|
|
60
|
+
readonly layer: null;
|
|
61
|
+
readonly reason: string;
|
|
62
|
+
};
|
|
63
|
+
/** The cells of the record: each measured rate and quantum, with its latency in milliseconds when one was measured. */
|
|
64
|
+
export declare function judgedCells(record: QualificationRecord): JudgedCell[];
|
|
65
|
+
/**
|
|
66
|
+
* The judged layer of a record, or why there is none. The verdict is the isolated tier host's, as the pins file gives
|
|
67
|
+
* it; the host is plugin-hostd at the probe runner's version, which is plugin-hostd's.
|
|
68
|
+
*/
|
|
69
|
+
export declare function judgedLayerOf(record: QualificationRecord, input: JudgedLayerInput): JudgedLayer | NoLayer;
|
|
70
|
+
export interface JudgedLayerArgs {
|
|
71
|
+
readonly record: string;
|
|
72
|
+
readonly machineClass: string;
|
|
73
|
+
readonly files: string;
|
|
74
|
+
readonly layout: string | null;
|
|
75
|
+
readonly judgedBy?: string;
|
|
76
|
+
readonly address?: string;
|
|
77
|
+
/** Print the body only, as `plugin-db put <address> judged --writer plugin-qualify` reads it from stdin. */
|
|
78
|
+
readonly body: boolean;
|
|
79
|
+
}
|
|
80
|
+
export declare function judgedLayerHelpText(): string;
|
|
81
|
+
export type ParsedJudgedLayerArgs = {
|
|
82
|
+
ok: true;
|
|
83
|
+
args: JudgedLayerArgs;
|
|
84
|
+
} | {
|
|
85
|
+
ok: true;
|
|
86
|
+
help: true;
|
|
87
|
+
} | {
|
|
88
|
+
ok: false;
|
|
89
|
+
error: string;
|
|
90
|
+
};
|
|
91
|
+
export declare function parseJudgedLayerArgs(argv: readonly string[]): ParsedJudgedLayerArgs;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
// Copyright (C) 2026 Pau Aliagas <linuxnow@gmail.com>
|
|
3
|
+
/**
|
|
4
|
+
* The judged layer of a plugin-db entry, from a qualification record: plugin-qualify is that layer's one writer
|
|
5
|
+
* (plugin-db's records design note, FreeMixer/plugin-db#10). The reader never parses a record; it reads the layer this writes, so every field
|
|
6
|
+
* the state function reads is set here, from the record and from what plugin-qualify declares once:
|
|
7
|
+
*
|
|
8
|
+
* - the latency line (`LATENCY_LINE_MS`), written beside each cell's figure (`latencyMs`), so a surface shows the
|
|
9
|
+
* figure within or over the line and keeps no tier word (openmixer plugin-system design 7.15);
|
|
10
|
+
* - the rules the record was judged by (`judgementRules`), the minor of the plugin-qualify that judged it: a rule
|
|
11
|
+
* changes only in a minor, so a patch release leaves every record current;
|
|
12
|
+
* - the hosting epoch of the host the verdict is for (`HOSTING_EPOCH`).
|
|
13
|
+
*
|
|
14
|
+
* One layer is one verdict under one host: the host plugin-hostd runs a plugin with. Its verdict is the one the pins
|
|
15
|
+
* file gives the same bytes (`pinVerdictOf` of the isolated tier's host, omx-clap-host, which is plugin-hostd's
|
|
16
|
+
* worker). A record whose verdict for that host was not measured has no judged layer: the reader then answers
|
|
17
|
+
* unqualified, with its reason.
|
|
18
|
+
*/
|
|
19
|
+
import { judgementRules, latencyMsOf, LATENCY_LINE_MS } from "./judgement-line.js";
|
|
20
|
+
import { pinVerdictOf } from "./pins-file.js";
|
|
21
|
+
import { QUALIFICATION_RECORD_SCHEMA, ISOLATED_TIER_HOST } from "./qualification-record.js";
|
|
22
|
+
/** The host a judged layer is written for: the one that runs plugins, in workers of its own (PLUGIN_DB_ISOLATION_HOSTS). */
|
|
23
|
+
export const JUDGED_HOST = "plugin-hostd";
|
|
24
|
+
/**
|
|
25
|
+
* The hosting epoch of each host a layer is written for. The epoch is the host owner's to move, when a release of it
|
|
26
|
+
* changes how it hosts; plugin-hostd has declared no hosting change since records were written, so its epoch is 0.
|
|
27
|
+
*/
|
|
28
|
+
export const HOSTING_EPOCH = { [JUDGED_HOST]: 0 };
|
|
29
|
+
/** The plugin-db envelope version this writes (plugin-db data/store.schema.json). */
|
|
30
|
+
export const PLUGIN_DB_ENVELOPE = 1;
|
|
31
|
+
/** The version of a tool named `<name> <version>` in the record's `tool`. */
|
|
32
|
+
function versionOf(record, name) {
|
|
33
|
+
for (const v of Object.values(record.tool)) {
|
|
34
|
+
const m = new RegExp(`^${name.replace(/[-.]/g, "\\$&")} (\\S+)$`).exec(v);
|
|
35
|
+
if (m)
|
|
36
|
+
return m[1];
|
|
37
|
+
}
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
/** The cells of the record: each measured rate and quantum, with its latency in milliseconds when one was measured. */
|
|
41
|
+
export function judgedCells(record) {
|
|
42
|
+
return record.measurements.grid
|
|
43
|
+
.filter((p) => p.outcome === "probe.ok")
|
|
44
|
+
.map((p) => {
|
|
45
|
+
const frames = p.latency.measuredFrames;
|
|
46
|
+
return { rate: p.rate, quantum: p.quantum, ...(frames === undefined ? {} : { latencyMs: latencyMsOf(frames, p.rate) }) };
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The judged layer of a record, or why there is none. The verdict is the isolated tier host's, as the pins file gives
|
|
51
|
+
* it; the host is plugin-hostd at the probe runner's version, which is plugin-hostd's.
|
|
52
|
+
*/
|
|
53
|
+
export function judgedLayerOf(record, input) {
|
|
54
|
+
if (record.schema !== QUALIFICATION_RECORD_SCHEMA)
|
|
55
|
+
return { layer: null, reason: `record schema ${JSON.stringify(record.schema)} is not ${QUALIFICATION_RECORD_SCHEMA}` };
|
|
56
|
+
const tierHost = ISOLATED_TIER_HOST[record.plugin.format];
|
|
57
|
+
const v = record.verdicts.find((r) => r.host === tierHost);
|
|
58
|
+
if (v === undefined)
|
|
59
|
+
return { layer: null, reason: `no verdict under ${tierHost ?? `a host for ${record.plugin.format}`}` };
|
|
60
|
+
const verdict = v.measured ? pinVerdictOf(v.rating) : undefined;
|
|
61
|
+
if (verdict === undefined)
|
|
62
|
+
return { layer: null, reason: `${tierHost}: not measured (${v.deciding ?? v.rating})` };
|
|
63
|
+
const hostVersion = versionOf(record, "plugin-hostd-probe");
|
|
64
|
+
if (hostVersion === undefined)
|
|
65
|
+
return { layer: null, reason: "the record names no plugin-hostd-probe version" };
|
|
66
|
+
const rules = record.rules ?? (input.judgedBy === undefined ? undefined : judgementRules(input.judgedBy));
|
|
67
|
+
if (rules === undefined)
|
|
68
|
+
return { layer: null, reason: "the record states no rules, and no judgedBy was given" };
|
|
69
|
+
return {
|
|
70
|
+
envelope: PLUGIN_DB_ENVELOPE,
|
|
71
|
+
layer: "judged",
|
|
72
|
+
address: input.address ?? `${record.plugin.format}:${record.plugin.id}`,
|
|
73
|
+
pin: input.pin,
|
|
74
|
+
writer: "plugin-qualify",
|
|
75
|
+
body: {
|
|
76
|
+
verdict,
|
|
77
|
+
machineClass: input.machineClass,
|
|
78
|
+
host: { name: JUDGED_HOST, version: hostVersion, hostingEpoch: HOSTING_EPOCH[JUDGED_HOST] },
|
|
79
|
+
rules,
|
|
80
|
+
recordSchema: record.schema,
|
|
81
|
+
cells: judgedCells(record),
|
|
82
|
+
conditions: {},
|
|
83
|
+
latencyLineMs: record.latencyLineMs ?? LATENCY_LINE_MS,
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
export function judgedLayerHelpText() {
|
|
88
|
+
return [
|
|
89
|
+
"usage: plugin-qualify judged-layer <record.qualification.json> --machine-class <word> --files <sha256>",
|
|
90
|
+
" [--layout <scheme>:<sha256>] [--judged-by <version>] [--address <address>] [--body]",
|
|
91
|
+
"",
|
|
92
|
+
"Print the plugin-db judged layer of a qualification record, for the pin plugin-db holds (its files digest and",
|
|
93
|
+
"layout). --judged-by names the plugin-qualify that judged a record stating no rules (the set's provenance). --body",
|
|
94
|
+
"prints the body only, for `plugin-db put <address> judged --writer plugin-qualify`. A record whose verdict under",
|
|
95
|
+
"plugin-hostd's worker was not measured has no layer: the reason is printed and the exit status is 1.",
|
|
96
|
+
"",
|
|
97
|
+
].join("\n");
|
|
98
|
+
}
|
|
99
|
+
export function parseJudgedLayerArgs(argv) {
|
|
100
|
+
const opts = {};
|
|
101
|
+
const files = [];
|
|
102
|
+
let body = false;
|
|
103
|
+
for (let i = 0; i < argv.length; i++) {
|
|
104
|
+
const a = argv[i];
|
|
105
|
+
if (a === "--help" || a === "-h")
|
|
106
|
+
return { ok: true, help: true };
|
|
107
|
+
if (a === "--body")
|
|
108
|
+
body = true;
|
|
109
|
+
else if (["--machine-class", "--files", "--layout", "--judged-by", "--address"].includes(a)) {
|
|
110
|
+
const v = argv[++i];
|
|
111
|
+
if (v === undefined || v.startsWith("--"))
|
|
112
|
+
return { ok: false, error: `${a} needs a value` };
|
|
113
|
+
opts[a] = v;
|
|
114
|
+
}
|
|
115
|
+
else if (a.startsWith("--"))
|
|
116
|
+
return { ok: false, error: `unknown option ${a}` };
|
|
117
|
+
else
|
|
118
|
+
files.push(a);
|
|
119
|
+
}
|
|
120
|
+
if (files.length !== 1)
|
|
121
|
+
return { ok: false, error: "name one record" };
|
|
122
|
+
const machineClass = opts["--machine-class"];
|
|
123
|
+
const pinFiles = opts["--files"];
|
|
124
|
+
if (machineClass === undefined)
|
|
125
|
+
return { ok: false, error: "--machine-class is required" };
|
|
126
|
+
if (pinFiles === undefined || !/^[0-9a-f]{64}$/.test(pinFiles))
|
|
127
|
+
return { ok: false, error: "--files must be the 64 hex digits of the files pin" };
|
|
128
|
+
const layout = opts["--layout"] ?? null;
|
|
129
|
+
if (layout !== null && !/^[^:]+:[0-9a-f]{64}$/.test(layout))
|
|
130
|
+
return { ok: false, error: "--layout must be <scheme>:<sha256>" };
|
|
131
|
+
return {
|
|
132
|
+
ok: true,
|
|
133
|
+
args: {
|
|
134
|
+
record: files[0],
|
|
135
|
+
machineClass,
|
|
136
|
+
files: pinFiles,
|
|
137
|
+
layout,
|
|
138
|
+
body,
|
|
139
|
+
...(opts["--judged-by"] === undefined ? {} : { judgedBy: opts["--judged-by"] }),
|
|
140
|
+
...(opts["--address"] === undefined ? {} : { address: opts["--address"] }),
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
//# s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written into every record and judged layer. */
|
|
2
|
+
export declare const LATENCY_LINE_MS = 5;
|
|
3
|
+
/** A measured latency in milliseconds at its rate, rounded to the microsecond. */
|
|
4
|
+
export declare const latencyMsOf: (frames: number, rate: number) => number;
|
|
5
|
+
/** The rules a plugin-qualify of this version judges by: `plugin-qualify-rules/<major>.<minor>`. */
|
|
6
|
+
export declare function judgementRules(version?: string): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
// Copyright (C) 2026 Pau Aliagas <linuxnow@gmail.com>
|
|
3
|
+
/**
|
|
4
|
+
* What plugin-qualify's judgement declares once and writes into every record (and so into every judged layer): the
|
|
5
|
+
* latency line and the rules a record was judged by (openmixer plugin-system design 7.15, plugin-db records.md).
|
|
6
|
+
*/
|
|
7
|
+
import { readFileSync } from "node:fs";
|
|
8
|
+
/** The latency line, in milliseconds: declared once, here, and written into every record and judged layer. */
|
|
9
|
+
export const LATENCY_LINE_MS = 5;
|
|
10
|
+
/** A measured latency in milliseconds at its rate, rounded to the microsecond. */
|
|
11
|
+
export const latencyMsOf = (frames, rate) => Math.round((frames * 1e9) / rate) / 1e6;
|
|
12
|
+
const VERSION = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
|
|
13
|
+
/** The rules a plugin-qualify of this version judges by: `plugin-qualify-rules/<major>.<minor>`. */
|
|
14
|
+
export function judgementRules(version = VERSION) {
|
|
15
|
+
const m = /^(\d+)\.(\d+)\.\d+/.exec(version);
|
|
16
|
+
if (m === null)
|
|
17
|
+
throw new Error(`judgementRules: ${JSON.stringify(version)} is no version`);
|
|
18
|
+
return `plugin-qualify-rules/${m[1]}.${m[2]}`;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=judgement-line.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"judgement-line.js","sourceRoot":"","sources":["../src/judgement-line.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,sDAAsD;AACtD;;;GAGG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,8GAA8G;AAC9G,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AAEjC,kFAAkF;AAClF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAc,EAAE,IAAY,EAAU,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,GAAG,CAAC;AAE7G,MAAM,OAAO,GAAW,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,GAAG,CAAC,iBAAiB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;AAE9G,oGAAoG;AACpG,MAAM,UAAU,cAAc,CAAC,UAAkB,OAAO;IACtD,MAAM,CAAC,GAAG,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7C,IAAI,CAAC,KAAK,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC5F,OAAO,wBAAwB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAChD,CAAC"}
|
|
@@ -207,6 +207,8 @@ export interface AssemblyInput {
|
|
|
207
207
|
readonly catalog?: unknown;
|
|
208
208
|
/** The hosting pass's lines ({@link hostingLine}), one per plugin. Absent when it did not run. */
|
|
209
209
|
readonly hosting?: readonly unknown[];
|
|
210
|
+
/** The measurer's `--pin` lines ({@link hostingLine}), one per plugin, for a run with no hosting pass. Absent when the pin step did not run. */
|
|
211
|
+
readonly pins?: readonly unknown[];
|
|
210
212
|
/** The cost pass's provenance JSON, already parsed. Absent on a latency-only run. */
|
|
211
213
|
readonly costProvenance?: unknown;
|
|
212
214
|
/** Host facts, for a run whose provenance the cost pass did not write. */
|