@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.
Files changed (54) hide show
  1. package/README.md +84 -2
  2. package/bin/plugin-qualify-sync.mjs +3 -1
  3. package/dist/distributed-records.d.ts +4 -2
  4. package/dist/distributed-records.js +1 -1
  5. package/dist/distributed-records.js.map +1 -1
  6. package/dist/host-admission.d.ts +2 -0
  7. package/dist/host-admission.js +12 -3
  8. package/dist/host-admission.js.map +1 -1
  9. package/dist/index.d.ts +2 -0
  10. package/dist/index.js +2 -0
  11. package/dist/index.js.map +1 -1
  12. package/dist/probe-judge.d.ts +11 -0
  13. package/dist/probe-judge.js +4 -1
  14. package/dist/probe-judge.js.map +1 -1
  15. package/dist/probe-runner.js +3 -2
  16. package/dist/probe-runner.js.map +1 -1
  17. package/dist/qualification-record.d.ts +90 -8
  18. package/dist/qualification-record.js +18 -13
  19. package/dist/qualification-record.js.map +1 -1
  20. package/dist/qualify-adapter-pass.d.ts +67 -0
  21. package/dist/qualify-adapter-pass.js +255 -0
  22. package/dist/qualify-adapter-pass.js.map +1 -0
  23. package/dist/qualify-declarations.d.ts +25 -0
  24. package/dist/qualify-declarations.js +17 -1
  25. package/dist/qualify-declarations.js.map +1 -1
  26. package/dist/qualify-rejudge.d.ts +81 -0
  27. package/dist/qualify-rejudge.js +421 -0
  28. package/dist/qualify-rejudge.js.map +1 -0
  29. package/dist/qualify-sync.d.ts +72 -1
  30. package/dist/qualify-sync.js +176 -17
  31. package/dist/qualify-sync.js.map +1 -1
  32. package/fixtures/records-0.16.1/http___example.org_raffo@unversioned-2060c09ff626.default.probe.json +46 -0
  33. package/fixtures/records-0.16.1/http___example.org_raffo@unversioned-2060c09ff626.default.qualification.json +185 -0
  34. package/fixtures/records-0.16.1/http___lv2plug.in_plugins_eg-amp@unversioned-f046a60efd45.default.probe.json +51 -0
  35. package/fixtures/records-0.16.1/http___lv2plug.in_plugins_eg-amp@unversioned-f046a60efd45.default.qualification.json +232 -0
  36. package/fixtures/records-0.16.1/https___github.com_lucianodato_noise-repellent@unversioned-c3b5e21dd9a7.default.probe.json +51 -0
  37. package/fixtures/records-0.16.1/https___github.com_lucianodato_noise-repellent@unversioned-c3b5e21dd9a7.default.qualification.json +245 -0
  38. package/fixtures/records-0.16.1/in.lsp-plug.impulse_responses_mono@unversioned-d5235d2f5f53.custom.probe.json +52 -0
  39. package/fixtures/records-0.16.1/in.lsp-plug.impulse_responses_mono@unversioned-d5235d2f5f53.custom.qualification.json +145 -0
  40. package/fixtures/records-0.16.1/in.lsp-plug.trigger_midi_mono@unversioned-d5235d2f5f53.custom.probe.json +52 -0
  41. package/fixtures/records-0.16.1/in.lsp-plug.trigger_midi_mono@unversioned-d5235d2f5f53.custom.qualification.json +155 -0
  42. package/package.json +1 -1
  43. package/src/distributed-records.ts +1 -1
  44. package/src/host-admission.ts +13 -3
  45. package/src/index.ts +2 -0
  46. package/src/probe-judge.ts +8 -1
  47. package/src/probe-runner.ts +2 -2
  48. package/src/qualification-record.ts +100 -15
  49. package/src/qualify-adapter-pass.ts +278 -0
  50. package/src/qualify-declarations.ts +19 -1
  51. package/src/qualify-rejudge.ts +452 -0
  52. package/src/qualify-sync.ts +192 -17
  53. package/tools/lv2_resolve.py +49 -0
  54. package/tools/mod-host-admit.mjs +21 -5
@@ -31,6 +31,27 @@ export interface RecordVerdict {
31
31
  readonly deciding?: string;
32
32
  readonly reasons: readonly RecordReason[];
33
33
  }
34
+ /**
35
+ * An LV2 plugin's run under the adapter. The top is what the judge reads. `--adapter-only` adds the versions of the hosts
36
+ * it ran under, when, and how each cell went.
37
+ */
38
+ export interface AdapterBlock {
39
+ readonly host: string;
40
+ readonly measured: boolean;
41
+ readonly admitted: boolean;
42
+ readonly code?: string;
43
+ readonly params: Readonly<Record<string, string | number>>;
44
+ readonly versions?: Readonly<Record<string, string>>;
45
+ readonly measuredAt?: string;
46
+ readonly cells?: readonly {
47
+ readonly rate: number;
48
+ readonly quantum: number;
49
+ readonly measured: boolean;
50
+ readonly admitted: boolean;
51
+ readonly code?: string;
52
+ readonly params: Readonly<Record<string, string | number>>;
53
+ }[];
54
+ }
34
55
  /** One tier of the console as a verdict: the host it is judged under and whether the plugin qualified there. */
