@mark1russell7/harness 0.11.17 → 0.11.19

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 CHANGED
@@ -165,7 +165,7 @@ The entry `@mark1russell7/harness/schema` has the zod schemas of a source (`imag
165
165
 
166
166
  ## The images
167
167
 
168
- The harness ships ten images, each as a shipped source (`ImageSource`). The tag of each image comes from the path of its Dockerfile and the content of all the files that its Dockerfile reads. The harness copies these files into a new build context, from its own package and from the prober package. Thus the build works in a workspace and from npm.
168
+ The harness ships fifteen images, each as a shipped source (`ImageSource`). The tag of each image comes from the path of its Dockerfile and the content of all the files that its Dockerfile reads. The harness copies these files into a new build context, from its own package and from the prober package. Thus the build works in a workspace and from npm.
169
169
 
170
170
  - **The harness image** (`image/Dockerfile`) has two stages, each a digest-pinned Alpine. `Cargo.lock` pins the crates. The image holds:
171
171
  - the kernel program of the prober, compiled against the BTF of the kernel that builds it, and its Rust collector.
@@ -187,6 +187,17 @@ The harness ships ten images, each as a shipped source (`ImageSource`). The tag
187
187
  - `client-amqp.mjs` opens one connection and one channel. Each operation is an RPC of the channel: the first declares a queue that the broker names, and each later one declares it passively (checkQueue). The queue is exclusive, because RabbitMQ 4.3 refuses a transient queue that is not.
188
188
  - The options of the cell (`Cell.driverOptions`) give `heartbeat` in seconds, the user and its password (guest at the defaults), and the socket options of amqplib.
189
189
  - It prints the lines of the pg client on the same clock. A `connection` line gives each event of the connection, and a `channel` line each event of the channel. The errno of a failure is the error of the connection when it has one.
190
+ - **The gRPC client image** (`image/grpc`) is grpc-js 1.14.6 on Node 24.21.0. The digest of the image and an npm lockfile pin them. The probe is `{ driver: { name: "grpc", hold } }`.
191
+ - `client-grpc.mjs` opens one channel with no TLS. Each operation is a unary call of `grpc.health.v1.Health/Check`, with the messages encoded in the script. The first call makes the connection.
192
+ - The options of the cell (`Cell.driverOptions`) are the channel options of grpc-js (`grpc.*`), and `deadline_ms` for the deadline of each call. With `hold`, the call in flight asks the server of the harness to hold its reply that long.
193
+ - grpc-js does not give its socket, thus the script names each socket from `net.connect`, as the MongoDB client does. A `state` line gives each change of the connectivity state of the channel, and a `log` line each line that grpc-js logs.
194
+ - The errno of a failure is the error of the socket when it has one. It is EOF for an end by the server, else the status of the call.
195
+ - With `op: "watch"`, the operation in flight is a stream of `grpc.health.v1.Health/Watch`, which stays open. A GOAWAY of the server with `too_many_pings` gives the errno `too_many_pings`: grpc-js logs that refusal before the end of the socket.
196
+ - **The grpc-go image** (`image/grpc-go`) is the gRPC server of the harness, a server of grpc-go v1.84.0, built with Go 1.27.2 on a digest-pinned Alpine. A target takes it as the image of a subject: `{ kind: "shipped", name: "grpc-go" }`.
197
+ - `go mod tidy` gets the modules of grpc-go at its tag, and the go command checks each module against the checksum database of Go. The build log prints the go.sum. The build does `gofmt` and `go vet` first.
198
+ - The server is at the defaults of grpc-go and of Go, and each flag sets one value over them. The flags set the keepalive, the policy for PINGs, the age of a connection and the TCP keepalive of the listener.
199
+ - It serves `grpc.health.v1.Health`. A check of the service `hold:<ms>` holds its reply for that time, and Watch holds a stream open. It writes JSON lines on the monotonic clock (`Target.lines`).
200
+ - **The etcd image** (`image/etcd`) is etcd v3.6.15 on a digest-pinned Alpine. The binaries come unchanged from the image of etcd, pinned by digest. That image has no shell, and a cell holds the server as the child of a shell. A target takes it as the image of a subject: `{ kind: "shipped", name: "etcd" }`.
190
201
  - **The MongoDB client image** (`image/mongo`) is the driver mongodb 7.7.0 on Node 24.21.0. The digest of the image and an npm lockfile pin them. `client-mongo.mjs` prints the lines of the TCP client on the same clock:
191
202
  - Each socket of the driver is a `socket` line with its role: `monitor`, `rtt` or `pool`. The stack of the call that makes the socket gives the role.
192
203
  - The events of the driver are `sdam` lines (the heartbeats and the changes of each server), `cmap` lines (the pools) and `command` lines (each try of an operation).
@@ -319,6 +330,7 @@ Each run starts from kernels that keep nothing from the run before it (`lab.forg
319
330
  - The MongoDB client is ready when its first write has its reply and its monitor streams. The monitor sends its first awaited hello `minHeartbeatFrequencyMS` (500 ms) after its first check. A fault before that hello meets the start of the stream, not the stream that a cell measures.
320
331
  - Each later band (`then`) has its own reference and line. A later band outside its band, or absent, is a finding. So is a line that the prediction names as quiet, after the fault.
321
332
  - For a silent prediction, a flow of an open socket of the driver that a router forgot is a finding.
333
+ - A silent prediction can give a band for the forget of the flow of the socket of the driver (`Prediction.middlebox`). The band counts from the last segment that the socket got before the fault. A forget of another socket of the driver is still a finding.
322
334
 
323
335
  ## The verdict
324
336
 
@@ -409,7 +409,8 @@ interface GroupPrediction {
409
409
  /**
410
410
  * A middlebox expectation tells what the router of a topology does with the flow in the window of
411
411
  * a silent prediction. Without it, the router keeps the flow. With `forgets`, the router forgets
412
- * the flow in that band after the last segment of the client, and nothing detects it.
412
+ * the flow in that band after the last segment that the client got, and nothing detects it. For a
413
+ * driver cell, the flow is the one of the socket of the driver.
413
414
  */
414
415
  interface MiddleboxExpectation {
415
416
  readonly forgets: {
@@ -656,9 +657,10 @@ interface Target {
656
657
  type HarnessImage = "procedures";
657
658
  /**
658
659
  * A shipped image is an image that the harness ships, by its name. Its build context is in the
659
- * package of the harness, and in the package of the prober for `harness`.
660
+ * package of the harness, and in the package of the prober for `harness`. `grpc-go` is a server of
661
+ * grpc-go and `etcd` is etcd on Alpine: each is a subject of a target (`Target.subject`).
660
662
  */
661
- type Shipped = "harness" | "node" | "go-http" | "node-http" | "mongo" | "pg" | "hikari" | "amqp" | "procedures" | "router" | "pgbouncer" | "pgpool";
663
+ type Shipped = "harness" | "node" | "go-http" | "node-http" | "mongo" | "pg" | "hikari" | "amqp" | "grpc" | "grpc-go" | "etcd" | "procedures" | "router" | "pgbouncer" | "pgpool";
662
664
  /**
663
665
  * An image source tells where an image comes from, as data. The harness resolves each kind to an
664
666
  * image that it can start:
@@ -714,10 +716,10 @@ interface Subject {
714
716
  /**
715
717
  * A client is what the runs of a cell use: the TCP client of the harness, or a driver on its
716
718
  * socket. The HTTP clients are the `http.Transport` of Go (`go-http`), the `http.Agent` of Node
717
- * (`http-agent`) and an HTTP/1.1 `Client` of undici (`undici`). The MongoDB driver is `mongodb`, node-postgres is `pg`, HikariCP over pgjdbc is `hikari`, and
718
- * the WebSocket client of `@procedures/client` is `procedures-ws`.
719
+ * (`http-agent`) and an HTTP/1.1 `Client` of undici (`undici`). The MongoDB driver is `mongodb`, node-postgres is `pg`, and HikariCP over pgjdbc is `hikari`.
720
+ * The client of amqplib is `amqp`, the client of grpc-js is `grpc`, and the WebSocket client of `@procedures/client` is `procedures-ws`.
719
721
  */
720
- type Client = "tcp" | "ioredis" | "go-http" | "http-agent" | "undici" | "mongodb" | "pg" | "hikari" | "amqp" | "procedures-ws";
722
+ type Client = "tcp" | "ioredis" | "go-http" | "http-agent" | "undici" | "mongodb" | "pg" | "hikari" | "amqp" | "grpc" | "procedures-ws";
721
723
  /**
722
724
  * A WebSocket probe is the workload and the settings of the WebSocket client of
723
725
  * `@procedures/client` (`procedures-ws`). The cell gives each setting, thus the client takes
@@ -841,6 +843,11 @@ interface Cell {
841
843
  * A pg or hikari driver can send a different text in flight (`inflight`): the second query of
842
844
  * an in-flight run. The first query then makes the pool ready at once, and only the query in
843
845
  * flight is slow, for example `SELECT pg_sleep(20)`.
846
+ *
847
+ * A grpc driver is grpc-js on Node, with one channel. Its operation is a unary call of
848
+ * grpc.health.v1.Health/Check. `Cell.driverOptions` are its channel options (`grpc.*`) and
849
+ * `deadline_ms`. With `hold`, the call in flight asks the server of the harness to hold its reply
850
+ * that long. With `op: "watch"`, the operation in flight is a stream of Health/Watch, which stays open.
844
851
  */
845
852
  readonly driver?: {
846
853
  readonly name: "ioredis";
@@ -859,6 +866,10 @@ interface Cell {
859
866
  readonly inflight?: string;
860
867
  } | {
861
868
  readonly name: "amqp";
869
+ } | {
870
+ readonly name: "grpc";
871
+ readonly hold?: Quantity;
872
+ readonly op?: "check" | "watch";
862
873
  };
863
874
  /** This workload is the workload of an HTTP client (`Cell.client` is an HTTP client). The client then ignores `keepalive` and `userTimeout`. */
864
875
  readonly http?: HttpProbe;
@@ -1106,4 +1117,4 @@ interface RunTopology {
1106
1117
  }
1107
1118
  //#endregion
1108
1119
  export { Target as $, ProbeEvent as A, RouterHop as B, LineMatch as C, Observer as D, MiddleboxForm as E, Reference as F, RunTopology as G, Run as H, ReplicaSet as I, Shipped as J, SentinelEvent as K, ReplicaSetStage as L, ProxyTime as M, Reconnects as N, PinnedImage as O, Recovers as P, Subject as Q, Replies as R, KernelRecord as S, MiddleboxExpectation as T, RunGroup as U, RttRange as V, RunPart as W, Stage as X, ShippedImage as Y, StageBand as Z, Hop as _, Cluster as a, HttpProbe as b, DriverBand as c, FaultPlace as d, Topology as et, Group as f, HarnessImage as g, GroupRole as h, ClientImage as i, latestEndOf as it, ProxyHop as j, Prediction as k, DriverStep as l, GroupPrediction as m, Cell as n, WsProbe as nt, ClusterClientAt as o, GroupPlace as p, SentinelStage as q, Client as r, isHopPlace as rt, ClusterStage as s, BuildImage as t, Toxic as tt, Fault as u, HopEvent as v, MiddleboxEvent as w, ImageSource as x, HopPlace as y, RequestPrediction as z };
1109
- //# sourceMappingURL=cell-BBPhdtav.d.ts.map
1120
+ //# sourceMappingURL=cell-PYx_218L.d.ts.map
@@ -77,6 +77,21 @@ const SHIPPED = {
77
77
  dockerfile: "harness/image/amqp/Dockerfile",
78
78
  from: ["harness/image/amqp"]
79
79
  },
80
+ grpc: {
81
+ name: "loom-harness-grpc",
82
+ dockerfile: "harness/image/grpc/Dockerfile",
83
+ from: ["harness/image/grpc"]
84
+ },
85
+ "grpc-go": {
86
+ name: "loom-harness-grpc-go",
87
+ dockerfile: "harness/image/grpc-go/Dockerfile",
88
+ from: ["harness/image/grpc-go"]
89
+ },
90
+ etcd: {
91
+ name: "loom-harness-etcd",
92
+ dockerfile: "harness/image/etcd/Dockerfile",
93
+ from: ["harness/image/etcd"]
94
+ },
80
95
  procedures: {
81
96
  name: "loom-harness-procedures",
82
97
  dockerfile: "harness/image/procedures/Dockerfile",
@@ -169,6 +184,10 @@ const SHIPPED_CLIENTS = {
169
184
  image: shipped("amqp"),
170
185
  command: ["node", "/opt/harness/amqp/client-amqp.mjs"]
171
186
  },
187
+ grpc: {
188
+ image: shipped("grpc"),
189
+ command: ["node", "/opt/harness/grpc/client-grpc.mjs"]
190
+ },
172
191
  "procedures-ws": {
173
192
  image: SUBJECTS.procedures.image,
174
193
  command: SUBJECTS.procedures.programs["client"]
@@ -375,11 +394,18 @@ const dockerBuild = async (context, plan) => {
375
394
  };
376
395
  const built = /* @__PURE__ */ new Map();
377
396
  /**
397
+ * These are the waits before each next try of a build that fails, in milliseconds. A fault of a
398
+ * registry or of the network often stops in seconds. In run 39278390448 of the cells, two runners
399
+ * failed a build in the same second, and the same builds then passed.
400
+ */
401
+ const BUILD_WAITS = [5e3, 2e4];
402
+ /**
378
403
  * This function builds the image of a plan one time for each process, from a new context that it
379
- * copies the files into. Docker keeps its layers between runs. A build that fails leaves the cache.
380
- * Thus a later cell builds again after a fault of Docker or of the network.
404
+ * copies the files into. Docker keeps its layers between runs. A build that fails tries again after
405
+ * each wait (`waits`), and it writes each failure to stderr. A build that fails each try leaves the
406
+ * cache. Thus a later cell builds again after a fault of Docker or of the network.
381
407
  */
382
- const buildOnce = (plan, builder = dockerBuild) => {
408
+ const buildOnce = (plan, builder = dockerBuild, waits = BUILD_WAITS) => {
383
409
  let tag = built.get(plan.tag);
384
410
  if (tag === void 0) {
385
411
  const building = (async () => {
@@ -389,7 +415,15 @@ const buildOnce = (plan, builder = dockerBuild) => {
389
415
  mkdirSync(dirname(join(context, at)), { recursive: true });
390
416
  copyFileSync(file, join(context, at));
391
417
  }
392
- await builder(context, plan);
418
+ for (let attempt = 0;; attempt += 1) try {
419
+ await builder(context, plan);
420
+ break;
421
+ } catch (error) {
422
+ const wait = waits[attempt];
423
+ if (wait === void 0) throw error;
424
+ process.stderr.write(`the build of ${plan.tag} failed (${error instanceof Error ? error.message : String(error)}): try ${attempt + 2} after ${wait} ms\n`);
425
+ await new Promise((resolve) => setTimeout(resolve, wait));
426
+ }
393
427
  } finally {
394
428
  rmSync(context, {
395
429
  recursive: true,
@@ -433,6 +467,8 @@ const pgClientImage = () => imageOf(shipped("pg"));
433
467
  const hikariClientImage = () => imageOf(shipped("hikari"));
434
468
  /** This function gives the image of the RabbitMQ client: amqplib, with the client and the admin of a cluster cell. */
435
469
  const amqpClientImage = () => imageOf(shipped("amqp"));
470
+ /** This function gives the image of the gRPC client of the harness: grpc-js 1.14.6 on Node 24.21.0, with its client. */
471
+ const grpcClientImage = () => imageOf(shipped("grpc"));
436
472
  /** This function gives the image of the procedures subject: the WebSocket client of `@procedures/client`, and its server. */
437
473
  const proceduresImage = () => imageOf(SUBJECTS.procedures.image);
438
474
  /**
@@ -443,6 +479,6 @@ const targetSourceOf = (target) => target.subject ?? (target.harness === void 0
443
479
  /** This function gives the image that a target operates: the image of its subject, or its stock image. */
444
480
  const targetImageOf = (target) => imageOf(targetSourceOf(target));
445
481
  //#endregion
446
- export { subjectProblems as C, unpinnedBases as D, unlockedManifests as E, subjectClient as S, targetSourceOf as T, pgClientImage as _, SHIPPED_NAMES as a, programOf as b, goHttpImage as c, imageOf as d, imageProblems as f, nodeHttpImage as g, nodeClientImage as h, SHIPPED_CLIENTS as i, harnessImage as l, mongoClientImage as m, PINNED as n, SUBJECTS as o, inContext as p, REPOSITORY as r, amqpClientImage as s, CLIENT_NAMES as t, hikariClientImage as u, planOf as v, targetImageOf as w, routerImage as x, proceduresImage as y };
482
+ export { subjectClient as C, unlockedManifests as D, targetSourceOf as E, unpinnedBases as O, routerImage as S, targetImageOf as T, nodeHttpImage as _, SHIPPED_NAMES as a, proceduresImage as b, goHttpImage as c, hikariClientImage as d, imageOf as f, nodeClientImage as g, mongoClientImage as h, SHIPPED_CLIENTS as i, grpcClientImage as l, inContext as m, PINNED as n, SUBJECTS as o, imageProblems as p, REPOSITORY as r, amqpClientImage as s, CLIENT_NAMES as t, harnessImage as u, pgClientImage as v, subjectProblems as w, programOf as x, planOf as y };
447
483
 
448
- //# sourceMappingURL=image-67OW9r9u.js.map
484
+ //# sourceMappingURL=image-Dqji7rnm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-Dqji7rnm.js","names":[],"sources":["../src/image.ts"],"sourcesContent":["import { createHash } from \"node:crypto\";\nimport { copyFileSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, realpathSync, rmSync, statSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport { tmpdir } from \"node:os\";\nimport { dirname, join, posix, relative, resolve } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { isDeepStrictEqual } from \"node:util\";\nimport type { BuildImage, Client, ClientImage, ImageSource, Shipped, ShippedImage, Subject, Target } from \"./cell.ts\";\n\n/**\n * This module resolves the source of each image (`ImageSource`) to an image that a lab can start.\n * A pinned image is its own name. A build context, or an image that the harness ships, becomes a\n * build with a tag from its content. Each image of the harness is a shipped source in one table.\n * Thus the procedures image of a subject is data, as the image of a caller is.\n */\n\n/**\n * These are the roots of the two packages that the shipped images read: this package, and the\n * prober that Node resolves for it. In a workspace, they are two folders side by side. From npm,\n * the prober is a link, and a Docker build context does not follow a link. Thus each image builds\n * from a context that the harness copies from the two roots.\n */\nconst ROOTS: Readonly<Record<string, string>> = {\n harness: fileURLToPath(new URL(\"..\", import.meta.url)),\n prober: dirname(realpathSync(createRequire(import.meta.url).resolve(\"@mark1russell7/prober/package.json\"))),\n};\n\n/** This function gives the path of a part of a shipped image, which is `<package>/<path>` in the context. */\nconst pathOf = (part: string): string => {\n const [root, ...rest] = part.split(\"/\");\n const base = ROOTS[root!];\n if (base === undefined) throw new Error(`${part} is in no package that the images read`);\n return join(base, ...rest);\n};\n\n/** A shipped context is the build context of a shipped image: its Dockerfile, and each file or folder that the Dockerfile reads, as `<package>/<path>`. */\ninterface ShippedContext {\n readonly name: string;\n readonly dockerfile: string;\n readonly from: readonly string[];\n}\n\n/** These are the build contexts of the images that the harness ships, by their names. */\nconst SHIPPED: Readonly<Record<Shipped, ShippedContext>> = {\n // the prober, the TCP client, the injector and the namespace admin\n harness: {\n name: \"loom-harness\",\n dockerfile: \"harness/image/Dockerfile\",\n from: [\"harness/image/Dockerfile\", \"harness/image/native\", \"prober/bpf\", \"prober/native\", \"prober/fixtures\"],\n },\n // the Node client: ioredis 6.0.0 on Node 24.21.0\n node: { name: \"loom-harness-node\", dockerfile: \"harness/image/node/Dockerfile\", from: [\"harness/image/node\"] },\n // the Go HTTP client: the http.Transport of Go 1.27.2\n \"go-http\": { name: \"loom-harness-go-http\", dockerfile: \"harness/image/go-http/Dockerfile\", from: [\"harness/image/go-http\"] },\n // the Node HTTP clients: the http.Agent of Node 24.21.0, and undici 8.12.2\n \"node-http\": { name: \"loom-harness-node-http\", dockerfile: \"harness/image/node-http/Dockerfile\", from: [\"harness/image/node-http\"] },\n // the MongoDB client: the driver mongodb 7.7.0 on Node 24.21.0, and its step-down script\n mongo: { name: \"loom-harness-mongo\", dockerfile: \"harness/image/mongo/Dockerfile\", from: [\"harness/image/mongo\"] },\n // the PostgreSQL client: node-postgres (pg 8.23.1 with pg-pool 3.14.0) on Node 24.21.0\n pg: { name: \"loom-harness-pg\", dockerfile: \"harness/image/pg/Dockerfile\", from: [\"harness/image/pg\"] },\n // the client of HikariCP 7.1.0 over pgjdbc 42.7.13 on Temurin 21.0.12.1: its jars by their SHA-256\n hikari: { name: \"loom-harness-hikari\", dockerfile: \"harness/image/hikari/Dockerfile\", from: [\"harness/image/hikari\"] },\n // the RabbitMQ client: amqplib 2.2.0 on Node 24.21.0\n amqp: { name: \"loom-harness-amqp\", dockerfile: \"harness/image/amqp/Dockerfile\", from: [\"harness/image/amqp\"] },\n // the gRPC client: grpc-js 1.14.6 on Node 24.21.0\n grpc: { name: \"loom-harness-grpc\", dockerfile: \"harness/image/grpc/Dockerfile\", from: [\"harness/image/grpc\"] },\n // the gRPC server: a server of grpc-go v1.84.0, built with Go 1.27.2, that can hold a reply\n \"grpc-go\": { name: \"loom-harness-grpc-go\", dockerfile: \"harness/image/grpc-go/Dockerfile\", from: [\"harness/image/grpc-go\"] },\n // etcd v3.6.15 from its image, on Alpine: a shell to hold it, and its binaries unchanged\n etcd: { name: \"loom-harness-etcd\", dockerfile: \"harness/image/etcd/Dockerfile\", from: [\"harness/image/etcd\"] },\n // @procedures/client 0.7.0 on Node 24.21.0: its WebSocket client, and the script of its server\n procedures: { name: \"loom-harness-procedures\", dockerfile: \"harness/image/procedures/Dockerfile\", from: [\"harness/image/procedures\"] },\n // the router of a middlebox chain: NAT and conntrack, with a form for a forgotten flow\n router: { name: \"loom-harness-router\", dockerfile: \"harness/image/router/Dockerfile\", from: [\"harness/image/router\"] },\n // PgBouncer 1.26.1, a pooler hop: built from its release tarball, by its SHA-256\n pgbouncer: { name: \"loom-harness-pgbouncer\", dockerfile: \"harness/image/pgbouncer/Dockerfile\", from: [\"harness/image/pgbouncer\"] },\n // Pgpool-II 4.7.3, a pooler hop: built from the source of its tag, by its SHA-256\n pgpool: { name: \"loom-harness-pgpool\", dockerfile: \"harness/image/pgpool/Dockerfile\", from: [\"harness/image/pgpool\"] },\n};\n\n/** These are the names of the images that the harness ships. */\nexport const SHIPPED_NAMES: readonly [Shipped, ...Shipped[]] = Object.keys(SHIPPED) as [Shipped, ...Shipped[]];\n\n/** This image is the stock base of the Node images of the harness: Node 24.21.0 on Alpine, pinned by digest. */\nconst NODE_BASE = \"node:24.21.0-alpine@sha256:ebfe2f90462722a7a4de65e91990e97fe0d401c70e0e762c5b53302f905ec1c1\";\n\n/**\n * These are the subjects that the harness ships, by their names. `procedures` is\n * `@procedures/client` on Node: its WebSocket client (`client-ws.mjs`) and its server\n * (`server-ws.mjs`), from one image. Thus the client and the server use one release.\n */\nexport const SUBJECTS: Readonly<Record<\"procedures\", Subject>> = {\n procedures: {\n name: \"procedures\",\n image: { kind: \"shipped\", name: \"procedures\" },\n base: NODE_BASE,\n programs: {\n client: [\"node\", \"/opt/harness/procedures/client-ws.mjs\"],\n server: [\"node\", \"/opt/harness/procedures/server-ws.mjs\"],\n },\n },\n};\n\n/** This function gives the source of a shipped image. */\nconst shipped = (name: Shipped): ImageSource => ({ kind: \"shipped\", name });\n\n/**\n * These are the clients that the harness ships, by their names (`Client`): the image of each, and\n * its command. A cell that names a client gets this image and this command.\n */\nexport const SHIPPED_CLIENTS: Readonly<Record<Client, ClientImage>> = {\n tcp: { image: shipped(\"harness\"), command: [\"/opt/harness/client\"] },\n ioredis: { image: shipped(\"node\"), command: [\"node\", \"/opt/harness/node/client-ioredis.mjs\"] },\n \"go-http\": { image: shipped(\"go-http\"), command: [\"/opt/harness/client-go\"] },\n \"http-agent\": { image: shipped(\"node-http\"), command: [\"node\", \"/opt/harness/node-http/client-agent.mjs\"] },\n undici: { image: shipped(\"node-http\"), command: [\"node\", \"/opt/harness/node-http/client-undici.mjs\"] },\n mongodb: { image: shipped(\"mongo\"), command: [\"node\", \"/opt/harness/mongo/client-mongo.mjs\"] },\n pg: { image: shipped(\"pg\"), command: [\"node\", \"/opt/harness/pg/client-pg.mjs\"] },\n hikari: {\n image: shipped(\"hikari\"),\n command: [\"java\", \"-Dslf4j.internal.verbosity=ERROR\", \"-cp\", \"/opt/harness/hikari/classes:/opt/harness/hikari/lib/*\", \"ClientHikari\"],\n },\n amqp: { image: shipped(\"amqp\"), command: [\"node\", \"/opt/harness/amqp/client-amqp.mjs\"] },\n grpc: { image: shipped(\"grpc\"), command: [\"node\", \"/opt/harness/grpc/client-grpc.mjs\"] },\n \"procedures-ws\": { image: SUBJECTS.procedures.image, command: SUBJECTS.procedures.programs[\"client\"]! },\n};\n\n/** These are the names of the clients that the harness ships. */\nexport const CLIENT_NAMES: readonly [Client, ...Client[]] = Object.keys(SHIPPED_CLIENTS) as [Client, ...Client[]];\n\n/** This function gives the command of a program of a subject by its role. It fails when the subject has no such program. */\nexport const programOf = (subject: Subject, role: string): readonly string[] => {\n const program = Object.hasOwn(subject.programs, role) ? subject.programs[role] : undefined;\n if (program === undefined) throw new Error(`the subject ${subject.name} has no program ${role}`);\n return program;\n};\n\n/**\n * This function gives the client of a subject for a cell (`Cell.client`): the image of the subject,\n * with the command of a program. A client that the harness ships goes by its name, thus its records\n * stay the same.\n */\nexport const subjectClient = (subject: Subject, role = \"client\"): Client | ClientImage => {\n const client: ClientImage = { image: subject.image, command: programOf(subject, role) };\n return CLIENT_NAMES.find((name) => isDeepStrictEqual(SHIPPED_CLIENTS[name], client)) ?? client;\n};\n\n/** This pattern matches an image pinned by digest: a name, a tag or none, then `@sha256:` and 64 hex digits. */\nexport const PINNED: RegExp = /^[a-z0-9][A-Za-z0-9._\\-/:]*@sha256:[0-9a-f]{64}$/;\n/** This pattern matches the repository of a tag that the harness builds. Its parts are lower case, with `/` between them. */\nexport const REPOSITORY: RegExp = /^[a-z0-9]+(?:[._-]+[a-z0-9]+)*(?:\\/[a-z0-9]+(?:[._-]+[a-z0-9]+)*)*$/;\n\n/** This function tells if a path stays in its context: relative, with `/` between its parts, and no `..`. */\nexport const inContext = (path: string): boolean =>\n typeof path === \"string\" &&\n path.length > 0 &&\n !path.startsWith(\"/\") &&\n !path.includes(\"\\\\\") &&\n !/^[A-Za-z]:/.test(path) &&\n !path.split(\"/\").includes(\"..\");\n\n/** This function tells if a value is a command: an array of one text or more. */\nconst isCommand = (value: unknown): boolean =>\n Array.isArray(value) && value.length > 0 && value.every((word) => typeof word === \"string\" && word.length > 0);\n\n/**\n * This function gives the problems of the source of an image, as data. A pinned image names a\n * digest. A build names a repository, a context, and paths that stay in the context. A shipped image\n * is one that the harness ships.\n */\nexport const imageProblems = (source: ImageSource): string[] => {\n const kind = (source as { readonly kind?: unknown } | null)?.kind;\n if (kind === \"pinned\") {\n const { image } = source as { readonly image?: unknown };\n return typeof image === \"string\" && PINNED.test(image) ? [] : [`${String(image)} is not pinned by digest: name@sha256:<64 hex digits>`];\n }\n if (kind === \"shipped\") {\n const { name } = source as { readonly name?: unknown };\n return typeof name === \"string\" && Object.hasOwn(SHIPPED, name) ? [] : [`the harness ships no image ${String(name)}: ${SHIPPED_NAMES.join(\", \")}`];\n }\n if (kind === \"build\") {\n const build = source as Partial<BuildImage>;\n const problems: string[] = [];\n if (typeof build.name !== \"string\" || !REPOSITORY.test(build.name)) problems.push(`${String(build.name)} is not the name of a repository`);\n if (typeof build.context !== \"string\" || build.context.length === 0) problems.push(\"the build names no context\");\n if (build.files !== undefined && (!Array.isArray(build.files) || build.files.length === 0)) problems.push(\"the build names no files\");\n for (const path of [build.dockerfile ?? \"Dockerfile\", ...(Array.isArray(build.files) ? build.files : [])])\n if (!inContext(path)) problems.push(`${String(path)} is not a path in the context`);\n return problems;\n }\n return [`${JSON.stringify(kind)} is not a kind of image source: pinned, build or shipped`];\n};\n\n/**\n * This function gives the problems of a subject, as data. A subject has a name and a base that a\n * digest pins. Its image source has no problems, and each of its programs is a command.\n */\nexport const subjectProblems = (subject: Subject): string[] => {\n const programs = (subject as { readonly programs?: unknown }).programs;\n const roles = typeof programs === \"object\" && programs !== null ? Object.entries(programs) : [];\n return [\n ...(typeof subject.name === \"string\" && subject.name.length > 0 ? [] : [\"the subject has no name\"]),\n ...(typeof subject.base === \"string\" && PINNED.test(subject.base) ? [] : [`the base ${String(subject.base)} is not pinned by digest`]),\n ...imageProblems(subject.image),\n ...(roles.length === 0 ? [\"the subject has no programs\"] : []),\n ...roles.flatMap(([role, command]) => (isCommand(command) ? [] : [`the program ${role} is not a command`])),\n ];\n};\n\n/**\n * This function gives each `FROM` of a Dockerfile that no digest pins. A `FROM` of an earlier stage\n * by its name, or of `scratch`, needs no digest. A base from an `ARG` has no digest that the harness\n * can read, thus it is in the list too.\n */\nexport const unpinnedBases = (dockerfile: string): string[] => {\n const stages = new Set<string>([\"scratch\"]);\n const found: string[] = [];\n for (const line of dockerfile.replace(/\\\\\\r?\\n/g, \" \").split(/\\r?\\n/)) {\n const from = /^\\s*FROM\\s+(.+)$/i.exec(line)?.[1];\n if (from === undefined) continue;\n const [image, as, stage] = from.split(/\\s+/).filter((word) => !word.startsWith(\"--\"));\n if (image === undefined) continue;\n if (!stages.has(image.toLowerCase()) && !PINNED.test(image)) found.push(image);\n if (as?.toLowerCase() === \"as\" && stage !== undefined) stages.add(stage.toLowerCase());\n }\n return found;\n};\n\n/** These are the lockfiles of each manifest of packages. A manifest without a lockfile installs other packages each time. */\nconst LOCKFILES: Readonly<Record<string, readonly string[]>> = {\n \"package.json\": [\"package-lock.json\", \"npm-lock.json\", \"npm-shrinkwrap.json\", \"pnpm-lock.yaml\", \"yarn.lock\", \"bun.lock\"],\n \"Cargo.toml\": [\"Cargo.lock\"],\n};\n\n/**\n * This function gives each manifest of packages in a context (`package.json`, `Cargo.toml`) that\n * has no lockfile in its folder or in a folder above it. The paths are the paths in the context.\n */\nexport const unlockedManifests = (paths: readonly string[]): string[] => {\n const present = new Set(paths);\n return paths.filter((path) => {\n const parts = path.split(\"/\");\n const locks = LOCKFILES[parts.at(-1)!];\n if (locks === undefined) return false;\n for (let depth = parts.length - 1; depth >= 0; depth -= 1) {\n const folder = parts.slice(0, depth).join(\"/\");\n if (locks.some((lock) => present.has(folder === \"\" ? lock : `${folder}/${lock}`))) return false;\n }\n return true;\n });\n};\n\n/**\n * An image plan tells how the harness gets the image of a source. It is a pull of an image by its\n * name, or a build of a context. A build has its tag, its Dockerfile, and each file with its path.\n */\nexport type ImagePlan =\n | { readonly kind: \"pull\"; readonly image: string }\n | {\n readonly kind: \"build\";\n readonly tag: string;\n readonly dockerfile: string;\n readonly files: ReadonlyArray<{ readonly file: string; readonly at: string }>;\n };\n\n/** This function gives each file under a path, in a stable sequence, but not the output of a local build. */\nconst sources = (path: string): string[] => {\n if (statSync(path).isFile()) return [path];\n return readdirSync(path, { withFileTypes: true })\n .filter((entry) => entry.name !== \"target\" && entry.name !== \"node_modules\")\n .flatMap((entry) => sources(join(path, entry.name)))\n .sort();\n};\n\n/** A part is a file or a folder of a context: its path on the machine, and its path in the context. */\ninterface Part {\n readonly path: string;\n readonly at: string;\n}\n\n/** This function gives the name, the Dockerfile and the parts of the context of a build or of a shipped image. */\nconst contextOf = (source: BuildImage | ShippedImage): { name: string; dockerfile: string; parts: Part[] } => {\n if (source.kind === \"shipped\") {\n const { name, dockerfile, from } = SHIPPED[source.name];\n return { name, dockerfile, parts: from.map((part) => ({ path: pathOf(part), at: part })) };\n }\n const root = resolve(source.context);\n return {\n name: source.name,\n dockerfile: posix.normalize(source.dockerfile ?? \"Dockerfile\"),\n parts: (source.files ?? [\".\"]).map((file) => ({ path: resolve(root, file), at: file === \".\" ? \"\" : file })),\n };\n};\n\n/** This function gives a text for a source in a message. */\nconst labelOf = (source: ImageSource): string =>\n source.kind === \"pinned\" ? source.image : `the ${source.kind === \"build\" ? \"build\" : \"shipped image\"} ${source.name}`;\n\nconst shippedPlans = new Map<Shipped, ImagePlan>();\n\n/**\n * This function gives the plan of the image of a source. A stock image by its name, or a pinned\n * image, is a pull. A build or a shipped image is a build. Its tag is its name, then 12 digits of a\n * sha256. The sha256 reads the path of the Dockerfile, and the path and the content of each file.\n * Thus a changed program cannot operate as an old one.\n *\n * A build fails before it starts on a problem of its source. It also fails on a `FROM` that no\n * digest pins, and on a manifest of packages without a lockfile.\n */\nexport const planOf = (source: string | ImageSource): ImagePlan => {\n if (typeof source === \"string\") return { kind: \"pull\", image: source };\n const problems = imageProblems(source);\n if (problems.length > 0) throw new Error(`${labelOf(source)}: ${problems.join(\", \")}`);\n if (source.kind === \"pinned\") return { kind: \"pull\", image: source.image };\n const known = source.kind === \"shipped\" ? shippedPlans.get(source.name) : undefined;\n if (known !== undefined) return known;\n const { name, dockerfile, parts } = contextOf(source);\n const files = parts.flatMap((part) =>\n sources(part.path).map((file) => ({ file, at: join(part.at, relative(part.path, file)).replaceAll(\"\\\\\", \"/\") })),\n );\n const docker = files.find((each) => each.at === dockerfile);\n if (docker === undefined) throw new Error(`${labelOf(source)}: the context has no ${dockerfile}`);\n const unpinned = unpinnedBases(readFileSync(docker.file, \"utf8\"));\n const unlocked = unlockedManifests(files.map((each) => each.at));\n if (unpinned.length > 0 || unlocked.length > 0)\n throw new Error(\n `${labelOf(source)}: ${[\n ...unpinned.map((image) => `the base ${image} is not pinned by digest`),\n ...unlocked.map((path) => `${path} has no lockfile`),\n ].join(\", \")}`,\n );\n const hash = createHash(\"sha256\");\n hash.update(dockerfile);\n for (const { file, at } of files) {\n hash.update(at);\n hash.update(readFileSync(file));\n }\n const plan: ImagePlan = { kind: \"build\", tag: `${name}:${hash.digest(\"hex\").slice(0, 12)}`, dockerfile, files };\n if (source.kind === \"shipped\") shippedPlans.set(source.name, plan);\n return plan;\n};\n\n/** This function builds a staged context with Docker, through Testcontainers. */\nconst dockerBuild = async (context: string, plan: Extract<ImagePlan, { readonly kind: \"build\" }>): Promise<void> => {\n const { GenericContainer } = await import(\"testcontainers\");\n await GenericContainer.fromDockerfile(context, plan.dockerfile).build(plan.tag, { deleteOnExit: false });\n};\n\nconst built = new Map<string, Promise<string>>();\n\n/**\n * These are the waits before each next try of a build that fails, in milliseconds. A fault of a\n * registry or of the network often stops in seconds. In run 39278390448 of the cells, two runners\n * failed a build in the same second, and the same builds then passed.\n */\nexport const BUILD_WAITS: readonly number[] = [5_000, 20_000];\n\n/**\n * This function builds the image of a plan one time for each process, from a new context that it\n * copies the files into. Docker keeps its layers between runs. A build that fails tries again after\n * each wait (`waits`), and it writes each failure to stderr. A build that fails each try leaves the\n * cache. Thus a later cell builds again after a fault of Docker or of the network.\n */\nexport const buildOnce = (\n plan: Extract<ImagePlan, { readonly kind: \"build\" }>,\n builder: (context: string, plan: Extract<ImagePlan, { readonly kind: \"build\" }>) => Promise<void> = dockerBuild,\n waits: readonly number[] = BUILD_WAITS,\n): Promise<string> => {\n let tag = built.get(plan.tag);\n if (tag === undefined) {\n const building = (async () => {\n const context = mkdtempSync(join(tmpdir(), `${plan.tag.split(\":\")[0]!.replaceAll(\"/\", \"-\")}-`));\n try {\n for (const { file, at } of plan.files) {\n mkdirSync(dirname(join(context, at)), { recursive: true });\n copyFileSync(file, join(context, at));\n }\n for (let attempt = 0; ; attempt += 1) {\n try {\n await builder(context, plan);\n break;\n } catch (error) {\n const wait = waits[attempt];\n if (wait === undefined) throw error;\n process.stderr.write(`the build of ${plan.tag} failed (${error instanceof Error ? error.message : String(error)}): try ${attempt + 2} after ${wait} ms\\n`);\n await new Promise((resolve) => setTimeout(resolve, wait));\n }\n }\n } finally {\n rmSync(context, { recursive: true, force: true });\n }\n return plan.tag;\n })();\n // a failed build does not stay: the next caller tries again\n building.catch(() => {\n if (built.get(plan.tag) === building) built.delete(plan.tag);\n });\n built.set(plan.tag, building);\n tag = building;\n }\n return tag;\n};\n\n/**\n * This function gives an image that a lab can start, from its source. It is the name of a stock\n * image or of a pinned image, which the lab pulls, or the tag of a build. This function loads\n * Testcontainers only for a build.\n */\nexport const imageOf = async (source: string | ImageSource): Promise<string> => {\n const plan = planOf(source);\n return plan.kind === \"pull\" ? plan.image : buildOnce(plan);\n};\n\n/** This function gives the image of the harness: the prober, the TCP client, the injector and the namespace admin. */\nexport const harnessImage = (): Promise<string> => imageOf(shipped(\"harness\"));\n/** This function gives the image of the Node client. */\nexport const nodeClientImage = (): Promise<string> => imageOf(shipped(\"node\"));\n/** This function gives the image of the router. */\nexport const routerImage = (): Promise<string> => imageOf(shipped(\"router\"));\n/** This function gives the image of the Go HTTP client. */\nexport const goHttpImage = (): Promise<string> => imageOf(shipped(\"go-http\"));\n/** This function gives the image of the Node HTTP clients. */\nexport const nodeHttpImage = (): Promise<string> => imageOf(shipped(\"node-http\"));\n/** This function gives the image of the MongoDB client. */\nexport const mongoClientImage = (): Promise<string> => imageOf(shipped(\"mongo\"));\n/** This function gives the image of the PostgreSQL client. */\nexport const pgClientImage = (): Promise<string> => imageOf(shipped(\"pg\"));\n/** This function gives the image of the client of HikariCP over pgjdbc. */\nexport const hikariClientImage = (): Promise<string> => imageOf(shipped(\"hikari\"));\n/** This function gives the image of the RabbitMQ client: amqplib, with the client and the admin of a cluster cell. */\nexport const amqpClientImage = (): Promise<string> => imageOf(shipped(\"amqp\"));\n\n/** This function gives the image of the gRPC client of the harness: grpc-js 1.14.6 on Node 24.21.0, with its client. */\nexport const grpcClientImage = (): Promise<string> => imageOf(shipped(\"grpc\"));\n/** This function gives the image of the procedures subject: the WebSocket client of `@procedures/client`, and its server. */\nexport const proceduresImage = (): Promise<string> => imageOf(SUBJECTS.procedures.image);\n\n/**\n * This function gives the source of the image that a target operates. It is the image of its\n * subject (`Target.subject`), a shipped image by its short form (`Target.harness`), or its stock image.\n */\nexport const targetSourceOf = (target: Target): string | ImageSource =>\n target.subject ?? (target.harness === undefined ? target.image : shipped(target.harness));\n\n/** This function gives the image that a target operates: the image of its subject, or its stock image. */\nexport const targetImageOf = (target: Target): Promise<string> => imageOf(targetSourceOf(target));\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAsBA,MAAM,QAA0C;CAC9C,SAAS,cAAc,IAAI,IAAI,MAAM,YAAY,GAAG,CAAC;CACrD,QAAQ,QAAQ,aAAa,cAAc,YAAY,GAAG,CAAC,CAAC,QAAQ,oCAAoC,CAAC,CAAC;AAC5G;;AAGA,MAAM,UAAU,SAAyB;CACvC,MAAM,CAAC,MAAM,GAAG,QAAQ,KAAK,MAAM,GAAG;CACtC,MAAM,OAAO,MAAM;CACnB,IAAI,SAAS,KAAA,GAAW,MAAM,IAAI,MAAM,GAAG,KAAK,uCAAuC;CACvF,OAAO,KAAK,MAAM,GAAG,IAAI;AAC3B;;AAUA,MAAM,UAAqD;CAEzD,SAAS;EACP,MAAM;EACN,YAAY;EACZ,MAAM;GAAC;GAA4B;GAAwB;GAAc;GAAiB;EAAiB;CAC7G;CAEA,MAAM;EAAE,MAAM;EAAqB,YAAY;EAAiC,MAAM,CAAC,oBAAoB;CAAE;CAE7G,WAAW;EAAE,MAAM;EAAwB,YAAY;EAAoC,MAAM,CAAC,uBAAuB;CAAE;CAE3H,aAAa;EAAE,MAAM;EAA0B,YAAY;EAAsC,MAAM,CAAC,yBAAyB;CAA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AQ,WAAW,CAAC;;AAEhF,MAAa,yBAA0C,QAAQ,QAAQ,OAAO,CAAC;;AAE/E,MAAa,sBAAuC,QAAQ,QAAQ,IAAI,CAAC;;AAEzE,MAAa,0BAA2C,QAAQ,QAAQ,QAAQ,CAAC;;AAEjF,MAAa,wBAAyC,QAAQ,QAAQ,MAAM,CAAC;;AAG7E,MAAa,wBAAyC,QAAQ,QAAQ,MAAM,CAAC;;AAE7E,MAAa,wBAAyC,QAAQ,SAAS,WAAW,KAAK;;;;;AAMvF,MAAa,kBAAkB,WAC7B,OAAO,YAAY,OAAO,YAAY,KAAA,IAAY,OAAO,QAAQ,QAAQ,OAAO,OAAO;;AAGzF,MAAa,iBAAiB,WAAoC,QAAQ,eAAe,MAAM,CAAC"}
package/build/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as Target, A as ProbeEvent, B as RouterHop, C as LineMatch, D as Observer, E as MiddleboxForm, F as Reference, G as RunTopology, H as Run, I as ReplicaSet, J as Shipped, K as SentinelEvent, L as ReplicaSetStage, M as ProxyTime, N as Reconnects, O as PinnedImage, P as Recovers, Q as Subject, R as Replies, S as KernelRecord, T as MiddleboxExpectation, U as RunGroup, V as RttRange, W as RunPart, X as Stage, Y as ShippedImage, Z as StageBand, _ as Hop, a as Cluster, b as HttpProbe, c as DriverBand, d as FaultPlace, et as Topology, f as Group, g as HarnessImage, h as GroupRole, i as ClientImage, it as latestEndOf, j as ProxyHop, k as Prediction, l as DriverStep, m as GroupPrediction, n as Cell, nt as WsProbe, o as ClusterClientAt, p as GroupPlace, q as SentinelStage, r as Client, rt as isHopPlace, s as ClusterStage, t as BuildImage, tt as Toxic, u as Fault, v as HopEvent, w as MiddleboxEvent, x as ImageSource, y as HopPlace, z as RequestPrediction } from "./cell-BBPhdtav.js";
1
+ import { $ as Target, A as ProbeEvent, B as RouterHop, C as LineMatch, D as Observer, E as MiddleboxForm, F as Reference, G as RunTopology, H as Run, I as ReplicaSet, J as Shipped, K as SentinelEvent, L as ReplicaSetStage, M as ProxyTime, N as Reconnects, O as PinnedImage, P as Recovers, Q as Subject, R as Replies, S as KernelRecord, T as MiddleboxExpectation, U as RunGroup, V as RttRange, W as RunPart, X as Stage, Y as ShippedImage, Z as StageBand, _ as Hop, a as Cluster, b as HttpProbe, c as DriverBand, d as FaultPlace, et as Topology, f as Group, g as HarnessImage, h as GroupRole, i as ClientImage, it as latestEndOf, j as ProxyHop, k as Prediction, l as DriverStep, m as GroupPrediction, n as Cell, nt as WsProbe, o as ClusterClientAt, p as GroupPlace, q as SentinelStage, r as Client, rt as isHopPlace, s as ClusterStage, t as BuildImage, tt as Toxic, u as Fault, v as HopEvent, w as MiddleboxEvent, x as ImageSource, y as HopPlace, z as RequestPrediction } from "./cell-PYx_218L.js";
2
2
  import { Quantity } from "@mark1russell7/quantity";
3
3
  import "testcontainers";
4
4
  //#region src/application.d.ts
@@ -142,6 +142,8 @@ export declare const referenceOf: (run: Run, from: Reference, role: string, data
142
142
  * - Each later band (`then`) gets the same test. A later band outside its band, or absent, is a finding.
143
143
  * - A line that the prediction names as quiet, after the fault and in its window, is a finding.
144
144
  * So is a flow of an open socket of the driver that a router forgot, for a silent prediction.
145
+ * A prediction with `middlebox.forgets` gives a band for the flow of the socket of the driver. The
146
+ * band counts from the last segment that the socket got before the fault.
145
147
  * - A silent prediction can time a reply (`reply`), and the verdict tests it against `replies`.
146
148
  *
147
149
  * A run is void when the prober lost records, or when the client did not get its first reply. It
@@ -1109,6 +1111,8 @@ export declare const pgClientImage: () => Promise<string>;
1109
1111
  export declare const hikariClientImage: () => Promise<string>;
1110
1112
  /** This function gives the image of the RabbitMQ client: amqplib, with the client and the admin of a cluster cell. */
1111
1113
  export declare const amqpClientImage: () => Promise<string>;
1114
+ /** This function gives the image of the gRPC client of the harness: grpc-js 1.14.6 on Node 24.21.0, with its client. */
1115
+ export declare const grpcClientImage: () => Promise<string>;
1112
1116
  /** This function gives the image of the procedures subject: the WebSocket client of `@procedures/client`, and its server. */
1113
1117
  export declare const proceduresImage: () => Promise<string>;
1114
1118
  /**
package/build/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as subjectProblems, D as unpinnedBases, E as unlockedManifests, S as subjectClient, T as targetSourceOf, _ as pgClientImage, a as SHIPPED_NAMES, b as programOf, c as goHttpImage, d as imageOf, f as imageProblems, g as nodeHttpImage, h as nodeClientImage, i as SHIPPED_CLIENTS, l as harnessImage, m as mongoClientImage, n as PINNED, o as SUBJECTS, p as inContext, r as REPOSITORY, s as amqpClientImage, t as CLIENT_NAMES, u as hikariClientImage, v as planOf, w as targetImageOf, x as routerImage, y as proceduresImage } from "./image-67OW9r9u.js";
1
+ import { C as subjectClient, D as unlockedManifests, E as targetSourceOf, O as unpinnedBases, S as routerImage, T as targetImageOf, _ as nodeHttpImage, a as SHIPPED_NAMES, b as proceduresImage, c as goHttpImage, d as hikariClientImage, f as imageOf, g as nodeClientImage, h as mongoClientImage, i as SHIPPED_CLIENTS, l as grpcClientImage, m as inContext, n as PINNED, o as SUBJECTS, p as imageProblems, r as REPOSITORY, s as amqpClientImage, t as CLIENT_NAMES, u as harnessImage, v as pgClientImage, w as subjectProblems, x as programOf, y as planOf } from "./image-Dqji7rnm.js";
2
2
  import { quantity, valueIn } from "@mark1russell7/quantity";
3
3
  import { createHash } from "node:crypto";
4
4
  //#region src/cell.ts
@@ -849,6 +849,8 @@ const delayed = (place, from, to, hz, noise) => {
849
849
  * - Each later band (`then`) gets the same test. A later band outside its band, or absent, is a finding.
850
850
  * - A line that the prediction names as quiet, after the fault and in its window, is a finding.
851
851
  * So is a flow of an open socket of the driver that a router forgot, for a silent prediction.
852
+ * A prediction with `middlebox.forgets` gives a band for the flow of the socket of the driver. The
853
+ * band counts from the last segment that the socket got before the fault.
852
854
  * - A silent prediction can time a reply (`reply`), and the verdict tests it against `replies`.
853
855
  *
854
856
  * A run is void when the prober lost records, or when the client did not get its first reply. It
@@ -926,9 +928,26 @@ const measureDriver = (cell, run) => {
926
928
  const line = events.find((event) => event.t > after && event.t <= until && matches(event, match));
927
929
  if (line !== void 0) findings.push(`${wordsOf(match)} came ${between$2(after, line.t).value} s after the fault, where none should`);
928
930
  }
929
- if (!prediction.detects && run.middlebox !== void 0) for (const socket of socketsOf(events)) {
930
- const forgot = run.middlebox.find((line) => line.ev === "ct" && line["type"] === "DESTROY" && String(line["orig"] ?? "").startsWith(`${socket.local}>`) && line.t > socket.opened && (socket.ended === null || line.t < socket.ended) && line.t <= until);
931
- if (forgot !== void 0) findings.push(`a router forgot the flow of the ${socket.role} socket ${between$2(after, forgot.t).value} s after the fault, where it should keep it`);
931
+ const expected = prediction.detects ? void 0 : prediction.middlebox?.forgets;
932
+ if (!prediction.detects && (run.middlebox !== void 0 || expected !== void 0)) {
933
+ const own = socketAt(events, driver.socket, before)?.local;
934
+ if (expected !== void 0 && own === void 0) findings.push(`the client opened no ${driver.socket} socket before the fault`);
935
+ const middlebox = run.middlebox ?? [];
936
+ for (const socket of socketsOf(events)) {
937
+ const forgot = middlebox.find((line) => line.ev === "ct" && line["type"] === "DESTROY" && String(line["orig"] ?? "").startsWith(`${socket.local}>`) && line.t > socket.opened && (socket.ended === null || line.t < socket.ended) && line.t <= until);
938
+ if (expected === void 0 || socket.local !== own) {
939
+ if (forgot !== void 0) findings.push(`a router forgot the flow of the ${socket.role} socket ${between$2(after, forgot.t).value} s after the fault, where it should keep it`);
940
+ continue;
941
+ }
942
+ const last = referenceOf(run, "last-received", driver.socket, false);
943
+ if (forgot === void 0) findings.push(`no router forgot the flow of the ${socket.role} socket in the window, where it should forget it`);
944
+ else if (last === void 0) findings.push(`the ${socket.role} socket got no segment before the fault`);
945
+ else {
946
+ const at = between$2(last, forgot.t).value;
947
+ const [low, high] = [round(valueIn(expected.low, "s") - noise), round(valueIn(expected.high, "s") + noise)];
948
+ if (at < low || at > high) findings.push(`a router forgot the flow of the ${socket.role} socket ${at} s after its last segment, outside [${low}, ${high}] s`);
949
+ }
950
+ }
932
951
  }
933
952
  const stepTimes = (driver.then ?? []).map((step) => {
934
953
  const line = lineAfter(events, step.ends, after);
@@ -5025,6 +5044,14 @@ const probeArgs = (cell, lab) => {
5025
5044
  args.push("--max-s", String(Math.ceil(longest * 2 + 10)));
5026
5045
  return args;
5027
5046
  }
5047
+ if (probe.driver?.name === "grpc") {
5048
+ if (probe.driver.hold !== void 0) args.push("--hold-ms", String(valueIn(probe.driver.hold, "ms")));
5049
+ if (probe.driver.op !== void 0) args.push("--op", probe.driver.op);
5050
+ if (cell.before === true) args.push("--before");
5051
+ if (cell.driverOptions !== void 0) args.push("--options", JSON.stringify(cell.driverOptions));
5052
+ args.push("--max-s", String(Math.ceil(longest * 2 + 10)));
5053
+ return args;
5054
+ }
5028
5055
  if (probe.driver !== void 0) {
5029
5056
  args.push("--keepalive-ms", String(valueIn(probe.driver.keepAlive, "ms")));
5030
5057
  args.push("--max-s", String(Math.ceil(longest * 2 + 10)));
@@ -5591,6 +5618,6 @@ const runCell = async (cell, say = () => {}) => {
5591
5618
  }
5592
5619
  };
5593
5620
  //#endregion
5594
- export { CLIENT_NAMES, CLUSTER_STAGES, CONVERGE_MS, GIVES_AWAY, INJECT, KEPT, LINGER_MS, LISTING, MEMBER_MARKS, MONITOR_DOWN, NODE_MARKS, NOISE, PINNED, PUMP, PUMP_SLACK, QUIET_MS, RELATIVE, REPLICA_SET_STAGES, REPOSITORY, SHIPPED_CLIENTS, SHIPPED_NAMES, STAGES, STATUS_SCRIPT, STEPS, STEP_DOWN, SUBJECTS, amqpClientImage, callOf, clockOffsetOf, closeOrExit, clusterArgs, clusterConf, clusterCutOf, clusterHostsOf, clusterOnce, clusterStagesOf, clusterViewOf, crossingsOf, cutOf, deadlineOf, delayVoids, deviceOf, dropFinding, dropOf, endpointAfter, errorsOf, exitOf, fieldOf, fieldsOf, firstUnanswered, goHttpImage, groupOnce, groupVerdictOf, harnessImage, hikariClientImage, hzOf, imageOf, imageProblems, inContext, infoOf, initiateScript, isHopPlace, judge, lagsOf, latestEndOf, leftAfter, logNameOf, matches, measure, measureDriver, measureGroup, medianInterval, memberCommand, memberConfig, memberLineOf, mongoClientImage, monotonicOf, nodeClientImage, nodeCommand, nodeHttpImage, nodeLineOf, nodeNameOf, nodesOnMonotonic, noiseOf, onMonotonic, openClusterLab, openGroupLab, openLab, openReplicaSetLab, peersOf, pgClientImage, pingsOf, plainOf, planOf, proceduresImage, programLines, programOf, quantileOf, reconnectFinding, reconnectOf, referenceOf, reorderingOf, replicaSetArgs, replicaSetOnce, replicaSetStagesOf, requestOf, requestWords, restamped, routerImage, routesOf, runCell, sentinelConfig, socketAt, socketOf, socketsOf, spread, spreadOf, stagesOf, statusViewOf, subjectClient, subjectProblems, subscriptionsOf, targetImageOf, targetSourceOf, templated, toolJsonOf, toxicBody, unlockedManifests, unpinnedBases, verdictOf, viewOf, writesOf };
5621
+ export { CLIENT_NAMES, CLUSTER_STAGES, CONVERGE_MS, GIVES_AWAY, INJECT, KEPT, LINGER_MS, LISTING, MEMBER_MARKS, MONITOR_DOWN, NODE_MARKS, NOISE, PINNED, PUMP, PUMP_SLACK, QUIET_MS, RELATIVE, REPLICA_SET_STAGES, REPOSITORY, SHIPPED_CLIENTS, SHIPPED_NAMES, STAGES, STATUS_SCRIPT, STEPS, STEP_DOWN, SUBJECTS, amqpClientImage, callOf, clockOffsetOf, closeOrExit, clusterArgs, clusterConf, clusterCutOf, clusterHostsOf, clusterOnce, clusterStagesOf, clusterViewOf, crossingsOf, cutOf, deadlineOf, delayVoids, deviceOf, dropFinding, dropOf, endpointAfter, errorsOf, exitOf, fieldOf, fieldsOf, firstUnanswered, goHttpImage, groupOnce, groupVerdictOf, grpcClientImage, harnessImage, hikariClientImage, hzOf, imageOf, imageProblems, inContext, infoOf, initiateScript, isHopPlace, judge, lagsOf, latestEndOf, leftAfter, logNameOf, matches, measure, measureDriver, measureGroup, medianInterval, memberCommand, memberConfig, memberLineOf, mongoClientImage, monotonicOf, nodeClientImage, nodeCommand, nodeHttpImage, nodeLineOf, nodeNameOf, nodesOnMonotonic, noiseOf, onMonotonic, openClusterLab, openGroupLab, openLab, openReplicaSetLab, peersOf, pgClientImage, pingsOf, plainOf, planOf, proceduresImage, programLines, programOf, quantileOf, reconnectFinding, reconnectOf, referenceOf, reorderingOf, replicaSetArgs, replicaSetOnce, replicaSetStagesOf, requestOf, requestWords, restamped, routerImage, routesOf, runCell, sentinelConfig, socketAt, socketOf, socketsOf, spread, spreadOf, stagesOf, statusViewOf, subjectClient, subjectProblems, subscriptionsOf, targetImageOf, targetSourceOf, templated, toolJsonOf, toxicBody, unlockedManifests, unpinnedBases, verdictOf, viewOf, writesOf };
5595
5622
 
5596
5623
  //# sourceMappingURL=index.js.map