@openmixer/plugin-qualify 0.18.0 → 0.18.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/README.md +84 -2
- package/bin/plugin-qualify-sync.mjs +3 -1
- package/dist/distributed-records.d.ts +4 -2
- package/dist/distributed-records.js +1 -1
- package/dist/distributed-records.js.map +1 -1
- package/dist/host-admission.d.ts +2 -0
- package/dist/host-admission.js +12 -3
- package/dist/host-admission.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/probe-judge.d.ts +11 -0
- package/dist/probe-judge.js +4 -1
- package/dist/probe-judge.js.map +1 -1
- package/dist/probe-runner.js +3 -2
- package/dist/probe-runner.js.map +1 -1
- package/dist/qualification-record.d.ts +90 -8
- package/dist/qualification-record.js +18 -13
- package/dist/qualification-record.js.map +1 -1
- package/dist/qualify-adapter-pass.d.ts +67 -0
- package/dist/qualify-adapter-pass.js +255 -0
- package/dist/qualify-adapter-pass.js.map +1 -0
- package/dist/qualify-declarations.d.ts +25 -0
- package/dist/qualify-declarations.js +17 -1
- package/dist/qualify-declarations.js.map +1 -1
- package/dist/qualify-rejudge.d.ts +81 -0
- package/dist/qualify-rejudge.js +421 -0
- package/dist/qualify-rejudge.js.map +1 -0
- package/dist/qualify-sync.d.ts +72 -1
- package/dist/qualify-sync.js +176 -17
- package/dist/qualify-sync.js.map +1 -1
- package/fixtures/records-0.16.1/http___example.org_raffo@unversioned-2060c09ff626.default.probe.json +46 -0
- package/fixtures/records-0.16.1/http___example.org_raffo@unversioned-2060c09ff626.default.qualification.json +185 -0
- package/fixtures/records-0.16.1/http___lv2plug.in_plugins_eg-amp@unversioned-f046a60efd45.default.probe.json +51 -0
- package/fixtures/records-0.16.1/http___lv2plug.in_plugins_eg-amp@unversioned-f046a60efd45.default.qualification.json +232 -0
- package/fixtures/records-0.16.1/https___github.com_lucianodato_noise-repellent@unversioned-c3b5e21dd9a7.default.probe.json +51 -0
- package/fixtures/records-0.16.1/https___github.com_lucianodato_noise-repellent@unversioned-c3b5e21dd9a7.default.qualification.json +245 -0
- package/fixtures/records-0.16.1/in.lsp-plug.impulse_responses_mono@unversioned-d5235d2f5f53.custom.probe.json +52 -0
- package/fixtures/records-0.16.1/in.lsp-plug.impulse_responses_mono@unversioned-d5235d2f5f53.custom.qualification.json +145 -0
- package/fixtures/records-0.16.1/in.lsp-plug.trigger_midi_mono@unversioned-d5235d2f5f53.custom.probe.json +52 -0
- package/fixtures/records-0.16.1/in.lsp-plug.trigger_midi_mono@unversioned-d5235d2f5f53.custom.qualification.json +155 -0
- package/package.json +1 -1
- package/src/distributed-records.ts +1 -1
- package/src/host-admission.ts +13 -3
- package/src/index.ts +2 -0
- package/src/probe-judge.ts +8 -1
- package/src/probe-runner.ts +2 -2
- package/src/qualification-record.ts +100 -15
- package/src/qualify-adapter-pass.ts +278 -0
- package/src/qualify-declarations.ts +19 -1
- package/src/qualify-rejudge.ts +452 -0
- package/src/qualify-sync.ts +192 -17
- package/tools/lv2_resolve.py +49 -0
- package/tools/mod-host-admit.mjs +21 -5
|
@@ -131,6 +131,22 @@ export const MEMORY_LIMIT_RAM_FRACTION = 0.5;
|
|
|
131
131
|
export const ADDRESS_SPACE_LIMIT_RAM_FRACTION = 1;
|
|
132
132
|
export const MEMORY_BOUND_EXIT_ENV = "OMX_RT_OOM_EXIT";
|
|
133
133
|
export const MEMORY_BOUND_EXIT_STATUS = 121;
|
|
134
|
+
/**
|
|
135
|
+
* The memory-only pass (`plugin-qualify-sync --memory-only`). With `PROBE_MEMORY_ONLY_ENV` set the probers take the
|
|
136
|
+
* footprint and nothing else; the probe runner passes its environment on, so its limits hold unchanged.
|
|
137
|
+
* `PROBE_NOTES_ENV` is the count of notes an instrument that declares no voice capacity holds, basis `probe`:
|
|
138
|
+
* `MEMORY_PASS_PROBE_NOTES` unless `memory_notes` says otherwise.
|
|
139
|
+
*/
|
|
140
|
+
export const PROBE_MEMORY_ONLY_ENV = "OMX_PROBE_MEMORY_ONLY";
|
|
141
|
+
export const PROBE_NOTES_ENV = "OMX_PROBE_NOTES";
|
|
142
|
+
export const MEMORY_PASS_PROBE_NOTES = 16;
|
|
143
|
+
/**
|
|
144
|
+
* What `tools/mod-host-admit.mjs` is told in an adapter-only pass: how long the host has for one command, its address
|
|
145
|
+
* space (`ulimit -v`, in KB) and the directory for the state files of the plugin it loads.
|
|
146
|
+
*/
|
|
147
|
+
export const ADMIT_STEP_MS_ENV = "OMX_ADMIT_STEP_MS";
|
|
148
|
+
export const ADMIT_ADDRESS_KB_ENV = "OMX_ADMIT_ADDRESS_KB";
|
|
149
|
+
export const ADMIT_STATE_DIR_ENV = "OMX_ADMIT_STATE_DIR";
|
|
134
150
|
/** Seconds one `.clap` may take to qualify at every rate before the prober is killed. */
|
|
135
151
|
export const CLAP_QUALIFY_TIMEOUT_S = 120;
|
|
136
152
|
/**
|
|
@@ -220,7 +236,7 @@ const piMemory = (ramGib) => ({
|
|
|
220
236
|
* the other kits, the one a Pi 5 with no kit card also ran its stress and first boot at. The Zynthian benchmark's matrix sweeps
|
|
221
237
|
* more cells; these two are what a Pi is set to.
|
|
222
238
|
*/
|
|
223
|
-
const PI_CELLS = [
|
|
239
|
+
export const PI_CELLS = [
|
|
224
240
|
{ rate: MEASURE_BASE_RATE, quantum: 128 },
|
|
225
241
|
{ rate: MEASURE_BASE_RATE, quantum: 256 },
|
|
226
242
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qualify-declarations.js","sourceRoot":"","sources":["../src/qualify-declarations.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,sDAAsD;AACtD,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE7E;;;;GAIG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,CAAC;AAEzC;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,G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AAE,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE;IAC3H,IAAI,EAAE,EAAE,mBAAmB,EAAE,IAAI,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,GAAG,EAAE;IAC1E,UAAU,EAAE,EAAE,mBAAmB,EAAE,IAAI,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,GAAG,EAAE;IAChF,eAAe,EAAE,EAAE,mBAAmB,EAAE,IAAI,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,GAAG,EAAE;IACrF,kBAAkB,EAAE,EAAE,mBAAmB,EAAE,IAAI,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE;IAC7G,kBAAkB,EAAE,EAAE,mBAAmB,EAAE,IAAI,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE;CACtD,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { type GridCell } from "./measurement-grid.js";
|
|
2
|
+
import { type ProbeOutput } from "./probe-output.js";
|
|
3
|
+
import { type ProbeRun } from "./probe-runner.js";
|
|
4
|
+
import { type NotMeasured, type OwedMeasurement, type QualificationRecord } from "./qualification-record.js";
|
|
5
|
+
import { type SyncContext, type SyncState } from "./qualify-sync.js";
|
|
6
|
+
/** The codes of a measurement a record owes. */
|
|
7
|
+
export declare const OWED_CODE: {
|
|
8
|
+
/** An LV2 verdict of a host that runs it through the adapter, and no measured adapter run. */
|
|
9
|
+
readonly adapterRun: "qualify.sync.adapter-run-owed";
|
|
10
|
+
/** A verdict decided by a run under its host (mod-host, jalv), and no run in the record. */
|
|
11
|
+
readonly hostRun: "qualify.sync.host-run-owed";
|
|
12
|
+
/** The plugin's files are not the bytes the record measured. */
|
|
13
|
+
readonly bytesChanged: "qualify.sync.bytes-changed";
|
|
14
|
+
/** The probe output is missing, is not the copy the record names, or does not read. */
|
|
15
|
+
readonly figuresUnreadable: "qualify.sync.figures-unreadable";
|
|
16
|
+
/** The plugin has a record that holds no figures at all. */
|
|
17
|
+
readonly noFigures: "qualify.sync.no-figures";
|
|
18
|
+
};
|
|
19
|
+
/** The cells the memory-only pass measures: the ones a Pi runs, 48 kHz at 128 and 256 frames. */
|
|
20
|
+
export declare const MEMORY_PASS_CELLS: readonly GridCell[];
|
|
21
|
+
/** What a memory-only pass cannot say, in every record it writes to: growth over time needs a soak. */
|
|
22
|
+
export declare const MEMORY_PASS_NOT_MEASURED: NotMeasured;
|
|
23
|
+
/** The tool as the record says it: this package's own version, read where it is installed. */
|
|
24
|
+
export declare function rejudgeToolName(): string;
|
|
25
|
+
/** A world holding one bundle, as plugin-hostd runs a pinned LV2 plugin, for as long as `body` runs. */
|
|
26
|
+
export declare function lv2World<T>(bundle: string, body: (world: string) => T): T;
|
|
27
|
+
export declare class RejudgeRefusal extends Error {
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* One record judged again from its probe output, with what it owes. The figures, who took them and when are as they were;
|
|
31
|
+
* only the verdicts, the tiers and the cost reasons beside them are new. `at` is the prior re-judge's when nothing else
|
|
32
|
+
* differs, so that a second run leaves the file alone.
|
|
33
|
+
*/
|
|
34
|
+
export declare function rejudgeRecord(record: QualificationRecord, probeBytes: Uint8Array, options: {
|
|
35
|
+
readonly host: string;
|
|
36
|
+
readonly by: string;
|
|
37
|
+
readonly at: string;
|
|
38
|
+
}): {
|
|
39
|
+
record: QualificationRecord;
|
|
40
|
+
owes: readonly OwedMeasurement[];
|
|
41
|
+
};
|
|
42
|
+
/** The file that lists what a re-judge left owing, beside the state file. */
|
|
43
|
+
export declare const owedFile: (stateFile: string) => string;
|
|
44
|
+
export declare const OWED_SCHEMA = "plugin-qualify.owed/1";
|
|
45
|
+
export interface OwingRecord {
|
|
46
|
+
readonly plugin: string;
|
|
47
|
+
/** The record's file name, when the plugin has one. */
|
|
48
|
+
readonly record?: string;
|
|
49
|
+
readonly owes: readonly OwedMeasurement[];
|
|
50
|
+
}
|
|
51
|
+
export interface RejudgeResult {
|
|
52
|
+
readonly state: SyncState;
|
|
53
|
+
readonly changed: number;
|
|
54
|
+
readonly unchanged: number;
|
|
55
|
+
readonly owing: readonly OwingRecord[];
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Every record of the device's qualification directory judged again, the state's outcomes and pin words brought into line,
|
|
59
|
+
* and the list of what is owed written beside the state file. Each file is written whole, and only when it differs.
|
|
60
|
+
*/
|
|
61
|
+
export declare function rejudgeState(ctx: SyncContext, state: SyncState, now?: () => string): RejudgeResult;
|
|
62
|
+
/**
|
|
63
|
+
* A memory-only run's footprints in a record: the `memory` of each cell and nothing else of it, a cell the record's grid
|
|
64
|
+
* does not hold joined with no other figure. A cell the run could not read says why instead of a figure, so that it is
|
|
65
|
+
* never read as fitting. Pure.
|
|
66
|
+
*/
|
|
67
|
+
export declare function mergeMemoryRun(record: QualificationRecord, output: ProbeOutput, cells: readonly GridCell[]): QualificationRecord;
|
|
68
|
+
export interface MemoryPassResult {
|
|
69
|
+
readonly measured: number;
|
|
70
|
+
readonly already: number;
|
|
71
|
+
readonly failed: number;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The footprint of each plugin of the state, at `MEMORY_PASS_CELLS`, merged into the record its verdict for this run's host
|
|
75
|
+
* came from. One plugin's failure is that plugin's; each record is written whole as its plugin ends, so a pass cut short
|
|
76
|
+
* keeps what it finished, and a pass run again skips those unless `force`.
|
|
77
|
+
*/
|
|
78
|
+
export declare function memoryPass(ctx: SyncContext, state: SyncState, options?: {
|
|
79
|
+
readonly force?: boolean;
|
|
80
|
+
readonly run?: ProbeRun;
|
|
81
|
+
}): MemoryPassResult;
|
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
// Copyright (C) 2026 Pau Aliagas <linuxnow@gmail.com>
|
|
3
|
+
/**
|
|
4
|
+
* Keeping a device's qualification records through an upgrade, instead of measuring every plugin again. An upgrade is a
|
|
5
|
+
* different host (`HOSTING_NOTE`): the figures are carried across and judged again, never trusted.
|
|
6
|
+
*
|
|
7
|
+
* `plugin-qualify-sync --rejudge` measures nothing. Each record's probe output goes through the one judge
|
|
8
|
+
* (`judgeProbeOutput`) under today's rules, with the host runs the record already holds, and the verdicts, the tiers and
|
|
9
|
+
* the plugin's pin word are replaced; the figures and their provenance are not touched, and the record says who took the
|
|
10
|
+
* figures and when. A verdict that needs a run the record lacks (an LV2 plugin's omx-clap-host verdict is decided by its
|
|
11
|
+
* adapter run) reads `unknown`, and the record owes that run: nothing is guessed, and a run that never happened gives a
|
|
12
|
+
* plugin no pin word. A record whose plugin's bytes changed, or whose probe output is not the one it names, is left as it
|
|
13
|
+
* is and owes a qualification. A second run changes nothing.
|
|
14
|
+
*
|
|
15
|
+
* `plugin-qualify-sync --memory-only` takes one figure: the footprint of each recorded plugin at the cells a Pi runs,
|
|
16
|
+
* through the probe runner, under the limits of an ordinary run, in a world of its bundle only. Only the `memory` of those
|
|
17
|
+
* cells changes in the record. It judges nothing: a `--rejudge` afterwards reads the footprints. Growth over time needs a
|
|
18
|
+
* soak, which this does not run: the record says so in `notMeasured`.
|
|
19
|
+
*/
|
|
20
|
+
import { mkdtempSync, readFileSync, readdirSync, rmSync, symlinkSync } from "node:fs";
|
|
21
|
+
import { tmpdir } from "node:os";
|
|
22
|
+
import { basename, dirname, join } from "node:path";
|
|
23
|
+
import { outcomeOfVerdict } from "./distributed-records.js";
|
|
24
|
+
import { ADAPTER_RUN_HOSTS, ADMITTED_HOSTS } from "./host-admission.js";
|
|
25
|
+
import { OMX_CLAP_HOST_CONFIGURED_EXTENSIONS, shippedHostProfile } from "./host-profiles.js";
|
|
26
|
+
import { HOSTING_CODE } from "./hosting-codes.js";
|
|
27
|
+
import { readMemoryFootprint } from "./measurement/format.js";
|
|
28
|
+
import { cellKey } from "./measurement-grid.js";
|
|
29
|
+
import { pinVerdictOf } from "./pins-file.js";
|
|
30
|
+
import { failedOutcome, judgeProbeOutput } from "./probe-judge.js";
|
|
31
|
+
import { PROBE_OK, readProbeOutput, sha256Hex } from "./probe-output.js";
|
|
32
|
+
import { probeTarget, ProbeRunnerError } from "./probe-runner.js";
|
|
33
|
+
import { proberOffer } from "./clap-qualify.js";
|
|
34
|
+
import { IN_PROCESS_TIER_HOST, ISOLATED_TIER_HOST, QUALIFICATION_RECORD_SCHEMA, memoryOfCell, tiersOf, unmeasuredWordOf, verdictRows, } from "./qualification-record.js";
|
|
35
|
+
import { PI_CELLS, PROBE_MEMORY_ONLY_ENV, PROBE_NOTES_ENV } from "./qualify-declarations.js";
|
|
36
|
+
import { SYNC_STATE_SCHEMA, digestFiles, recordStem } from "./qualify-sync.js";
|
|
37
|
+
import { writeFileWhole } from "./whole-file.js";
|
|
38
|
+
/** The codes of a measurement a record owes. */
|
|
39
|
+
export const OWED_CODE = {
|
|
40
|
+
/** An LV2 verdict of a host that runs it through the adapter, and no measured adapter run. */
|
|
41
|
+
adapterRun: "qualify.sync.adapter-run-owed",
|
|
42
|
+
/** A verdict decided by a run under its host (mod-host, jalv), and no run in the record. */
|
|
43
|
+
hostRun: "qualify.sync.host-run-owed",
|
|
44
|
+
/** The plugin's files are not the bytes the record measured. */
|
|
45
|
+
bytesChanged: "qualify.sync.bytes-changed",
|
|
46
|
+
/** The probe output is missing, is not the copy the record names, or does not read. */
|
|
47
|
+
figuresUnreadable: "qualify.sync.figures-unreadable",
|
|
48
|
+
/** The plugin has a record that holds no figures at all. */
|
|
49
|
+
noFigures: "qualify.sync.no-figures",
|
|
50
|
+
};
|
|
51
|
+
/** The cells the memory-only pass measures: the ones a Pi runs, 48 kHz at 128 and 256 frames. */
|
|
52
|
+
export const MEMORY_PASS_CELLS = PI_CELLS;
|
|
53
|
+
/** What a memory-only pass cannot say, in every record it writes to: growth over time needs a soak. */
|
|
54
|
+
export const MEMORY_PASS_NOT_MEASURED = { dimension: "memoryGrowth", code: HOSTING_CODE.stabilityUnsoaked };
|
|
55
|
+
const RECORD_SUFFIX = ".qualification.json";
|
|
56
|
+
/** The tool as the record says it: this package's own version, read where it is installed. */
|
|
57
|
+
export function rejudgeToolName() {
|
|
58
|
+
try {
|
|
59
|
+
const pkg = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
60
|
+
return `plugin-qualify ${pkg.version ?? "unknown"}`;
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
return "plugin-qualify unknown";
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/** A world holding one bundle, as plugin-hostd runs a pinned LV2 plugin, for as long as `body` runs. */
|
|
67
|
+
export function lv2World(bundle, body) {
|
|
68
|
+
const world = mkdtempSync(join(tmpdir(), "plugin-qualify-sync-world-"));
|
|
69
|
+
try {
|
|
70
|
+
symlinkSync(bundle, join(world, basename(bundle)));
|
|
71
|
+
return body(world);
|
|
72
|
+
}
|
|
73
|
+
finally {
|
|
74
|
+
rmSync(world, { recursive: true, force: true });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
// --- the judgment of one record ---------------------------------------------------------------------------------------
|
|
78
|
+
/** The probe output with the footprints a memory-only pass merged into the record: the probe copy itself stays as it was taken. */
|
|
79
|
+
function withMemoryRun(output, record) {
|
|
80
|
+
const merged = record.memoryRun;
|
|
81
|
+
if (merged === undefined)
|
|
82
|
+
return output;
|
|
83
|
+
const grid = [...output.grid];
|
|
84
|
+
for (const c of merged.cells) {
|
|
85
|
+
const point = record.measurements.grid.find((p) => p.rate === c.rate && p.quantum === c.quantum);
|
|
86
|
+
const memory = readMemoryFootprint(point?.memory);
|
|
87
|
+
if (memory === undefined)
|
|
88
|
+
continue;
|
|
89
|
+
const at = grid.findIndex((p) => p.rate === c.rate && p.quantum === c.quantum);
|
|
90
|
+
if (at >= 0)
|
|
91
|
+
grid[at] = { ...grid[at], memory };
|
|
92
|
+
else
|
|
93
|
+
grid.push({ rate: c.rate, quantum: c.quantum, outcome: PROBE_OK, memory });
|
|
94
|
+
}
|
|
95
|
+
return { ...output, grid };
|
|
96
|
+
}
|
|
97
|
+
/** The offer a profile is judged under for a CLAP plugin; `undefined` for a host the prober cannot stand in for. */
|
|
98
|
+
const offerIdOf = (profile) => {
|
|
99
|
+
const offer = proberOffer(profile);
|
|
100
|
+
return offer === undefined ? undefined : offer.length > 0 ? "custom" : "default";
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* The profiles a record is judged under: the hosts it has verdicts for, the console's two tiers, the host of this run, and
|
|
104
|
+
* the Pi boards, whose budgets read the footprints. A host only joins a CLAP plugin's record of its own offer.
|
|
105
|
+
*/
|
|
106
|
+
function rejudgeProfiles(record, output, host) {
|
|
107
|
+
const format = output.plugin.format;
|
|
108
|
+
const added = [IN_PROCESS_TIER_HOST, ISOLATED_TIER_HOST[format], host, ...ADAPTER_RUN_HOSTS].filter((id) => id !== undefined);
|
|
109
|
+
const profiles = new Map();
|
|
110
|
+
const kept = [];
|
|
111
|
+
for (const v of record.verdicts) {
|
|
112
|
+
const p = shippedHostProfile(v.host);
|
|
113
|
+
if (p === undefined)
|
|
114
|
+
kept.push(v);
|
|
115
|
+
else
|
|
116
|
+
profiles.set(p.id, p);
|
|
117
|
+
}
|
|
118
|
+
for (const id of added) {
|
|
119
|
+
const p = shippedHostProfile(id);
|
|
120
|
+
if (p === undefined || profiles.has(id))
|
|
121
|
+
continue;
|
|
122
|
+
if (format === "lv2" || offerIdOf(p) === output.offer.id)
|
|
123
|
+
profiles.set(id, p);
|
|
124
|
+
}
|
|
125
|
+
return { profiles: [...profiles.values()], kept };
|
|
126
|
+
}
|
|
127
|
+
/** The runs the record holds, as the judge takes them: its adapter run, and each `run` verdict of a host that is decided by one. */
|
|
128
|
+
function admissionsOf(record) {
|
|
129
|
+
const out = {};
|
|
130
|
+
for (const v of record.verdicts) {
|
|
131
|
+
const host = ADMITTED_HOSTS.find((h) => h === v.host);
|
|
132
|
+
if (host === undefined || v.arm !== "run")
|
|
133
|
+
continue;
|
|
134
|
+
const r = v.reasons.find((x) => x.dimension === "hostAdmission");
|
|
135
|
+
out[host] = r === undefined ? { host, measured: true, admitted: true, params: {} } : { host, measured: r.rating !== "unknown", admitted: false, code: r.code, params: r.params };
|
|
136
|
+
}
|
|
137
|
+
const a = record.adapter;
|
|
138
|
+
if (a?.measured === true) {
|
|
139
|
+
const run = { host: "omx-clap-host", measured: true, admitted: a.admitted, ...(a.code === undefined ? {} : { code: a.code }), params: a.params };
|
|
140
|
+
for (const id of ADAPTER_RUN_HOSTS)
|
|
141
|
+
out[id] = run;
|
|
142
|
+
}
|
|
143
|
+
return out;
|
|
144
|
+
}
|
|
145
|
+
const owedReason = (code, params) => ({ dimension: "hostAdmission", rating: "unknown", code, params });
|
|
146
|
+
/** The runs the verdicts of these profiles need and the record does not hold. A run that did not end well decides nothing, so it owes none. */
|
|
147
|
+
function runsOwed(record, output, profiles) {
|
|
148
|
+
const reasons = {};
|
|
149
|
+
const owes = [];
|
|
150
|
+
if (failedOutcome(output) !== undefined)
|
|
151
|
+
return { reasons, owes };
|
|
152
|
+
if (output.plugin.format === "lv2" && record.adapter?.measured !== true) {
|
|
153
|
+
const why = record.adapter?.code;
|
|
154
|
+
const params = why === undefined ? {} : { lastRun: why };
|
|
155
|
+
for (const p of profiles)
|
|
156
|
+
if (ADAPTER_RUN_HOSTS.includes(p.id))
|
|
157
|
+
reasons[p.id] = owedReason(OWED_CODE.adapterRun, params);
|
|
158
|
+
owes.push({ measurement: "adapter-run", host: "omx-clap-host", code: OWED_CODE.adapterRun, ...(why === undefined ? {} : { detail: why }) });
|
|
159
|
+
}
|
|
160
|
+
for (const v of record.verdicts) {
|
|
161
|
+
if (!ADMITTED_HOSTS.some((h) => h === v.host) || v.arm === "run")
|
|
162
|
+
continue;
|
|
163
|
+
reasons[v.host] = owedReason(OWED_CODE.hostRun, { host: v.host });
|
|
164
|
+
owes.push({ measurement: "host-run", host: v.host, code: OWED_CODE.hostRun });
|
|
165
|
+
}
|
|
166
|
+
return { reasons, owes };
|
|
167
|
+
}
|
|
168
|
+
export class RejudgeRefusal extends Error {
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* One record judged again from its probe output, with what it owes. The figures, who took them and when are as they were;
|
|
172
|
+
* only the verdicts, the tiers and the cost reasons beside them are new. `at` is the prior re-judge's when nothing else
|
|
173
|
+
* differs, so that a second run leaves the file alone.
|
|
174
|
+
*/
|
|
175
|
+
export function rejudgeRecord(record, probeBytes, options) {
|
|
176
|
+
if (sha256Hex(probeBytes) !== record.probe.sha256)
|
|
177
|
+
throw new RejudgeRefusal(`${record.probe.file} is not the probe output the record names (its SHA-256 differs)`);
|
|
178
|
+
const read = readProbeOutput(Buffer.from(probeBytes).toString("utf8"));
|
|
179
|
+
if (!read.ok)
|
|
180
|
+
throw new RejudgeRefusal(`${record.probe.file}: ${read.code}: ${read.problem}`);
|
|
181
|
+
const output = withMemoryRun(read.output, record);
|
|
182
|
+
const { profiles, kept } = rejudgeProfiles(record, output, options.host);
|
|
183
|
+
const { reasons, owes } = runsOwed(record, output, profiles);
|
|
184
|
+
const judgment = judgeProbeOutput(output, profiles, { admissions: admissionsOf(record), owed: reasons });
|
|
185
|
+
const memory = record.memoryRun === undefined ? {} : { memory: { tool: record.memoryRun.tool, measuredAt: record.memoryRun.measuredAt } };
|
|
186
|
+
const a = record.adapter;
|
|
187
|
+
const adapterTaken = a?.versions === undefined || a.measuredAt === undefined ? {} : { adapter: { versions: a.versions, measuredAt: a.measuredAt } };
|
|
188
|
+
const { rejudged: prior, ...rest } = record;
|
|
189
|
+
const next = (at) => ({
|
|
190
|
+
...rest,
|
|
191
|
+
verdicts: [...verdictRows(judgment), ...kept],
|
|
192
|
+
tiers: tiersOf(judgment),
|
|
193
|
+
cost: judgment.hosts.map((h) => ({ host: h.verdict.host, ...h.cost })),
|
|
194
|
+
rejudged: {
|
|
195
|
+
at,
|
|
196
|
+
by: options.by,
|
|
197
|
+
figures: { tool: record.tool, measuredAt: record.measuredAt, runId: read.output.run.id, ...memory, ...adapterTaken },
|
|
198
|
+
...(owes.length === 0 ? {} : { owes }),
|
|
199
|
+
},
|
|
200
|
+
});
|
|
201
|
+
const same = prior !== undefined && JSON.stringify(next(prior.at)) === JSON.stringify(record);
|
|
202
|
+
return { record: same ? record : next(options.at), owes };
|
|
203
|
+
}
|
|
204
|
+
// --- a device's records -----------------------------------------------------------------------------------------------
|
|
205
|
+
/** The file that lists what a re-judge left owing, beside the state file. */
|
|
206
|
+
export const owedFile = (stateFile) => join(dirname(stateFile), "qualify-owed.json");
|
|
207
|
+
export const OWED_SCHEMA = "plugin-qualify.owed/1";
|
|
208
|
+
/** The entries whose files are not the bytes they were qualified from, and their records' stems. */
|
|
209
|
+
function changedStems(state) {
|
|
210
|
+
const stems = new Set();
|
|
211
|
+
const entries = new Set();
|
|
212
|
+
for (const [key, e] of Object.entries(state.entries)) {
|
|
213
|
+
const now = digestFiles(e.root, e.files.map((f) => f.path), e.files);
|
|
214
|
+
if (now !== undefined && now.every((f) => e.files.some((x) => x.path === f.path && x.sha256 === f.sha256)))
|
|
215
|
+
continue;
|
|
216
|
+
entries.add(key);
|
|
217
|
+
for (const p of e.plugins) {
|
|
218
|
+
const stem = p.record === undefined ? undefined : recordStem(p.record);
|
|
219
|
+
if (stem !== undefined)
|
|
220
|
+
stems.add(stem);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return { stems, entries };
|
|
224
|
+
}
|
|
225
|
+
const readRecord = (path) => {
|
|
226
|
+
try {
|
|
227
|
+
const r = JSON.parse(readFileSync(path, "utf8"));
|
|
228
|
+
return r.schema === QUALIFICATION_RECORD_SCHEMA ? r : undefined;
|
|
229
|
+
}
|
|
230
|
+
catch {
|
|
231
|
+
return undefined;
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
const nameOf = (record) => record.plugin.id;
|
|
235
|
+
/** A state plugin with the verdict its record now holds for the host: the pin's files stay as they are, only its word follows. */
|
|
236
|
+
function pluginWithVerdict(plugin, v) {
|
|
237
|
+
const { pin, code: _code, ...rest } = plugin;
|
|
238
|
+
const word = v.measured ? pinVerdictOf(v.rating) : undefined;
|
|
239
|
+
return {
|
|
240
|
+
...rest,
|
|
241
|
+
outcome: outcomeOfVerdict(v),
|
|
242
|
+
...(v.deciding === undefined ? {} : { code: v.deciding }),
|
|
243
|
+
...(pin === undefined ? {} : { pin: { uri: pin.uri, integrity: pin.integrity, ...(word === undefined ? {} : { verdict: word }) } }),
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Every record of the device's qualification directory judged again, the state's outcomes and pin words brought into line,
|
|
248
|
+
* and the list of what is owed written beside the state file. Each file is written whole, and only when it differs.
|
|
249
|
+
*/
|
|
250
|
+
export function rejudgeState(ctx, state, now = () => new Date().toISOString()) {
|
|
251
|
+
const { qualificationDir: dir, hostProfile, stateFile } = ctx.settings;
|
|
252
|
+
const by = rejudgeToolName();
|
|
253
|
+
const at = now();
|
|
254
|
+
const changed = changedStems(state);
|
|
255
|
+
const judged = new Map();
|
|
256
|
+
const owing = [];
|
|
257
|
+
let changedCount = 0;
|
|
258
|
+
let unchanged = 0;
|
|
259
|
+
let names = [];
|
|
260
|
+
try {
|
|
261
|
+
names = readdirSync(dir).filter((f) => f.endsWith(RECORD_SUFFIX)).sort();
|
|
262
|
+
}
|
|
263
|
+
catch {
|
|
264
|
+
// no directory, no record
|
|
265
|
+
}
|
|
266
|
+
for (const name of names) {
|
|
267
|
+
const path = join(dir, name);
|
|
268
|
+
const record = readRecord(path);
|
|
269
|
+
if (record === undefined) {
|
|
270
|
+
ctx.log(`${name}: does not read as a record; left as it is`);
|
|
271
|
+
owing.push({ plugin: name, record: name, owes: [{ measurement: "qualification", code: OWED_CODE.figuresUnreadable }] });
|
|
272
|
+
continue;
|
|
273
|
+
}
|
|
274
|
+
if (changed.stems.has(recordStem(name) ?? "")) {
|
|
275
|
+
owing.push({ plugin: nameOf(record), record: name, owes: [{ measurement: "qualification", code: OWED_CODE.bytesChanged }] });
|
|
276
|
+
continue;
|
|
277
|
+
}
|
|
278
|
+
let result;
|
|
279
|
+
try {
|
|
280
|
+
result = rejudgeRecord(record, readFileSync(join(dir, record.probe.file)), { host: hostProfile.id, by, at });
|
|
281
|
+
}
|
|
282
|
+
catch (e) {
|
|
283
|
+
const detail = e instanceof RejudgeRefusal ? e.message : `${record.probe.file}: ${e.code ?? String(e)}`;
|
|
284
|
+
ctx.log(`${name}: ${detail}; left as it is`);
|
|
285
|
+
owing.push({ plugin: nameOf(record), record: name, owes: [{ measurement: "qualification", code: OWED_CODE.figuresUnreadable, detail }] });
|
|
286
|
+
continue;
|
|
287
|
+
}
|
|
288
|
+
if (result.record === record)
|
|
289
|
+
unchanged++;
|
|
290
|
+
else {
|
|
291
|
+
writeFileWhole(path, `${JSON.stringify(result.record, null, 2)}\n`);
|
|
292
|
+
changedCount++;
|
|
293
|
+
}
|
|
294
|
+
judged.set(name, result.record);
|
|
295
|
+
if (result.owes.length > 0)
|
|
296
|
+
owing.push({ plugin: nameOf(record), record: name, owes: result.owes });
|
|
297
|
+
}
|
|
298
|
+
const entries = {};
|
|
299
|
+
for (const [key, entry] of Object.entries(state.entries)) {
|
|
300
|
+
if (changed.entries.has(key)) {
|
|
301
|
+
entries[key] = entry;
|
|
302
|
+
continue;
|
|
303
|
+
}
|
|
304
|
+
const plugins = entry.plugins.map((plugin) => {
|
|
305
|
+
const record = plugin.record === undefined ? undefined : judged.get(basename(plugin.record));
|
|
306
|
+
const v = record?.verdicts.find((x) => x.host === hostProfile.id);
|
|
307
|
+
if (v !== undefined)
|
|
308
|
+
return pluginWithVerdict(plugin, v);
|
|
309
|
+
if (record === undefined && plugin.outcome === "unmeasured" && plugin.record?.endsWith(RECORD_SUFFIX) !== true) {
|
|
310
|
+
owing.push({ plugin: plugin.uri, ...(plugin.record === undefined ? {} : { record: basename(plugin.record) }), owes: [{ measurement: "qualification", code: OWED_CODE.noFigures }] });
|
|
311
|
+
}
|
|
312
|
+
return plugin;
|
|
313
|
+
});
|
|
314
|
+
entries[key] = { ...entry, plugins };
|
|
315
|
+
}
|
|
316
|
+
owing.sort((a, b) => (a.record ?? a.plugin).localeCompare(b.record ?? b.plugin));
|
|
317
|
+
for (const o of owing)
|
|
318
|
+
ctx.log(`owes: ${o.plugin}: ${o.owes.map((x) => `${x.measurement}${x.host === undefined ? "" : ` under ${x.host}`}`).join(", ")}`);
|
|
319
|
+
writeIfDifferent(owedFile(stateFile), `${JSON.stringify({ schema: OWED_SCHEMA, owing }, null, 1)}\n`);
|
|
320
|
+
return { state: { schema: SYNC_STATE_SCHEMA, entries }, changed: changedCount, unchanged, owing };
|
|
321
|
+
}
|
|
322
|
+
function writeIfDifferent(path, text) {
|
|
323
|
+
try {
|
|
324
|
+
if (readFileSync(path, "utf8") === text)
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
catch {
|
|
328
|
+
// not there yet
|
|
329
|
+
}
|
|
330
|
+
writeFileWhole(path, text);
|
|
331
|
+
}
|
|
332
|
+
// --- the memory-only pass ---------------------------------------------------------------------------------------------
|
|
333
|
+
/**
|
|
334
|
+
* A memory-only run's footprints in a record: the `memory` of each cell and nothing else of it, a cell the record's grid
|
|
335
|
+
* does not hold joined with no other figure. A cell the run could not read says why instead of a figure, so that it is
|
|
336
|
+
* never read as fitting. Pure.
|
|
337
|
+
*/
|
|
338
|
+
export function mergeMemoryRun(record, output, cells) {
|
|
339
|
+
const grid = [...record.measurements.grid];
|
|
340
|
+
const said = [];
|
|
341
|
+
for (const c of cells) {
|
|
342
|
+
const p = output.grid.find((g) => cellKey(g) === cellKey(c));
|
|
343
|
+
const outcome = p?.outcome ?? output.run.outcome;
|
|
344
|
+
const memory = p?.memory ?? { unmeasuredReason: unmeasuredWordOf(outcome), unmeasuredDetail: `the memory-only run ended ${outcome}` };
|
|
345
|
+
const figures = memoryOfCell({ rate: c.rate, quantum: c.quantum, outcome, memory });
|
|
346
|
+
const at = grid.findIndex((g) => cellKey(g) === cellKey(c));
|
|
347
|
+
if (at >= 0)
|
|
348
|
+
grid[at] = { ...grid[at], ...figures };
|
|
349
|
+
else
|
|
350
|
+
grid.push({ rate: c.rate, quantum: c.quantum, outcome: PROBE_OK, latency: { unmeasuredReason: "not-attempted", code: HOSTING_CODE.latencyUnmeasured }, ...figures });
|
|
351
|
+
said.push({ rate: c.rate, quantum: c.quantum, outcome, ...(p?.memoryLimit === undefined ? {} : { memoryLimit: p.memoryLimit }) });
|
|
352
|
+
}
|
|
353
|
+
const notMeasured = record.notMeasured ?? [];
|
|
354
|
+
return {
|
|
355
|
+
...record,
|
|
356
|
+
measurements: { ...record.measurements, grid },
|
|
357
|
+
notMeasured: notMeasured.some((n) => n.dimension === MEMORY_PASS_NOT_MEASURED.dimension) ? notMeasured : [...notMeasured, MEMORY_PASS_NOT_MEASURED],
|
|
358
|
+
memoryRun: { tool: output.run.tools, measuredAt: output.run.startedAt, runId: output.run.id, cells: said },
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
/** Whether a record already holds this pass's footprints. */
|
|
362
|
+
const memoryTaken = (record, cells) => record.memoryRun !== undefined && cells.every((c) => record.memoryRun.cells.some((m) => cellKey(m) === cellKey(c)));
|
|
363
|
+
/** The extensions a record was measured with: its file says which offer it is. */
|
|
364
|
+
const offerOf = (recordName) => (recordName.endsWith(`.custom${RECORD_SUFFIX}`) ? OMX_CLAP_HOST_CONFIGURED_EXTENSIONS : []);
|
|
365
|
+
/**
|
|
366
|
+
* The footprint of each plugin of the state, at `MEMORY_PASS_CELLS`, merged into the record its verdict for this run's host
|
|
367
|
+
* came from. One plugin's failure is that plugin's; each record is written whole as its plugin ends, so a pass cut short
|
|
368
|
+
* keeps what it finished, and a pass run again skips those unless `force`.
|
|
369
|
+
*/
|
|
370
|
+
export function memoryPass(ctx, state, options = {}) {
|
|
371
|
+
const { memory, budgetS, memoryNotes } = ctx.settings;
|
|
372
|
+
const count = { measured: 0, already: 0, failed: 0 };
|
|
373
|
+
const changed = changedStems(state);
|
|
374
|
+
for (const [key, entry] of Object.entries(state.entries)) {
|
|
375
|
+
if (changed.entries.has(key)) {
|
|
376
|
+
ctx.log(`${key}: its files changed since it was measured; the sync measures it whole`);
|
|
377
|
+
continue;
|
|
378
|
+
}
|
|
379
|
+
for (const plugin of entry.plugins) {
|
|
380
|
+
if (plugin.record === undefined || !plugin.record.endsWith(RECORD_SUFFIX))
|
|
381
|
+
continue;
|
|
382
|
+
const name = basename(plugin.record);
|
|
383
|
+
const path = join(ctx.settings.qualificationDir, name);
|
|
384
|
+
const record = readRecord(path);
|
|
385
|
+
if (record === undefined) {
|
|
386
|
+
ctx.log(`${plugin.uri}: its record ${name} does not read; no footprint taken`);
|
|
387
|
+
count.failed++;
|
|
388
|
+
continue;
|
|
389
|
+
}
|
|
390
|
+
if (options.force !== true && memoryTaken(record, MEMORY_PASS_CELLS)) {
|
|
391
|
+
count.already++;
|
|
392
|
+
continue;
|
|
393
|
+
}
|
|
394
|
+
const started = Date.now();
|
|
395
|
+
const env = { ...ctx.env, [PROBE_MEMORY_ONLY_ENV]: "1", [PROBE_NOTES_ENV]: String(memoryNotes) };
|
|
396
|
+
const limits = { rates: [...new Set(MEMORY_PASS_CELLS.map((c) => c.rate))], cells: MEMORY_PASS_CELLS, wallS: budgetS, ...(memory === undefined ? {} : { memory }), ...(options.run === undefined ? {} : { run: options.run }) };
|
|
397
|
+
try {
|
|
398
|
+
const probed = entry.format === "clap"
|
|
399
|
+
? probeTarget(clapTarget(key, entry, record), { ...limits, offer: offerOf(name), env })
|
|
400
|
+
: lv2World(entry.root, (world) => probeTarget({ format: "lv2", uri: record.plugin.id, bundle: entry.root }, { ...limits, env: { ...env, LV2_PATH: world } }));
|
|
401
|
+
if (probed.output.binary.sha256 !== record.binary.sha256)
|
|
402
|
+
throw new ProbeRunnerError(`measured binary ${probed.output.binary.sha256.slice(0, 12)}, the record's is ${record.binary.sha256.slice(0, 12)}`);
|
|
403
|
+
writeFileWhole(path, `${JSON.stringify(mergeMemoryRun(record, probed.output, MEMORY_PASS_CELLS), null, 2)}\n`);
|
|
404
|
+
count.measured++;
|
|
405
|
+
ctx.log(`${plugin.uri}: footprint taken at ${MEMORY_PASS_CELLS.map(cellKey).join(", ")} in ${((Date.now() - started) / 1000).toFixed(1)} s`);
|
|
406
|
+
}
|
|
407
|
+
catch (e) {
|
|
408
|
+
if (!(e instanceof ProbeRunnerError))
|
|
409
|
+
throw e;
|
|
410
|
+
count.failed++;
|
|
411
|
+
ctx.log(`${plugin.uri}: no footprint: ${e.message}`);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
return count;
|
|
416
|
+
}
|
|
417
|
+
function clapTarget(key, entry, record) {
|
|
418
|
+
const file = key.startsWith("clap:") ? key.slice("clap:".length) : join(entry.root, record.binary.files[0]?.path ?? "");
|
|
419
|
+
return { format: "clap", uri: `urn:clap:${record.plugin.id}`, bundle: entry.root, binary: basename(file), binaryPath: file };
|
|
420
|
+
}
|
|
421
|
+
//# sourceMappingURL=qualify-rejudge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qualify-rejudge.js","sourceRoot":"","sources":["../src/qualify-rejudge.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,sDAAsD;AACtD;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtF,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAsB,MAAM,qBA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