35
56
  export interface TierVerdict {
36
57
  readonly host: string;
@@ -38,8 +59,14 @@ export interface TierVerdict {
38
59
  readonly qualified: boolean;
39
60
  readonly rating: string;
40
61
  readonly deciding?: string;
62
+ /** The isolated tier of a `conditional` plugin: it is offered, and runs alone in a worker of its own, never grouped. */
63
+ readonly runsAlone?: true;
41
64
  }
42
- /** The console's two tiers (what the console's roster offers): offered where the verdict qualified, dimmed with the reason when neither did. */
65
+ /**
66
+ * The console's two tiers (what the console's roster offers): in-process where its verdict qualified; isolated where its
67
+ * verdict qualified or is `conditional`, which pins `isolated` and runs alone (`runsAlone`); dimmed with the reason when
68
+ * neither. `qualified` stays `rating === "suitable"`, as the interchange's reader holds it.
69
+ */
43
70
  export interface RecordTiers {
44
71
  readonly inProcess?: TierVerdict;
45
72
  readonly isolated?: TierVerdict;
@@ -89,6 +116,10 @@ export type RecordGridPoint = Omit<ProbeGridPoint, "latency" | "memory"> & {
89
116
  };
90
117
  /** The same, for the test. */
91
118
  export declare const memoryOfCellForTest: (p: ProbeGridPoint) => Pick<RecordGridPoint, "memory">;
119
+ /** The contract's word for a cell whose run ended with this outcome, `probe-error` for one it has no word of. */
120
+ export declare const unmeasuredWordOf: (outcome: string) => string;
121
+ /** A cell's footprint with what it comes to; only a footprint with no reason beside it comes to anything a client may add up. */
122
+ export declare function memoryOfCell(p: ProbeGridPoint): Pick<RecordGridPoint, "memory">;
92
123
  /**
93
124
  * Why a cell has no latency figure. A cell whose run failed: its outcome's word. A latency step at the cell that did not
94
125
  * end well: the child's own reason, which the runner writes first in the step's detail, when it is a contract word,
@@ -132,6 +163,57 @@ export interface HistoryBlock {
132
163
  readonly host: string;
133
164
  } & Adjustment)[];
134
165
  }
166
+ /** One measurement a record lacks, and what it keeps from being decided. */
167
+ export interface OwedMeasurement {
168
+ /** `adapter-run`: the plugin under omx-clap-host's LV2 adapter. `host-run`: under the host named. `qualification`: the whole of it. */
169
+ readonly measurement: "adapter-run" | "host-run" | "qualification";
170
+ readonly host?: string;
171
+ readonly code: string;
172
+ readonly detail?: string;
173
+ }
174
+ /**
175
+ * The verdicts are not the ones of the run that took the figures: `plugin-qualify-sync --rejudge` derived them later, from
176
+ * those figures, under the rules of `by`. `figures` says who took the figures and when; the verdicts claim nothing more.
177
+ */
178
+ export interface RejudgedBlock {
179
+ /** The UTC time the verdicts last changed. */
180
+ readonly at: string;
181
+ /** The plugin-qualify whose rules judged them. */
182
+ readonly by: string;
183
+ readonly figures: {
184
+ readonly tool: Readonly<Record<string, string>>;
185
+ readonly measuredAt: string;
186
+ readonly runId: string;
187
+ /** The footprints, when a memory-only pass took them later than the rest. */
188
+ readonly memory?: {
189
+ readonly tool: Readonly<Record<string, string>>;
190
+ readonly measuredAt: string;
191
+ };
192
+ /** The adapter run, when an adapter-only pass took it later than the rest. */
193
+ readonly adapter?: {
194
+ readonly versions: Readonly<Record<string, string>>;
195
+ readonly measuredAt: string;
196
+ };
197
+ };
198
+ /** What these verdicts could not decide and left `unknown`; absent when nothing is owed. */
199
+ readonly owes?: readonly OwedMeasurement[];
200
+ }
201
+ /** The memory-only pass that took this record's footprints: every other figure is older and comes from `tool`. */
202
+ export interface MemoryRunBlock {
203
+ readonly tool: Readonly<Record<string, string>>;
204
+ readonly measuredAt: string;
205
+ readonly runId: string;
206
+ readonly cells: readonly {
207
+ readonly rate: number;
208
+ readonly quantum: number;
209
+ /** How the cell's run ended; its figures are in the grid's point of that cell. */
210
+ readonly outcome: string;
211
+ readonly memoryLimit?: {
212
+ readonly bytes: number;
213
+ readonly mechanism: string;
214
+ };
215
+ }[];
216
+ }
135
217
  export interface QualificationRecord {
136
218
  readonly schema: typeof QUALIFICATION_RECORD_SCHEMA;
137
219
  readonly plugin: {
@@ -147,13 +229,7 @@ export interface QualificationRecord {
147
229
  * An LV2 plugin run under plugin-hostd's LV2 adapter (omx-clap-host), as under mod-host: admitted, or refused with
148
230
  * its code, or `measured: false` when it was not tried. Beside the verdicts, which it does not change (#223).
149
231
  */
150
- readonly adapter?: {
151
- readonly host: string;
152
- readonly measured: boolean;
153
- readonly admitted: boolean;
154
- readonly code?: string;
155
- readonly params: Readonly<Record<string, string | number>>;
156
- };
232
+ readonly adapter?: AdapterBlock;
157
233
  readonly tiers: RecordTiers;
158
234
  /** The cost reasons at each host's rate and quantum, beside the verdicts; an instrument's with the notes it held. */
159
235
  readonly cost: readonly {
@@ -184,6 +260,10 @@ export interface QualificationRecord {
184
260
  readonly history?: readonly HistoryBlock[];
185
261
  /** Where the record came from when it was not measured on this device: the distributed set's provenance, as the set's package wrote it. */
186
262
  readonly provenance?: Readonly<Record<string, unknown>>;
263
+ /** Present when the verdicts were derived later from the figures below, measuring nothing. */
264
+ readonly rejudged?: RejudgedBlock;
265
+ /** Present when a memory-only pass merged footprints into the grid. */
266
+ readonly memoryRun?: MemoryRunBlock;
187
267
  /** The probe output this record judged. */
188
268
  readonly probe: {
189
269
  readonly file: string;
@@ -212,6 +292,8 @@ export declare const recordFileName: (output: ProbeOutput) => string;
212
292
  export declare const probeCopyFileName: (output: ProbeOutput) => string;
213
293
  /** The console's two tiers from the verdicts the judgment holds. A tier no profile judged is absent, and is not offered. */
214
294
  export declare function tiersOf(judgment: Judgment): RecordTiers;
295
+ /** A judgment's verdicts as the record writes them. */
296
+ export declare const verdictRows: (judgment: Judgment) => RecordVerdict[];
215
297
  export declare function buildQualificationRecord(judgment: Judgment, copy: {
216
298
  file: string;
217
299
  sha256: string;
@@ -32,8 +32,10 @@ const UNMEASURED_WORDS = new Set(Object.values(MEASUREMENT_UNMEASURED_REASONS).m
32
32
  const word = (key) => MEASUREMENT_UNMEASURED_REASONS[key].word;
33
33
  /** The same, for the test. */
34
34
  export const memoryOfCellForTest = (p) => memoryOfCell(p);
35
+ /** The contract's word for a cell whose run ended with this outcome, `probe-error` for one it has no word of. */
36
+ export const unmeasuredWordOf = (outcome) => OUTCOME_WORD[outcome] ?? word("probeError");
35
37
  /** A cell's footprint with what it comes to; only a footprint with no reason beside it comes to anything a client may add up. */
36
- function memoryOfCell(p) {
38
+ export function memoryOfCell(p) {
37
39
  if (p.memory === undefined)
38
40
  return {};
39
41
  const first = p.memory.unmeasuredReason === undefined ? firstInstanceKb(p.memory) : undefined;
@@ -87,19 +89,31 @@ function tierOf(judgment, host) {
87
89
  export function tiersOf(judgment) {
88
90
  const inProcess = tierOf(judgment, IN_PROCESS_TIER_HOST);
89
91
  const isolated = tierOf(judgment, ISOLATED_TIER_HOST[judgment.output.plugin.format]);
92
+ const runsAlone = isolated?.measured === true && isolated.rating === "conditional";
90
93
  const offeredOn = [];
91
94
  if (inProcess?.qualified === true)
92
95
  offeredOn.push("in-process");
93
- if (isolated?.qualified === true)
96
+ if (isolated?.qualified === true || runsAlone)
94
97
  offeredOn.push("isolated");
95
98
  const why = [inProcess, isolated].flatMap((t) => (t === undefined ? [] : [`${t.host}: ${t.deciding ?? t.rating}`]));
96
99
  return {
97
100
  ...(inProcess === undefined ? {} : { inProcess }),
98
- ...(isolated === undefined ? {} : { isolated }),
101
+ ...(isolated === undefined ? {} : { isolated: { ...isolated, ...(runsAlone ? { runsAlone: true } : {}) } }),
99
102
  offeredOn,
100
103
  ...(offeredOn.length === 0 ? { dimmed: why.length === 0 ? "no tier was judged" : why.join("; ") } : {}),
101
104
  };
102
105
  }
106
+ /** A judgment's verdicts as the record writes them. */
107
+ export const verdictRows = (judgment) => judgment.hosts.map((h) => ({
108
+ host: h.verdict.host,
109
+ measured: h.verdict.measured,
110
+ rating: h.verdict.rating,
111
+ qualified: h.verdict.qualified,
112
+ hosting: h.hosting,
113
+ arm: h.arm,
114
+ ...(h.verdict.deciding === undefined ? {} : { deciding: h.verdict.deciding }),
115
+ reasons: h.reasons,
116
+ }));
103
117
  export function buildQualificationRecord(judgment, copy, notMeasured = []) {
104
118
  const o = judgment.output;
105
119
  return {
@@ -107,16 +121,7 @@ export function buildQualificationRecord(judgment, copy, notMeasured = []) {
107
121
  plugin: { format: o.plugin.format, id: o.plugin.id, ...(o.plugin.name === undefined ? {} : { name: o.plugin.name }) },
108
122
  ...(o.plugin.version === undefined ? {} : { testedVersion: o.plugin.version }),
109
123
  binary: o.binary,
110
- verdicts: judgment.hosts.map((h) => ({
111
- host: h.verdict.host,
112
- measured: h.verdict.measured,
113
- rating: h.verdict.rating,
114
- qualified: h.verdict.qualified,
115
- hosting: h.hosting,
116
- arm: h.arm,
117
- ...(h.verdict.deciding === undefined ? {} : { deciding: h.verdict.deciding }),
118
- reasons: h.reasons,
119
- })),
124
+ verdicts: verdictRows(judgment),
120
125
  ...(judgment.adapter === undefined ? {} : { adapter: judgment.adapter }),
121
126
  tiers: tiersOf(judgment),
122
127
  cost: judgment.hosts.map((h) => ({ host: h.verdict.host, ...h.cost })),
@@ -1 +1 @@
1
- {"version":3,"file":"qualification-record.js","sourceRoot":"","sources":["../src/qualification-record.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAIjC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAyC,MAAM,mBAAmB,CAAC;AAE/F,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AAEzE,MAAM,CAAC,MAAM,2BAA2B,GAAG,uCAAuC,CAAC;AAmCnF;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAqC,EAAE,GAAG,EAAE,eAAe,EAAE,I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B,QAAQ,EAAE,EAAE,GAAG,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;aAC1J,CACN,CAAC;IACJ,CAAC;IACD,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;AAC9B,CAAC"}
@@ -0,0 +1,67 @@
1
+ import { type AdmissionRuns, type HostAdmission } from "./host-admission.js";
2
+ import { type GridCell } from "./measurement-grid.js";
3
+ import { type AdapterBlock, type QualificationRecord } from "./qualification-record.js";
4
+ import { type SyncContext, type SyncState } from "./qualify-sync.js";
5
+ /** The cells the pass runs at: the ones a Pi runs. */
6
+ export declare const ADAPTER_PASS_CELLS: readonly GridCell[];
7
+ /** The code of a cell no private server could be had for: the run did not happen. */
8
+ export declare const NO_PRIVATE_SERVER = "omx-clap-host.no-private-server";
9
+ /** What a program answers to `--version`: its last word on the line that says `version`. */
10
+ export declare function parseVersion(text: string): string | undefined;
11
+ export type VersionRun = (tool: string) => {
12
+ readonly status: number | null;
13
+ readonly stdout: string;
14
+ };
15
+ /** The versions of the hosts as installed now, or which of them could not say. */
16
+ export declare function hostVersions(env: Readonly<Record<string, string | undefined>>, run?: VersionRun): {
17
+ ok: true;
18
+ versions: Readonly<Record<string, string>>;
19
+ } | {
20
+ ok: false;
21
+ error: string;
22
+ };
23
+ /** A private JACK server for one cell, for as long as a pass needs it. */
24
+ export interface PrivateJack {
25
+ readonly name: string;
26
+ alive(): boolean;
27
+ stop(): void;
28
+ }
29
+ export type JackStarter = (cell: GridCell) => PrivateJack | undefined;
30
+ /** `jackd` on a name of its own and the dummy driver, at the cell's rate and quantum; `undefined` when none came up. */
31
+ export declare const startPrivateJack: JackStarter;
32
+ /**
33
+ * The runs of every cell as one block. Its top is what the judge reads: a refusal or a crash at any cell decides, with the
34
+ * cell it happened at, whatever the others say; then a cell where the host could not be run leaves it not measured, so
35
+ * still owed; only every cell admitted is admitted. Pure.
36
+ */
37
+ export declare function adapterBlockOf(runs: readonly {
38
+ readonly cell: GridCell;
39
+ readonly run: HostAdmission;
40
+ }[], versions: Readonly<Record<string, string>>, measuredAt: string): AdapterBlock;
41
+ /** The record with the block, and every other byte of it as it was. Pure. */
42
+ export declare const mergeAdapterRun: (record: QualificationRecord, block: AdapterBlock) => QualificationRecord;
43
+ /** Whether a record's adapter run is done: at these host versions, measured, at every cell. */
44
+ export declare function adapterFinished(record: QualificationRecord, versions: Readonly<Record<string, string>>, cells?: readonly GridCell[]): boolean;
45
+ export interface AdapterPassOptions {
46
+ readonly force?: boolean;
47
+ readonly runs?: AdmissionRuns;
48
+ readonly jack?: JackStarter;
49
+ readonly versions?: VersionRun;
50
+ /** The test's stand-in for jackd says it is there; the real pass looks. */
51
+ readonly jackdPresent?: boolean;
52
+ readonly now?: () => string;
53
+ }
54
+ export interface AdapterPassResult {
55
+ readonly measured: number;
56
+ readonly already: number;
57
+ readonly failed: number;
58
+ readonly versions: Readonly<Record<string, string>>;
59
+ }
60
+ /** The pass could not start: nothing was run and nothing written. */
61
+ export declare class AdapterPassRefused extends Error {
62
+ }
63
+ /**
64
+ * The run of each LV2 plugin of the state whose probe ended well (one that did not has no verdict a run could decide), at
65
+ * each cell. Each record is written whole as its plugin ends.
66
+ */
67
+ export declare function adapterPass(ctx: SyncContext, state: SyncState, options?: AdapterPassOptions): AdapterPassResult;
@@ -0,0 +1,255 @@
1
+ // SPDX-License-Identifier: GPL-3.0-or-later
2
+ // Copyright (C) 2026 Pau Aliagas <linuxnow@gmail.com>
3
+ /**
4
+ * `plugin-qualify-sync --adapter-only`: an LV2 plugin's verdict on omx-clap-host is decided by its run under plugin-hostd's
5
+ * LV2 adapter, and a record without one owes it (`qualify-rejudge.ts`). This pass makes only that run, for each plugin, at
6
+ * each cell a Pi runs, and puts the block in the record; every other figure stays as it was, and `--rejudge` reads it.
7
+ *
8
+ * Each cell has a private JACK server of its own (`jackd -d dummy`, the rate and quantum on its command line), so that the
9
+ * run can never reach the device's live server (plugin-qualify#187), and each run a fresh host, its time limited by
10
+ * `budget_s` a command and its address space by the limit of a direct spawn. A crash or a timeout is the plugin's recorded
11
+ * outcome. A pass does not start without the versions of the hosts it runs, or without a private server: nothing it could
12
+ * write would say what it measured. A plugin is finished when its block was taken at these host versions at every cell,
13
+ * so a pass cut short can be run again; a host that could not be run decides nothing, and that plugin is tried again.
14
+ */
15
+ import { spawn, spawnSync } from "node:child_process";
16
+ import { existsSync, mkdtempSync, readFileSync, readdirSync, rmSync } from "node:fs";
17
+ import { tmpdir } from "node:os";
18
+ import { basename, join } from "node:path";
19
+ import { ADAPTER_HOST, SPAWNED_ADMISSIONS, admitUnderAdapter } from "./host-admission.js";
20
+ import { HOSTD_ENV } from "./hostd-pin-files.js";
21
+ import { cellKey } from "./measurement-grid.js";
22
+ import { defaultAddressSpaceLimit } from "./direct-limit.js";
23
+ import { PROBE_OK } from "./probe-output.js";
24
+ import { QUALIFICATION_RECORD_SCHEMA } from "./qualification-record.js";
25
+ import { ADMIT_ADDRESS_KB_ENV, ADMIT_STATE_DIR_ENV, ADMIT_STEP_MS_ENV, PI_CELLS } from "./qualify-declarations.js";
26
+ import { digestFiles } from "./qualify-sync.js";
27
+ import { writeFileWhole } from "./whole-file.js";
28
+ /** The cells the pass runs at: the ones a Pi runs. */
29
+ export const ADAPTER_PASS_CELLS = PI_CELLS;
30
+ /** The code of a cell no private server could be had for: the run did not happen. */
31
+ export const NO_PRIVATE_SERVER = `${ADAPTER_HOST}.no-private-server`;
32
+ const RECORD_SUFFIX = ".qualification.json";
33
+ const SERVER_WAIT_MS = 5000;
34
+ const SERVER_SETTLE_MS = 300;
35
+ const SERVER_STOP_MS = 2000;
36
+ /** What a program answers to `--version`: its last word on the line that says `version`. */
37
+ export function parseVersion(text) {
38
+ return /version:?\s+(\S+)/.exec(text)?.[1];
39
+ }
40
+ const spawnVersion = (tool) => {
41
+ const r = spawnSync(tool, ["--version"], { encoding: "utf8", timeout: 10000, killSignal: "SIGKILL" });
42
+ return { status: r.status, stdout: `${r.stdout ?? ""}\n${r.stderr ?? ""}` };
43
+ };
44
+ /** The versions of the hosts as installed now, or which of them could not say. */
45
+ export function hostVersions(env, run = spawnVersion) {
46
+ const versions = {};
47
+ for (const [name, tool] of [[ADAPTER_HOST, ADAPTER_HOST], ["plugin-hostd", env[HOSTD_ENV] ?? "plugin-hostd"]]) {
48
+ const r = run(tool);
49
+ const version = r.status === 0 ? parseVersion(r.stdout) : undefined;
50
+ if (version === undefined)
51
+ return { ok: false, error: `${tool} --version names no version, so a run could not say which host it was under` };
52
+ versions[name] = version;
53
+ }
54
+ return { ok: true, versions };
55
+ }
56
+ const sleepSync = (ms) => {
57
+ Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
58
+ };
59
+ /** `jackd` on a name of its own and the dummy driver, at the cell's rate and quantum; `undefined` when none came up. */
60
+ export const startPrivateJack = (cell) => {
61
+ const name = `omx-qualify-${String(process.pid)}-${String(cell.quantum)}`;
62
+ let child;
63
+ let ended = false;
64
+ try {
65
+ child = spawn("jackd", ["-r", "-n", name, "-d", "dummy", "-r", String(cell.rate), "-p", String(cell.quantum)], { stdio: "ignore", detached: true });
66
+ }
67
+ catch {
68
+ return undefined;
69
+ }
70
+ child.on("error", () => (ended = true));
71
+ child.on("exit", () => (ended = true));
72
+ child.unref();
73
+ const running = () => {
74
+ if (ended || child.pid === undefined)
75
+ return false;
76
+ // the exit event needs the loop this synchronous pass holds: the process table says
77
+ return existsSync(`/proc/${String(child.pid)}`) && !/^\S+ \(.*\) Z/.test(readStat(child.pid));
78
+ };
79
+ // a TERM first: jackd frees the shared memory it holds under /dev/shm itself, which a KILL would leave behind for good
80
+ const signal = (sig) => {
81
+ try {
82
+ if (child.pid !== undefined)
83
+ process.kill(-child.pid, sig);
84
+ }
85
+ catch {
86
+ // already gone
87
+ }
88
+ };
89
+ const stop = () => {
90
+ signal("SIGTERM");
91
+ const until = Date.now() + SERVER_STOP_MS;
92
+ while (running() && Date.now() < until)
93
+ sleepSync(20);
94
+ if (running())
95
+ signal("SIGKILL");
96
+ for (const d of serverDirs(name))
97
+ rmSync(d, { recursive: true, force: true });
98
+ };
99
+ const until = Date.now() + SERVER_WAIT_MS;
100
+ while (Date.now() < until) {
101
+ if (child.pid === undefined || !running()) {
102
+ stop();
103
+ return undefined;
104
+ }
105
+ if (serverDirs(name).length > 0) {
106
+ sleepSync(SERVER_SETTLE_MS);
107
+ return { name, alive: running, stop };
108
+ }
109
+ sleepSync(50);
110
+ }
111
+ stop();
112
+ return undefined;
113
+ };
114
+ const readStat = (pid) => {
115
+ try {
116
+ return readFileSync(`/proc/${String(pid)}/stat`, "utf8");
117
+ }
118
+ catch {
119
+ return "";
120
+ }
121
+ };
122
+ /** Where jackd keeps a server's sockets, and its semaphores: the socket appears as the server opens it. */
123
+ function serverDirs(name) {
124
+ try {
125
+ return readdirSync("/dev/shm").filter((d) => d.startsWith(`jack_${name}_`) || new RegExp(`^jack_sem\\.\\d+_${name}_`).test(d)).map((d) => join("/dev/shm", d));
126
+ }
127
+ catch {
128
+ return [];
129
+ }
130
+ }
131
+ /** Whether a machine can give a pass its private server at all: the program is there. */
132
+ function jackdInstalled(env) {
133
+ return (env["PATH"] ?? process.env["PATH"] ?? "").split(":").some((d) => d !== "" && existsSync(join(d, "jackd")));
134
+ }
135
+ // --- the block --------------------------------------------------------------------------------------------------------
136
+ /**
137
+ * The runs of every cell as one block. Its top is what the judge reads: a refusal or a crash at any cell decides, with the
138
+ * cell it happened at, whatever the others say; then a cell where the host could not be run leaves it not measured, so
139
+ * still owed; only every cell admitted is admitted. Pure.
140
+ */
141
+ export function adapterBlockOf(runs, versions, measuredAt) {
142
+ const cells = runs.map(({ cell, run }) => ({ rate: cell.rate, quantum: cell.quantum, measured: run.measured, admitted: run.admitted, ...(run.code === undefined ? {} : { code: run.code }), params: run.params }));
143
+ const worst = cells.find((c) => c.measured && !c.admitted) ?? cells.find((c) => !c.measured);
144
+ const top = worst === undefined
145
+ ? { measured: true, admitted: true, params: {} }
146
+ : { measured: worst.measured, admitted: false, ...(worst.code === undefined ? {} : { code: worst.code }), params: { ...worst.params, rate: worst.rate, quantum: worst.quantum } };
147
+ return { host: ADAPTER_HOST, ...top, versions, measuredAt, cells };
148
+ }
149
+ /** The record with the block, and every other byte of it as it was. Pure. */
150
+ export const mergeAdapterRun = (record, block) => ({ ...record, adapter: block });
151
+ /** Whether a record's adapter run is done: at these host versions, measured, at every cell. */
152
+ export function adapterFinished(record, versions, cells = ADAPTER_PASS_CELLS) {
153
+ const a = record.adapter;
154
+ if (a === undefined || !a.measured || a.versions === undefined || a.cells === undefined)
155
+ return false;
156
+ const same = Object.keys(versions).length === Object.keys(a.versions).length && Object.entries(versions).every(([k, v]) => a.versions[k] === v);
157
+ return same && cells.every((c) => a.cells.some((x) => cellKey(x) === cellKey(c)));
158
+ }
159
+ /** The pass could not start: nothing was run and nothing written. */
160
+ export class AdapterPassRefused extends Error {
161
+ }
162
+ const readRecord = (path) => {
163
+ try {
164
+ const r = JSON.parse(readFileSync(path, "utf8"));
165
+ return r.schema === QUALIFICATION_RECORD_SCHEMA ? r : undefined;
166
+ }
167
+ catch {
168
+ return undefined;
169
+ }
170
+ };
171
+ /**
172
+ * The run of each LV2 plugin of the state whose probe ended well (one that did not has no verdict a run could decide), at
173
+ * each cell. Each record is written whole as its plugin ends.
174
+ */
175
+ export function adapterPass(ctx, state, options = {}) {
176
+ const read = hostVersions(ctx.env, options.versions);
177
+ if (!read.ok)
178
+ throw new AdapterPassRefused(read.error);
179
+ if (!(options.jackdPresent ?? jackdInstalled(ctx.env)))
180
+ throw new AdapterPassRefused(`no jackd on the path: ${NO_PRIVATE_SERVER}, and the device's own JACK server is never used for this`);
181
+ const { versions } = read;
182
+ const starter = options.jack ?? startPrivateJack;
183
+ const runs = options.runs ?? SPAWNED_ADMISSIONS;
184
+ const now = options.now ?? (() => new Date().toISOString());
185
+ const servers = new Map();
186
+ const serverFor = (cell) => {
187
+ const key = cellKey(cell);
188
+ const had = servers.get(key);
189
+ if (had?.alive() === true)
190
+ return had;
191
+ had?.stop();
192
+ servers.delete(key);
193
+ const fresh = starter(cell);
194
+ if (fresh !== undefined)
195
+ servers.set(key, fresh);
196
+ return fresh;
197
+ };
198
+ const count = { measured: 0, already: 0, failed: 0 };
199
+ const limit = { [ADMIT_STEP_MS_ENV]: String(ctx.settings.budgetS * 1000), [ADMIT_ADDRESS_KB_ENV]: String(Math.ceil(defaultAddressSpaceLimit() / 2 ** 10)) };
200
+ try {
201
+ for (const [key, entry] of Object.entries(state.entries)) {
202
+ if (entry.format !== "lv2")
203
+ continue;
204
+ const files = digestFiles(entry.root, entry.files.map((f) => f.path), entry.files);
205
+ if (files === undefined || !files.every((f) => entry.files.some((x) => x.path === f.path && x.sha256 === f.sha256))) {
206
+ ctx.log(`${key}: its files changed since it was measured; the sync measures it whole`);
207
+ continue;
208
+ }
209
+ for (const plugin of entry.plugins) {
210
+ if (plugin.record === undefined || !plugin.record.endsWith(RECORD_SUFFIX))
211
+ continue;
212
+ const path = join(ctx.settings.qualificationDir, basename(plugin.record));
213
+ const record = readRecord(path);
214
+ if (record === undefined) {
215
+ ctx.log(`${plugin.uri}: its record does not read; no adapter run`);
216
+ count.failed++;
217
+ continue;
218
+ }
219
+ if (record.probe.outcome !== PROBE_OK)
220
+ continue;
221
+ if (options.force !== true && adapterFinished(record, versions)) {
222
+ count.already++;
223
+ continue;
224
+ }
225
+ const started = Date.now();
226
+ const done = ADAPTER_PASS_CELLS.map((cell) => {
227
+ const server = serverFor(cell);
228
+ if (server === undefined)
229
+ return { cell, run: { host: ADAPTER_HOST, measured: false, admitted: false, code: NO_PRIVATE_SERVER, params: {} } };
230
+ const stateDir = mkdtempSync(join(tmpdir(), "plugin-qualify-adapter-state-"));
231
+ try {
232
+ const env = { ...ctx.env, ...limit, [ADMIT_STATE_DIR_ENV]: stateDir, LV2_PATH: ctx.settings.lv2Dirs.join(":"), JACK_DEFAULT_SERVER: server.name, JACK_NO_START_SERVER: "1" };
233
+ return { cell, run: admitUnderAdapter(record.plugin.id, runs, env) ?? { host: ADAPTER_HOST, measured: false, admitted: false, code: `${ADAPTER_HOST}.admission-failed`, params: {} } };
234
+ }
235
+ finally {
236
+ rmSync(stateDir, { recursive: true, force: true });
237
+ }
238
+ });
239
+ const block = adapterBlockOf(done, versions, now());
240
+ writeFileWhole(path, `${JSON.stringify(mergeAdapterRun(record, block), null, 2)}\n`);
241
+ if (block.measured)
242
+ count.measured++;
243
+ else
244
+ count.failed++;
245
+ ctx.log(`${plugin.uri}: adapter ${block.measured ? (block.admitted ? "admitted" : `refused (${block.code ?? ""})`) : `not run (${block.code ?? ""})`} in ${((Date.now() - started) / 1000).toFixed(1)} s`);
246
+ }
247
+ }
248
+ }
249
+ finally {
250
+ for (const s of servers.values())
251
+ s.stop();
252
+ }
253
+ return { ...count, versions };
254
+ }
255
+ //# sourceMappingURL=qualify-adapter-pass.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qualify-adapter-pass.js","sourceRoot":"","sources":["../src/qualify-adapter-pass.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,sDAAsD;AACtD;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,KAAK,EAAE,SAAS,EAAqB,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACrF,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAA0C,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YAAY,KAAK,CAAC,IAAI,IAAI,EAAE,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YAC7M,CAAC;QACH,CAAC;IACH,CAAC;YAAS,CAAC;QACT,KAAK,MAAM,CAAC,IAAI,OAAO,CAAC,MAAM,EAAE;YAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC7C,CAAC;IACD,OAAO,EAAE,GAAG,KAAK,EAAE,QAAQ,EAAE,CAAC;AAChC,CAAC"}
@@ -126,6 +126,22 @@ export declare const MEMORY_LIMIT_RAM_FRACTION = 0.5;
126
126
  export declare const ADDRESS_SPACE_LIMIT_RAM_FRACTION = 1;
127
127
  export declare const MEMORY_BOUND_EXIT_ENV = "OMX_RT_OOM_EXIT";
128
128
  export declare const MEMORY_BOUND_EXIT_STATUS = 121;
129
+ /**
130
+ * The memory-only pass (`plugin-qualify-sync --memory-only`). With `PROBE_MEMORY_ONLY_ENV` set the probers take the
131
+ * footprint and nothing else; the probe runner passes its environment on, so its limits hold unchanged.
132
+ * `PROBE_NOTES_ENV` is the count of notes an instrument that declares no voice capacity holds, basis `probe`:
133
+ * `MEMORY_PASS_PROBE_NOTES` unless `memory_notes` says otherwise.
134
+ */
135
+ export declare const PROBE_MEMORY_ONLY_ENV = "OMX_PROBE_MEMORY_ONLY";
136
+ export declare const PROBE_NOTES_ENV = "OMX_PROBE_NOTES";
137
+ export declare const MEMORY_PASS_PROBE_NOTES = 16;
138
+ /**
139
+ * What `tools/mod-host-admit.mjs` is told in an adapter-only pass: how long the host has for one command, its address
140
+ * space (`ulimit -v`, in KB) and the directory for the state files of the plugin it loads.
141
+ */
142
+ export declare const ADMIT_STEP_MS_ENV = "OMX_ADMIT_STEP_MS";
143
+ export declare const ADMIT_ADDRESS_KB_ENV = "OMX_ADMIT_ADDRESS_KB";
144
+ export declare const ADMIT_STATE_DIR_ENV = "OMX_ADMIT_STATE_DIR";
129
145
  /** Seconds one `.clap` may take to qualify at every rate before the prober is killed. */
130
146
  export declare const CLAP_QUALIFY_TIMEOUT_S = 120;
131
147
  /**
@@ -201,6 +217,15 @@ export declare const DEFAULT_HOSTING_POLICY: HostingPolicy;
201
217
  * interchange's shape, since a document carries each profile's budget. */
202
218
  import type { HostBudget } from "./measurement/format.js";
203
219
  export type { HostBudget };
220
+ /**
221
+ * The cells a Raspberry Pi runs: zynthian-sys's JACK settings, 48000/128 on a Pi 5 with the V5 kit and 48000/256 on a Pi 4 and
222
+ * 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
223
+ * more cells; these two are what a Pi is set to.
224
+ */
225
+ export declare const PI_CELLS: {
226
+ rate: number;
227
+ quantum: number;
228
+ }[];
204
229
  export declare const HOST_BUDGETS: {
205
230
  readonly "openmixer-console": {
206
231
  readonly coreFractionCeiling: 0.05;