@mark1russell7/machines 0.3.24 → 0.3.26

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/build/index.js CHANGED
@@ -1,49 +1,49 @@
1
1
  import { machineSchema } from "@mark1russell7/algebra";
2
2
  import { z } from "zod";
3
3
  //#region src/grpc/grpc-go-server.ts
4
- const AT$15 = "grpc-go v1.84.0";
4
+ const AT$16 = "grpc-go v1.84.0";
5
5
  const GO = "go1.27.2 src/net";
6
6
  const ETCD = "etcd v3.6.15";
7
7
  /** These are the facts of the transport of grpc-go, for each server on it. */
8
8
  const TRANSPORT = [
9
9
  {
10
- ref: `${AT$15} internal/transport/defaults.go:31-40 the server keepalive: Time 2 h, Timeout 20 s. MinTime of the policy 5 min. MaxConnectionIdle, Age and AgeGrace infinite`,
10
+ ref: `${AT$16} internal/transport/defaults.go:31-40 the server keepalive: Time 2 h, Timeout 20 s. MinTime of the policy 5 min. MaxConnectionIdle, Age and AgeGrace infinite`,
11
11
  rung: "implemented"
12
12
  },
13
13
  {
14
- ref: `${AT$15} internal/transport/http2_server.go:226-253 the defaults of the parameters, a jitter of 10 % on MaxConnectionAge, and TCP_USER_TIMEOUT = Timeout when Time is not infinite`,
14
+ ref: `${AT$16} internal/transport/http2_server.go:226-253 the defaults of the parameters, a jitter of 10 % on MaxConnectionAge, and TCP_USER_TIMEOUT = Timeout when Time is not infinite`,
15
15
  rung: "implemented"
16
16
  },
17
17
  {
18
- ref: `${AT$15} internal/syscall/syscall_linux.go:71-90 SetTCPUserTimeout acts only on a *net.TCPConn. On any other net.Conn it does nothing`,
18
+ ref: `${AT$16} internal/syscall/syscall_linux.go:71-90 SetTCPUserTimeout acts only on a *net.TCPConn. On any other net.Conn it does nothing`,
19
19
  rung: "implemented"
20
20
  },
21
21
  {
22
- ref: `${AT$15} internal/transport/http2_server.go:1197-1286 keepalive(): a PING after Time with no read, and Close when no read comes for Timeout after it. MaxConnectionIdle and MaxConnectionAge drain with GOAWAY, and AgeGrace closes`,
22
+ ref: `${AT$16} internal/transport/http2_server.go:1197-1286 keepalive(): a PING after Time with no read, and Close when no read comes for Timeout after it. MaxConnectionIdle and MaxConnectionAge drain with GOAWAY, and AgeGrace closes`,
23
23
  rung: "implemented"
24
24
  },
25
25
  {
26
- ref: `${AT$15} internal/transport/http2_server.go:881-933 handlePing: a PING less than MinTime after the last one is a strike, and with no stream open and PermitWithoutStream false, less than 2 h. The third strike sends GOAWAY ENHANCE_YOUR_CALM too_many_pings and closes the connection`,
26
+ ref: `${AT$16} internal/transport/http2_server.go:881-933 handlePing: a PING less than MinTime after the last one is a strike, and with no stream open and PermitWithoutStream false, less than 2 h. The third strike sends GOAWAY ENHANCE_YOUR_CALM too_many_pings and closes the connection`,
27
27
  rung: "implemented"
28
28
  },
29
29
  {
30
- ref: `${AT$15} internal/transport/http2_server.go:279-281, :1064, :1132, :1176 each write of headers, a status or data by the server clears the strikes`,
30
+ ref: `${AT$16} internal/transport/http2_server.go:279-281, :1064, :1132, :1176 each write of headers, a status or data by the server clears the strikes`,
31
31
  rung: "implemented"
32
32
  },
33
33
  {
34
- ref: `${AT$15} internal/transport/http2_server.go:1291-1310 Close closes the net.Conn: a FIN, or a reset when bytes are unread`,
34
+ ref: `${AT$16} internal/transport/http2_server.go:1291-1310 Close closes the net.Conn: a FIN, or a reset when bytes are unread`,
35
35
  rung: "implemented"
36
36
  },
37
37
  {
38
- ref: `${AT$15} internal/transport/http2_server.go:536-537, :603-615 a call with the header grpc-timeout gets a timer of that timeout from the read of its headers. Its end closes the stream with RST_STREAM CANCEL, and the context of the handler ends`,
38
+ ref: `${AT$16} internal/transport/http2_server.go:536-537, :603-615 a call with the header grpc-timeout gets a timer of that timeout from the read of its headers. Its end closes the stream with RST_STREAM CANCEL, and the context of the handler ends`,
39
39
  rung: "implemented"
40
40
  },
41
41
  {
42
- ref: `${AT$15} server.go:192, :1000-1009 a deadline of 120 s for the handshake of each new connection (ConnectionTimeout)`,
42
+ ref: `${AT$16} server.go:192, :1000-1009 a deadline of 120 s for the handshake of each new connection (ConnectionTimeout)`,
43
43
  rung: "implemented"
44
44
  },
45
45
  {
46
- ref: `${AT$15} server.go:894-905 the comment of grpc-go: Go sets a TCP keepalive of 15 s on each accepted connection`,
46
+ ref: `${AT$16} server.go:894-905 the comment of grpc-go: Go sets a TCP keepalive of 15 s on each accepted connection`,
47
47
  rung: "documented"
48
48
  },
49
49
  {
@@ -702,7 +702,7 @@ const ETCD_SERVER = serverOf({
702
702
  });
703
703
  //#endregion
704
704
  //#region src/grpc/grpc-js.ts
705
- const AT$14 = "@grpc/grpc-js 1.14.6 src";
705
+ const AT$15 = "@grpc/grpc-js 1.14.6 src";
706
706
  /**
707
707
  * This document is grpc-js 1.14.6 on Node, for one channel to one server with no TLS, its transport
708
708
  * (one HTTP/2 session on one TCP connection) and one unary call on it. It gives the states of the
@@ -732,83 +732,83 @@ const GRPC_JS = machineSchema.parse({
732
732
  },
733
733
  sources: [
734
734
  {
735
- ref: `${AT$14}/transport.ts:70 KEEPALIVE_TIMEOUT_MS is 20000`,
735
+ ref: `${AT$15}/transport.ts:70 KEEPALIVE_TIMEOUT_MS is 20000`,
736
736
  rung: "implemented"
737
737
  },
738
738
  {
739
- ref: `${AT$14}/transport.ts:183-198 grpc.keepalive_time_ms is -1 when the caller gives none, grpc.keepalive_timeout_ms is 20000, and grpc.keepalive_permit_without_calls is false`,
739
+ ref: `${AT$15}/transport.ts:183-198 grpc.keepalive_time_ms is -1 when the caller gives none, grpc.keepalive_timeout_ms is 20000, and grpc.keepalive_permit_without_calls is false`,
740
740
  rung: "implemented"
741
741
  },
742
742
  {
743
- ref: `${AT$14}/transport.ts:447-453 a PING goes out only with a keepalive time above 0, and with a call in flight or permit_without_calls`,
743
+ ref: `${AT$15}/transport.ts:447-453 a PING goes out only with a keepalive time above 0, and with a call in flight or permit_without_calls`,
744
744
  rung: "implemented"
745
745
  },
746
746
  {
747
- ref: `${AT$14}/transport.ts:455-507 each PING starts a timer of keepalive_timeout_ms, and its end with no ACK ends the transport (handleDisconnect). A failed send of the PING ends it too`,
747
+ ref: `${AT$15}/transport.ts:455-507 each PING starts a timer of keepalive_timeout_ms, and its end with no ACK ends the transport (handleDisconnect). A failed send of the PING ends it too`,
748
748
  rung: "implemented"
749
749
  },
750
750
  {
751
- ref: `${AT$14}/transport.ts:515-534 and :553-561 the keepalive timer starts with the first call in flight, and after each ACK. It is not reset by data. When it ends with no call in flight, the PING goes out at the start of the next call`,
751
+ ref: `${AT$15}/transport.ts:515-534 and :553-561 the keepalive timer starts with the first call in flight, and after each ACK. It is not reset by data. When it ends with no call in flight, the PING goes out at the start of the next call`,
752
752
  rung: "implemented"
753
753
  },
754
754
  {
755
- ref: `${AT$14}/transport.ts:200-242 a close or an error of the session, or a close of its socket, ends the transport. A GOAWAY makes it unusable (reportDisconnectToOwner)`,
755
+ ref: `${AT$15}/transport.ts:200-242 a close or an error of the session, or a close of its socket, ends the transport. A GOAWAY makes it unusable (reportDisconnectToOwner)`,
756
756
  rung: "implemented"
757
757
  },
758
758
  {
759
- ref: `${AT$14}/transport.ts:205-227 a GOAWAY ENHANCE_YOUR_CALM with the data too_many_pings tells the subchannel that the server refused the pings`,
759
+ ref: `${AT$15}/transport.ts:205-227 a GOAWAY ENHANCE_YOUR_CALM with the data too_many_pings tells the subchannel that the server refused the pings`,
760
760
  rung: "implemented"
761
761
  },
762
762
  {
763
- ref: `${AT$14}/transport.ts:431-441 handleDisconnect: each call in flight gets onDisconnect, and the session is destroyed in the next turn of the event loop`,
763
+ ref: `${AT$15}/transport.ts:431-441 handleDisconnect: each call in flight gets onDisconnect, and the session is destroyed in the next turn of the event loop`,
764
764
  rung: "implemented"
765
765
  },
766
766
  {
767
- ref: `${AT$14}/transport.ts:684-687 shutdown closes the session: a GOAWAY, then the end of the socket after the last stream`,
767
+ ref: `${AT$15}/transport.ts:684-687 shutdown closes the session: a GOAWAY, then the end of the socket after the last stream`,
768
768
  rung: "implemented"
769
769
  },
770
770
  {
771
- ref: `${AT$14}/transport.ts:792-810 the transport is ready at the first SETTINGS of the server (remoteSettings)`,
771
+ ref: `${AT$15}/transport.ts:792-810 the transport is ready at the first SETTINGS of the server (remoteSettings)`,
772
772
  rung: "implemented"
773
773
  },
774
774
  {
775
- ref: `${AT$14}/transport.ts:818-840 the TCP connect is net.connect with no timeout`,
775
+ ref: `${AT$15}/transport.ts:818-840 the TCP connect is net.connect with no timeout`,
776
776
  rung: "implemented"
777
777
  },
778
778
  {
779
- ref: `${AT$14}/transport.ts:862 setNoDelay on each connection: TCP_NODELAY, thus no Nagle. No setKeepAlive anywhere in the package`,
779
+ ref: `${AT$15}/transport.ts:862 setNoDelay on each connection: TCP_NODELAY, thus no Nagle. No setKeepAlive anywhere in the package`,
780
780
  rung: "implemented"
781
781
  },
782
782
  {
783
- ref: `${AT$14}/subchannel-call.ts:360-371 onDisconnect ends the call with UNAVAILABLE 'Connection dropped' in the next turn of the event loop, unless the stream ends first`,
783
+ ref: `${AT$15}/subchannel-call.ts:360-371 onDisconnect ends the call with UNAVAILABLE 'Connection dropped' in the next turn of the event loop, unless the stream ends first`,
784
784
  rung: "implemented"
785
785
  },
786
786
  {
787
- ref: `${AT$14}/subchannel-call.ts:230-329 the end of a stream with no status: REFUSED_STREAM is UNAVAILABLE, CANCEL after a dropped connection is UNAVAILABLE, and an internal error of ECONNRESET or ETIMEDOUT is UNAVAILABLE`,
787
+ ref: `${AT$15}/subchannel-call.ts:230-329 the end of a stream with no status: REFUSED_STREAM is UNAVAILABLE, CANCEL after a dropped connection is UNAVAILABLE, and an internal error of ECONNRESET or ETIMEDOUT is UNAVAILABLE`,
788
788
  rung: "implemented"
789
789
  },
790
790
  {
791
- ref: `${AT$14}/load-balancing-call.ts:257-261 a stream that the server refused has the progress REFUSED, and any other started stream PROCESSED`,
791
+ ref: `${AT$15}/load-balancing-call.ts:257-261 a stream that the server refused has the progress REFUSED, and any other started stream PROCESSED`,
792
792
  rung: "implemented"
793
793
  },
794
794
  {
795
- ref: `${AT$14}/retrying-call.ts:631-652 a transparent retry for NOT_STARTED, and one for REFUSED. A PROCESSED call is retried only by a retry policy of the service config, which the defaults do not have`,
795
+ ref: `${AT$15}/retrying-call.ts:631-652 a transparent retry for NOT_STARTED, and one for REFUSED. A PROCESSED call is retried only by a retry policy of the service config, which the defaults do not have`,
796
796
  rung: "implemented"
797
797
  },
798
798
  {
799
- ref: `${AT$14}/load-balancing-call.ts:338-345 a pick in TRANSIENT_FAILURE fails the call at once, unless it asks for waitForReady`,
799
+ ref: `${AT$15}/load-balancing-call.ts:338-345 a pick in TRANSIENT_FAILURE fails the call at once, unless it asks for waitForReady`,
800
800
  rung: "implemented"
801
801
  },
802
802
  {
803
- ref: `${AT$14}/resolving-call.ts:118-180 the deadline of a call is a timer from the start of the call. Its end cancels the call with DEADLINE_EXCEEDED`,
803
+ ref: `${AT$15}/resolving-call.ts:118-180 the deadline of a call is a timer from the start of the call. Its end cancels the call with DEADLINE_EXCEEDED`,
804
804
  rung: "implemented"
805
805
  },
806
806
  {
807
- ref: `${AT$14}/deadline.ts:39-52 the header grpc-timeout is the time left to the deadline when the call sends its headers, rounded up to whole milliseconds. A server can start a timer of it`,
807
+ ref: `${AT$15}/deadline.ts:39-52 the header grpc-timeout is the time left to the deadline when the call sends its headers, rounded up to whole milliseconds. A server can start a timer of it`,
808
808
  rung: "implemented"
809
809
  },
810
810
  {
811
- ref: `${AT$14}/subchannel-call.ts:269-279 a RST_STREAM CANCEL of the server ends the call with CANCELLED 'Call cancelled'`,
811
+ ref: `${AT$15}/subchannel-call.ts:269-279 a RST_STREAM CANCEL of the server ends the call with CANCELLED 'Call cancelled'`,
812
812
  rung: "implemented"
813
813
  },
814
814
  {
@@ -816,23 +816,23 @@ const GRPC_JS = machineSchema.parse({
816
816
  rung: "observed"
817
817
  },
818
818
  {
819
- ref: `${AT$14}/subchannel.ts:275-291 the end of the transport takes the subchannel from READY to IDLE. After too_many_pings the keepalive time doubles`,
819
+ ref: `${AT$15}/subchannel.ts:275-291 the end of the transport takes the subchannel from READY to IDLE. After too_many_pings the keepalive time doubles`,
820
820
  rung: "implemented"
821
821
  },
822
822
  {
823
- ref: `${AT$14}/subchannel.ts:298-304 a failed connect takes the subchannel to TRANSIENT_FAILURE`,
823
+ ref: `${AT$15}/subchannel.ts:298-304 a failed connect takes the subchannel to TRANSIENT_FAILURE`,
824
824
  rung: "implemented"
825
825
  },
826
826
  {
827
- ref: `${AT$14}/backoff-timeout.ts:23-26 the reconnect waits 1000 ms first, each next wait 1.6 times longer, up to 120000 ms, with a jitter of 0.2`,
827
+ ref: `${AT$15}/backoff-timeout.ts:23-26 the reconnect waits 1000 ms first, each next wait 1.6 times longer, up to 120000 ms, with a jitter of 0.2`,
828
828
  rung: "implemented"
829
829
  },
830
830
  {
831
- ref: `${AT$14}/backoff-timeout.ts:124, :169-181, :197-201 the first wait after a reset is the initial delay, with no jitter. Each next wait is the last wait, jitter included, times 1.6 and capped, then ± 20 %: the jitter compounds`,
831
+ ref: `${AT$15}/backoff-timeout.ts:124, :169-181, :197-201 the first wait after a reset is the initial delay, with no jitter. Each next wait is the last wait, jitter included, times 1.6 and capped, then ± 20 %: the jitter compounds`,
832
832
  rung: "implemented"
833
833
  },
834
834
  {
835
- ref: `${AT$14}/internal-channel.ts:74-77 and :324-325 a channel with no call for grpc.client_idle_timeout_ms goes IDLE: 30 min at the defaults, 1 s at least`,
835
+ ref: `${AT$15}/internal-channel.ts:74-77 and :324-325 a channel with no call for grpc.client_idle_timeout_ms goes IDLE: 30 min at the defaults, 1 s at least`,
836
836
  rung: "implemented"
837
837
  },
838
838
  {
@@ -2586,7 +2586,7 @@ const UNDICI_CLIENT = machineSchema.parse({
2586
2586
  });
2587
2587
  //#endregion
2588
2588
  //#region src/http/undici-retry.ts
2589
- const AT$13 = "undici 8.12.2 lib/handler/retry-handler.js";
2589
+ const AT$14 = "undici 8.12.2 lib/handler/retry-handler.js";
2590
2590
  /**
2591
2591
  * This document is one request through a `RetryAgent` of undici 8.12.2: the retries of a reply
2592
2592
  * whose status is retryable, for example 429 or 503. Each fact comes from the published package at
@@ -2620,7 +2620,7 @@ const UNDICI_RETRY = machineSchema.parse({
2620
2620
  },
2621
2621
  sources: [
2622
2622
  {
2623
- ref: `${AT$13}:125-133 the defaults: retryAfter true, maxTimeout 30000, minTimeout 500, timeoutFactor 2, maxRetries 5, the methods GET HEAD OPTIONS PUT DELETE TRACE QUERY, the statusCodes 500 502 503 504 429`,
2623
+ ref: `${AT$14}:125-133 the defaults: retryAfter true, maxTimeout 30000, minTimeout 500, timeoutFactor 2, maxRetries 5, the methods GET HEAD OPTIONS PUT DELETE TRACE QUERY, the statusCodes 500 502 503 504 429`,
2624
2624
  rung: "implemented"
2625
2625
  },
2626
2626
  {
@@ -2628,19 +2628,19 @@ const UNDICI_RETRY = machineSchema.parse({
2628
2628
  rung: "implemented"
2629
2629
  },
2630
2630
  {
2631
- ref: `${AT$13}:331-351 the policy: a method or a status out of its lists is not retried, and a counter above maxRetries gives up`,
2631
+ ref: `${AT$14}:331-351 the policy: a method or a status out of its lists is not retried, and a counter above maxRetries gives up`,
2632
2632
  rung: "implemented"
2633
2633
  },
2634
2634
  {
2635
- ref: `${AT$13}:353-370 the delay: Retry-After in seconds times 1000, or an HTTP-date less the clock of the client (:13-16), capped by maxTimeout; 0 at once; else min(minTimeout * timeoutFactor^(counter - 1), maxTimeout); then setTimeout`,
2635
+ ref: `${AT$14}:353-370 the delay: Retry-After in seconds times 1000, or an HTTP-date less the clock of the client (:13-16), capped by maxTimeout; 0 at once; else min(minTimeout * timeoutFactor^(counter - 1), maxTimeout); then setTimeout`,
2636
2636
  rung: "implemented"
2637
2637
  },
2638
2638
  {
2639
- ref: `${AT$13}:380 the counter: one more at each reply`,
2639
+ ref: `${AT$14}:380 the counter: one more at each reply`,
2640
2640
  rung: "implemented"
2641
2641
  },
2642
2642
  {
2643
- ref: `${AT$13}:175-192 and :518-535 a retryable status with throwOnError drops the body of the reply, and the error goes to the policy`,
2643
+ ref: `${AT$14}:175-192 and :518-535 a retryable status with throwOnError drops the body of the reply, and the error goes to the policy`,
2644
2644
  rung: "implemented"
2645
2645
  },
2646
2646
  {
@@ -2802,7 +2802,7 @@ const UNDICI_RETRY = machineSchema.parse({
2802
2802
  });
2803
2803
  //#endregion
2804
2804
  //#region src/ioredis-sentinel.ts
2805
- const AT$12 = "ioredis 6.0.0 built";
2805
+ const AT$13 = "ioredis 6.0.0 built";
2806
2806
  /**
2807
2807
  * This document is the Sentinel path of ioredis 6.0.0. It tells how ioredis finds the primary of a
2808
2808
  * group through the Sentinels, loses it, and connects to the new one. The standalone states of
@@ -2823,43 +2823,43 @@ const IOREDIS_SENTINEL = machineSchema.parse({
2823
2823
  },
2824
2824
  sources: [
2825
2825
  {
2826
- ref: `${AT$12}/connectors/SentinelConnector/index.js:46-121 connect (each Sentinel in turn, then sentinelRetryStrategy)`,
2826
+ ref: `${AT$13}/connectors/SentinelConnector/index.js:46-121 connect (each Sentinel in turn, then sentinelRetryStrategy)`,
2827
2827
  rung: "implemented"
2828
2828
  },
2829
2829
  {
2830
- ref: `${AT$12}/connectors/SentinelConnector/index.js:145-151 resolveMaster (get-master-addr-by-name, then SENTINEL sentinels)`,
2830
+ ref: `${AT$13}/connectors/SentinelConnector/index.js:145-151 resolveMaster (get-master-addr-by-name, then SENTINEL sentinels)`,
2831
2831
  rung: "implemented"
2832
2832
  },
2833
2833
  {
2834
- ref: `${AT$12}/connectors/SentinelConnector/index.js:175-212 connectToSentinel and resolve (one connection for each question, no retry)`,
2834
+ ref: `${AT$13}/connectors/SentinelConnector/index.js:175-212 connectToSentinel and resolve (one connection for each question, no retry)`,
2835
2835
  rung: "implemented"
2836
2836
  },
2837
2837
  {
2838
- ref: `${AT$12}/connectors/SentinelConnector/index.js:27-39 check (the role of the ready check)`,
2838
+ ref: `${AT$13}/connectors/SentinelConnector/index.js:27-39 check (the role of the ready check)`,
2839
2839
  rung: "implemented"
2840
2840
  },
2841
2841
  {
2842
- ref: `${AT$12}/connectors/SentinelConnector/FailoverDetector.js:6-43 (+switch-master, only with failoverDetector)`,
2842
+ ref: `${AT$13}/connectors/SentinelConnector/FailoverDetector.js:6-43 (+switch-master, only with failoverDetector)`,
2843
2843
  rung: "implemented"
2844
2844
  },
2845
2845
  {
2846
- ref: `${AT$12}/redis/RedisOptions.js:9-57 (the defaults)`,
2846
+ ref: `${AT$13}/redis/RedisOptions.js:9-57 (the defaults)`,
2847
2847
  rung: "implemented"
2848
2848
  },
2849
2849
  {
2850
- ref: `${AT$12}/redis/event_handler.js:294-355 closeHandler (retryStrategy, then maxRetriesPerRequest flushes the queue)`,
2850
+ ref: `${AT$13}/redis/event_handler.js:294-355 closeHandler (retryStrategy, then maxRetriesPerRequest flushes the queue)`,
2851
2851
  rung: "implemented"
2852
2852
  },
2853
2853
  {
2854
- ref: `${AT$12}/redis/event_handler.js:364-449 readyHandler (retryAttempts back to 0, the resend, the offline queue)`,
2854
+ ref: `${AT$13}/redis/event_handler.js:364-449 readyHandler (retryAttempts back to 0, the resend, the offline queue)`,
2855
2855
  rung: "implemented"
2856
2856
  },
2857
2857
  {
2858
- ref: `${AT$12}/Redis.js:123-240 _connect (connectTimeout, keepAlive) and :379-405 sendCommand (the offline queue)`,
2858
+ ref: `${AT$13}/Redis.js:123-240 _connect (connectTimeout, keepAlive) and :379-405 sendCommand (the offline queue)`,
2859
2859
  rung: "implemented"
2860
2860
  },
2861
2861
  {
2862
- ref: `${AT$12}/Redis.js:599-605 handleReconnection (reconnectOnError: null, thus a READONLY error goes to the caller)`,
2862
+ ref: `${AT$13}/Redis.js:599-605 handleReconnection (reconnectOnError: null, thus a READONLY error goes to the caller)`,
2863
2863
  rung: "implemented"
2864
2864
  }
2865
2865
  ],
@@ -5053,7 +5053,7 @@ const IOREDIS_STATUS = machineSchema.parse(ioredis_status_default);
5053
5053
  const MANIFESTATIONS = z.record(z.string(), z.array(z.string())).parse(manifestations_default);
5054
5054
  //#endregion
5055
5055
  //#region src/mongo/mongod-replication.ts
5056
- const AT$11 = "mongodb r9.0.4 src/mongo/db/repl";
5056
+ const AT$12 = "mongodb r9.0.4 src/mongo/db/repl";
5057
5057
  /**
5058
5058
  * This document is the replication of mongod 9.0.4. It gives one member of a replica set, its view
5059
5059
  * of the primary, and the election that it can hold. The states are the states of the member. The
@@ -5084,95 +5084,95 @@ const MONGOD_REPL = machineSchema.parse({
5084
5084
  },
5085
5085
  sources: [
5086
5086
  {
5087
- ref: `${AT$11}/repl_set_config.idl:74-109 the settings: heartbeatIntervalMillis 2000, heartbeatTimeoutSecs 10, electionTimeoutMillis 10000, catchUpTimeoutMillis -1, catchUpTakeoverDelayMillis 30000`,
5087
+ ref: `${AT$12}/repl_set_config.idl:74-109 the settings: heartbeatIntervalMillis 2000, heartbeatTimeoutSecs 10, electionTimeoutMillis 10000, catchUpTimeoutMillis -1, catchUpTakeoverDelayMillis 30000`,
5088
5088
  rung: "implemented"
5089
5089
  },
5090
5090
  {
5091
- ref: `${AT$11}/repl_server_parameters.idl:320-328 replElectionTimeoutOffsetLimitFraction 0.15`,
5091
+ ref: `${AT$12}/repl_server_parameters.idl:320-328 replElectionTimeoutOffsetLimitFraction 0.15`,
5092
5092
  rung: "implemented"
5093
5093
  },
5094
5094
  {
5095
- ref: `${AT$11}/topology_coordinator.cpp:1058-1101 the heartbeat window and the timeout of each request, :1124-1147 the next heartbeat, :1239-1248 a member DOWN`,
5095
+ ref: `${AT$12}/topology_coordinator.cpp:1058-1101 the heartbeat window and the timeout of each request, :1124-1147 the next heartbeat, :1239-1248 a member DOWN`,
5096
5096
  rung: "implemented"
5097
5097
  },
5098
5098
  {
5099
- ref: `${AT$11}/topology_coordinator.h:62 kMaxHeartbeatRetries 2`,
5099
+ ref: `${AT$12}/topology_coordinator.h:62 kMaxHeartbeatRetries 2`,
5100
5100
  rung: "implemented"
5101
5101
  },
5102
5102
  {
5103
- ref: `${AT$11}/replication_coordinator_impl_heartbeat.cpp:97-111 the random offset, :346-352 a heartbeat from the primary postpones the election, :1215-1271 the election timeout and its offset`,
5103
+ ref: `${AT$12}/replication_coordinator_impl_heartbeat.cpp:97-111 the random offset, :346-352 a heartbeat from the primary postpones the election, :1215-1271 the election timeout and its offset`,
5104
5104
  rung: "implemented"
5105
5105
  },
5106
5106
  {
5107
- ref: `${AT$11}/data_replicator_external_state_impl.cpp:70-81 an oplog batch that names a primary postpones the election`,
5107
+ ref: `${AT$12}/data_replicator_external_state_impl.cpp:70-81 an oplog batch that names a primary postpones the election`,
5108
5108
  rung: "implemented"
5109
5109
  },
5110
5110
  {
5111
- ref: `${AT$11}/delayable_timeout_callback.cpp:149-172 the offset changes at most once in its own length`,
5111
+ ref: `${AT$12}/delayable_timeout_callback.cpp:149-172 the offset changes at most once in its own length`,
5112
5112
  rung: "implemented"
5113
5113
  },
5114
5114
  {
5115
- ref: `${AT$11}/topology_coordinator.cpp:1440-1457 and :1476-1489 the liveness check: a primary that cannot see a majority steps down`,
5115
+ ref: `${AT$12}/topology_coordinator.cpp:1440-1457 and :1476-1489 the liveness check: a primary that cannot see a majority steps down`,
5116
5116
  rung: "implemented"
5117
5117
  },
5118
5118
  {
5119
- ref: `${AT$11}/replication_coordinator_impl_heartbeat.cpp:1158-1188 the liveness check runs at the stalest member's last update plus the election timeout`,
5119
+ ref: `${AT$12}/replication_coordinator_impl_heartbeat.cpp:1158-1188 the liveness check runs at the stalest member's last update plus the election timeout`,
5120
5120
  rung: "implemented"
5121
5121
  },
5122
5122
  {
5123
- ref: `${AT$11}/replication_coordinator_impl_elect_v1.cpp:189-226 the dry run, :268-382 the term, the durable vote and the real vote, :408-468 the win`,
5123
+ ref: `${AT$12}/replication_coordinator_impl_elect_v1.cpp:189-226 the dry run, :268-382 the term, the durable vote and the real vote, :408-468 the win`,
5124
5124
  rung: "implemented"
5125
5125
  },
5126
5126
  {
5127
- ref: `${AT$11}/vote_requester.cpp:96 a vote request times out at min(electionTimeoutMillis, 30 s), :160-177 a majority of yes votes ends the round`,
5127
+ ref: `${AT$12}/vote_requester.cpp:96 a vote request times out at min(electionTimeoutMillis, 30 s), :160-177 a majority of yes votes ends the round`,
5128
5128
  rung: "implemented"
5129
5129
  },
5130
5130
  {
5131
- ref: `${AT$11}/topology_coordinator.cpp:3741-3790 a member votes for each candidate whose data is not staler than its own, and only an arbiter refuses one because it sees a primary`,
5131
+ ref: `${AT$12}/topology_coordinator.cpp:3741-3790 a member votes for each candidate whose data is not staler than its own, and only an arbiter refuses one because it sees a primary`,
5132
5132
  rung: "implemented"
5133
5133
  },
5134
5134
  {
5135
- ref: `${AT$11}/replication_coordinator_impl_catchup.cpp:35-85 the catch-up and its timeout, :110-133 it ends when each other member answered a heartbeat since the win, or failed one, :349-379 the win restarts each heartbeat`,
5135
+ ref: `${AT$12}/replication_coordinator_impl_catchup.cpp:35-85 the catch-up and its timeout, :110-133 it ends when each other member answered a heartbeat since the win, or failed one, :349-379 the win restarts each heartbeat`,
5136
5136
  rung: "implemented"
5137
5137
  },
5138
5138
  {
5139
- ref: `${AT$11}/topology_coordinator.cpp:3841-3849 and :3910-3932 a restarted heartbeat, and the latest optime that the catch-up waits for`,
5139
+ ref: `${AT$12}/topology_coordinator.cpp:3841-3849 and :3910-3932 a restarted heartbeat, and the latest optime that the catch-up waits for`,
5140
5140
  rung: "implemented"
5141
5141
  },
5142
5142
  {
5143
- ref: `${AT$11}/replication_coordinator_impl.cpp:1490-1570 the end of the drain: a reconfig of the term, then writes, :2580-2588 the hello of a primary that cannot write yet`,
5143
+ ref: `${AT$12}/replication_coordinator_impl.cpp:1490-1570 the end of the drain: a reconfig of the term, then writes, :2580-2588 the hello of a primary that cannot write yet`,
5144
5144
  rung: "implemented"
5145
5145
  },
5146
5146
  {
5147
- ref: `${AT$11}/replication_coordinator_impl_step_up_step_down.cpp:64-329 replSetStepDown: the wait for a caught-up secondary, the step-down and the hand-off`,
5147
+ ref: `${AT$12}/replication_coordinator_impl_step_up_step_down.cpp:64-329 replSetStepDown: the wait for a caught-up secondary, the step-down and the hand-off`,
5148
5148
  rung: "implemented"
5149
5149
  },
5150
5150
  {
5151
- ref: `${AT$11}/repl_set_commands.cpp:545-561 stepDownSecs 60 and secondaryCatchUpPeriodSecs 10`,
5151
+ ref: `${AT$12}/repl_set_commands.cpp:545-561 stepDownSecs 60 and secondaryCatchUpPeriodSecs 10`,
5152
5152
  rung: "implemented"
5153
5153
  },
5154
5154
  {
5155
- ref: `${AT$11}/replication_coordinator_impl.idl:18-26 enableElectionHandoff true, and replication_coordinator_impl.cpp:2830-2873 the hand-off: replSetStepUp with skipDryRun`,
5155
+ ref: `${AT$12}/replication_coordinator_impl.idl:18-26 enableElectionHandoff true, and replication_coordinator_impl.cpp:2830-2873 the hand-off: replSetStepUp with skipDryRun`,
5156
5156
  rung: "implemented"
5157
5157
  },
5158
5158
  {
5159
- ref: `${AT$11}/replication_coordinator_impl.cpp:1516 the reconfig of the term, :4598 and :4750 a new config starts each heartbeat again`,
5159
+ ref: `${AT$12}/replication_coordinator_impl.cpp:1516 the reconfig of the term, :4598 and :4750 a new config starts each heartbeat again`,
5160
5160
  rung: "implemented"
5161
5161
  },
5162
5162
  {
5163
- ref: `${AT$11}/replication_coordinator_impl_heartbeat.cpp:367-376 a heartbeat response that moves a member's optime forward moves the commit point and wakes the writes that wait`,
5163
+ ref: `${AT$12}/replication_coordinator_impl_heartbeat.cpp:367-376 a heartbeat response that moves a member's optime forward moves the commit point and wakes the writes that wait`,
5164
5164
  rung: "implemented"
5165
5165
  },
5166
5166
  {
5167
- ref: `${AT$11}/oplog_fetcher.cpp:119-133 the awaitData timeout min(electionTimeoutMillis / 2, 30 s), :317-324 the socket timeout adds oplogNetworkTimeoutBufferSeconds, :640-647 the exhaust read`,
5167
+ ref: `${AT$12}/oplog_fetcher.cpp:119-133 the awaitData timeout min(electionTimeoutMillis / 2, 30 s), :317-324 the socket timeout adds oplogNetworkTimeoutBufferSeconds, :640-647 the exhaust read`,
5168
5168
  rung: "implemented"
5169
5169
  },
5170
5170
  {
5171
- ref: `${AT$11}/oplog_fetcher.cpp:395-441 an error makes a new cursor while restarts remain, :596-611 the new cursor sets the retried find timeout, :1073-1113 one restart after 5 ms`,
5171
+ ref: `${AT$12}/oplog_fetcher.cpp:395-441 an error makes a new cursor while restarts remain, :596-611 the new cursor sets the retried find timeout, :1073-1113 one restart after 5 ms`,
5172
5172
  rung: "implemented"
5173
5173
  },
5174
5174
  {
5175
- ref: `${AT$11}/repl_server_parameters.idl:121-126 oplogRetriedFindMaxSeconds 2, :234-244 oplogFetcherSteadyStateMaxFetcherRestarts 1, :344-351 oplogNetworkTimeoutBufferSeconds 5`,
5175
+ ref: `${AT$12}/repl_server_parameters.idl:121-126 oplogRetriedFindMaxSeconds 2, :234-244 oplogFetcherSteadyStateMaxFetcherRestarts 1, :344-351 oplogNetworkTimeoutBufferSeconds 5`,
5176
5176
  rung: "implemented"
5177
5177
  },
5178
5178
  {
@@ -5180,19 +5180,19 @@ const MONGOD_REPL = machineSchema.parse({
5180
5180
  rung: "implemented"
5181
5181
  },
5182
5182
  {
5183
- ref: `${AT$11}/bgsync.cpp:395-447 a member without a sync source waits for new heartbeat data or 1 s (:971-976), and topology_coordinator.cpp:1124-1136 it sends its heartbeats each 500 ms`,
5183
+ ref: `${AT$12}/bgsync.cpp:395-447 a member without a sync source waits for new heartbeat data or 1 s (:971-976), and topology_coordinator.cpp:1124-1136 it sends its heartbeats each 500 ms`,
5184
5184
  rung: "implemented"
5185
5185
  },
5186
5186
  {
5187
- ref: `${AT$11}/replication_coordinator_impl.cpp:4947-4972 a member that loses its sync source starts each heartbeat again at once`,
5187
+ ref: `${AT$12}/replication_coordinator_impl.cpp:4947-4972 a member that loses its sync source starts each heartbeat again at once`,
5188
5188
  rung: "implemented"
5189
5189
  },
5190
5190
  {
5191
- ref: `${AT$11}/sync_source_feedback.cpp:37-47 the keepalive of the reporter min(electionTimeoutMillis / 2, 30 s), :39-40 the network timeout 30 s, :99-117 and :134-236 a new reporter only after the old one ends`,
5191
+ ref: `${AT$12}/sync_source_feedback.cpp:37-47 the keepalive of the reporter min(electionTimeoutMillis / 2, 30 s), :39-40 the network timeout 30 s, :99-117 and :134-236 a new reporter only after the old one ends`,
5192
5192
  rung: "implemented"
5193
5193
  },
5194
5194
  {
5195
- ref: `${AT$11}/reporter.cpp:113-117 a reporter ends when its command in flight ends, :119-169 a trigger, :195-228 each replSetUpdatePosition has the network timeout`,
5195
+ ref: `${AT$12}/reporter.cpp:113-117 a reporter ends when its command in flight ends, :119-169 a trigger, :195-228 each replSetUpdatePosition has the network timeout`,
5196
5196
  rung: "implemented"
5197
5197
  },
5198
5198
  {
@@ -5811,7 +5811,7 @@ const MONGOD_REPL = machineSchema.parse({
5811
5811
  });
5812
5812
  //#endregion
5813
5813
  //#region src/mongo/mongod-session.ts
5814
- const AT$10 = "mongodb r9.0.4 src/mongo";
5814
+ const AT$11 = "mongodb r9.0.4 src/mongo";
5815
5815
  /**
5816
5816
  * This document is the hold of mongod 9.0.4 on one client connection, over its socket. `mongod`
5817
5817
  * turns keepalive on for each TCP session. It lowers two keepalive options of the socket to a
@@ -5838,27 +5838,27 @@ const MONGOD_SESSION = machineSchema.parse({
5838
5838
  },
5839
5839
  sources: [
5840
5840
  {
5841
- ref: `${AT$10}/transport/asio/asio_session_impl.cpp:156-165 each TCP session: TCP_NODELAY, SO_KEEPALIVE, setSocketKeepAliveParams, failures at debug 3 in a release build`,
5841
+ ref: `${AT$11}/transport/asio/asio_session_impl.cpp:156-165 each TCP session: TCP_NODELAY, SO_KEEPALIVE, setSocketKeepAliveParams, failures at debug 3 in a release build`,
5842
5842
  rung: "implemented"
5843
5843
  },
5844
5844
  {
5845
- ref: `${AT$10}/util/net/socket_utils.h:15-16 kMaxKeepIdleSecs 300 and kMaxKeepIntvlSecs 1, :19-22 the defaults of setSocketKeepAliveParams`,
5845
+ ref: `${AT$11}/util/net/socket_utils.h:15-16 kMaxKeepIdleSecs 300 and kMaxKeepIntvlSecs 1, :19-22 the defaults of setSocketKeepAliveParams`,
5846
5846
  rung: "implemented"
5847
5847
  },
5848
5848
  {
5849
- ref: `${AT$10}/util/net/socket_utils.cpp:165-196 applyMax: read the option, and set the maximum only when the value is higher, :199-220 TCP_KEEPIDLE and TCP_KEEPINTVL, never TCP_KEEPCNT`,
5849
+ ref: `${AT$11}/util/net/socket_utils.cpp:165-196 applyMax: read the option, and set the maximum only when the value is higher, :199-220 TCP_KEEPIDLE and TCP_KEEPINTVL, never TCP_KEEPCNT`,
5850
5850
  rung: "implemented"
5851
5851
  },
5852
5852
  {
5853
- ref: `${AT$10}/util/net/socket_utils.cpp:176-181 and :190-194 the log of a failed read or set, at the severity of the caller`,
5853
+ ref: `${AT$11}/util/net/socket_utils.cpp:176-181 and :190-194 the log of a failed read or set, at the severity of the caller`,
5854
5854
  rung: "implemented"
5855
5855
  },
5856
5856
  {
5857
- ref: `${AT$10}/util/net/sock.cpp:135-142 the older socket path: SO_KEEPALIVE, then the same maximums, failures as errors`,
5857
+ ref: `${AT$11}/util/net/sock.cpp:135-142 the older socket path: SO_KEEPALIVE, then the same maximums, failures as errors`,
5858
5858
  rung: "implemented"
5859
5859
  },
5860
5860
  {
5861
- ref: `${AT$10}/db/repl/replication_info.cpp:131-143 an awaitable hello waits until now + maxAwaitTimeMS on the precise clock, or a change of the topology`,
5861
+ ref: `${AT$11}/db/repl/replication_info.cpp:131-143 an awaitable hello waits until now + maxAwaitTimeMS on the precise clock, or a change of the topology`,
5862
5862
  rung: "implemented"
5863
5863
  }
5864
5864
  ],
@@ -6020,7 +6020,7 @@ const MONGOD_SESSION = machineSchema.parse({
6020
6020
  });
6021
6021
  //#endregion
6022
6022
  //#region src/mongo/mongodb-node.ts
6023
- const AT$9 = "mongodb 7.7.0 src";
6023
+ const AT$10 = "mongodb 7.7.0 src";
6024
6024
  /**
6025
6025
  * This document is the MongoDB Node driver 7.7.0, for one server of a replica set. It gives one
6026
6026
  * connection of the driver by its role, and the timers that act on it. The roles are the monitor
@@ -6047,75 +6047,75 @@ const MONGODB_NODE = machineSchema.parse({
6047
6047
  },
6048
6048
  sources: [
6049
6049
  {
6050
- ref: `${AT$9}/connection_string.ts:804-807 connectTimeoutMS 30000, :850-853 heartbeatFrequencyMS 10000, :934-937 minHeartbeatFrequencyMS 500`,
6050
+ ref: `${AT$10}/connection_string.ts:804-807 connectTimeoutMS 30000, :850-853 heartbeatFrequencyMS 10000, :934-937 minHeartbeatFrequencyMS 500`,
6051
6051
  rung: "implemented"
6052
6052
  },
6053
6053
  {
6054
- ref: `${AT$9}/connection_string.ts:1100-1103 serverSelectionTimeoutMS 30000, :1107-1111 socketTimeoutMS 0, :1178-1182 waitQueueTimeoutMS 0`,
6054
+ ref: `${AT$10}/connection_string.ts:1100-1103 serverSelectionTimeoutMS 30000, :1107-1111 socketTimeoutMS 0, :1178-1182 waitQueueTimeoutMS 0`,
6055
6055
  rung: "implemented"
6056
6056
  },
6057
6057
  {
6058
- ref: `${AT$9}/connection_string.ts:896-898 maxConnecting 2, :906-908 maxIdleTimeMS 0, :910-912 maxPoolSize 100, :930-933 minPoolSize 0, :1075-1082 retryReads and retryWrites true, :1089-1091 serverMonitoringMode auto`,
6058
+ ref: `${AT$10}/connection_string.ts:896-898 maxConnecting 2, :906-908 maxIdleTimeMS 0, :910-912 maxPoolSize 100, :930-933 minPoolSize 0, :1075-1082 retryReads and retryWrites true, :1089-1091 serverMonitoringMode auto`,
6059
6059
  rung: "implemented"
6060
6060
  },
6061
6061
  {
6062
- ref: `${AT$9}/cmap/connect.ts:291 DEFAULT_KEEP_ALIVE_INITIAL_DELAY_MS 120000, :336-338 keepAlive and noDelay, :378-417 makeSocket: setKeepAlive, setNoDelay, setTimeout(connectTimeoutMS), :432-438 the connect timeout`,
6062
+ ref: `${AT$10}/cmap/connect.ts:291 DEFAULT_KEEP_ALIVE_INITIAL_DELAY_MS 120000, :336-338 keepAlive and noDelay, :378-417 makeSocket: setKeepAlive, setNoDelay, setTimeout(connectTimeoutMS), :432-438 the connect timeout`,
6063
6063
  rung: "implemented"
6064
6064
  },
6065
6065
  {
6066
- ref: `${AT$9}/cmap/connect.ts:117-120 the handshake reads with socketTimeoutMS = connectTimeoutMS`,
6066
+ ref: `${AT$10}/cmap/connect.ts:117-120 the handshake reads with socketTimeoutMS = connectTimeoutMS`,
6067
6067
  rung: "implemented"
6068
6068
  },
6069
6069
  {
6070
- ref: `${AT$9}/sdam/monitor.ts:245-259 the streaming protocol, :338-371 the awaitable hello: maxAwaitTimeMS = heartbeatFrequencyMS, socketTimeoutMS = connectTimeoutMS + maxAwaitTimeMS`,
6070
+ ref: `${AT$10}/sdam/monitor.ts:245-259 the streaming protocol, :338-371 the awaitable hello: maxAwaitTimeMS = heartbeatFrequencyMS, socketTimeoutMS = connectTimeoutMS + maxAwaitTimeMS`,
6071
6071
  rung: "implemented"
6072
6072
  },
6073
6073
  {
6074
- ref: `${AT$9}/sdam/monitor.ts:273-293 a failed heartbeat: ResetPool, and InterruptInUseConnections for a timeout`,
6074
+ ref: `${AT$10}/sdam/monitor.ts:273-293 a failed heartbeat: ResetPool, and InterruptInUseConnections for a timeout`,
6075
6075
  rung: "implemented"
6076
6076
  },
6077
6077
  {
6078
- ref: `${AT$9}/sdam/monitor.ts:175-194 reset: the next check after heartbeatFrequencyMS, :609-636 wake: no check sooner than minHeartbeatFrequencyMS, :668-691 the next check after heartbeatFrequencyMS`,
6078
+ ref: `${AT$10}/sdam/monitor.ts:175-194 reset: the next check after heartbeatFrequencyMS, :609-636 wake: no check sooner than minHeartbeatFrequencyMS, :668-691 the next check after heartbeatFrequencyMS`,
6079
6079
  rung: "implemented"
6080
6080
  },
6081
6081
  {
6082
- ref: `${AT$9}/sdam/monitor.ts:490-565 the RTT pinger: its own connection, a hello each heartbeatFrequencyMS, no socket timeout`,
6082
+ ref: `${AT$10}/sdam/monitor.ts:490-565 the RTT pinger: its own connection, a hello each heartbeatFrequencyMS, no socket timeout`,
6083
6083
  rung: "implemented"
6084
6084
  },
6085
6085
  {
6086
- ref: `${AT$9}/cmap/connection.ts:328-334 a socket timeout, 1 ms later, is a MongoNetworkTimeoutError, :461-505 the socket timeout of a command, set again at each reply`,
6086
+ ref: `${AT$10}/cmap/connection.ts:328-334 a socket timeout, 1 ms later, is a MongoNetworkTimeoutError, :461-505 the socket timeout of a command, set again at each reply`,
6087
6087
  rung: "implemented"
6088
6088
  },
6089
6089
  {
6090
- ref: `${AT$9}/sdam/server.ts:186 resetServer, :390-444 handleError, :450-515 decorateCommandError, :532-546 markServerUnknown: a network error that is not a timeout resets the monitor`,
6090
+ ref: `${AT$10}/sdam/server.ts:186 resetServer, :390-444 handleError, :450-515 decorateCommandError, :532-546 markServerUnknown: a network error that is not a timeout resets the monitor`,
6091
6091
  rung: "implemented"
6092
6092
  },
6093
6093
  {
6094
- ref: `${AT$9}/sdam/topology.ts:559 the selection timeout, :568-572 and :635-664 MongoServerSelectionError, :862-888 updateServers clears the pool, :1082-1089 a waiting selection wakes each monitor`,
6094
+ ref: `${AT$10}/sdam/topology.ts:559 the selection timeout, :568-572 and :635-664 MongoServerSelectionError, :862-888 updateServers clears the pool, :1082-1089 a waiting selection wakes each monitor`,
6095
6095
  rung: "implemented"
6096
6096
  },
6097
6097
  {
6098
- ref: `${AT$9}/sdam/topology_description.ts:458-467 a primary that another primary replaces is Unknown, and nothing clears its pool`,
6098
+ ref: `${AT$10}/sdam/topology_description.ts:458-467 a primary that another primary replaces is Unknown, and nothing clears its pool`,
6099
6099
  rung: "implemented"
6100
6100
  },
6101
6101
  {
6102
- ref: `${AT$9}/cmap/connection_pool.ts:417-468 clear, :475-481 interruptInUseConnections: PoolClearedOnNetworkError, :584 a connection idle for maxIdleTimeMS is perished at the next check-out`,
6102
+ ref: `${AT$10}/cmap/connection_pool.ts:417-468 clear, :475-481 interruptInUseConnections: PoolClearedOnNetworkError, :584 a connection idle for maxIdleTimeMS is perished at the next check-out`,
6103
6103
  rung: "implemented"
6104
6104
  },
6105
6105
  {
6106
- ref: `${AT$9}/cmap/errors.ts:37-84 PoolClearedError and PoolClearedOnNetworkError, with the label PoolRequestedRetry`,
6106
+ ref: `${AT$10}/cmap/errors.ts:37-84 PoolClearedError and PoolClearedOnNetworkError, with the label PoolRequestedRetry`,
6107
6107
  rung: "implemented"
6108
6108
  },
6109
6109
  {
6110
- ref: `${AT$9}/operations/execute_operation.ts:252-279 two attempts for a retryable read or write, :375-380 the retry selects a server again, :442-445 canRetry`,
6110
+ ref: `${AT$10}/operations/execute_operation.ts:252-279 two attempts for a retryable read or write, :375-380 the retry selects a server again, :442-445 canRetry`,
6111
6111
  rung: "implemented"
6112
6112
  },
6113
6113
  {
6114
- ref: `${AT$9}/error.ts:1377-1394 the retryable codes, :1431-1436 isRetryableWriteError: RetryableWriteError or PoolRequestedRetry`,
6114
+ ref: `${AT$10}/error.ts:1377-1394 the retryable codes, :1431-1436 isRetryableWriteError: RetryableWriteError or PoolRequestedRetry`,
6115
6115
  rung: "implemented"
6116
6116
  },
6117
6117
  {
6118
- ref: `${AT$9}/timeout.ts:362-372 the legacy timeout context: the selection timeout, and no check-out timeout at waitQueueTimeoutMS 0`,
6118
+ ref: `${AT$10}/timeout.ts:362-372 the legacy timeout context: the selection timeout, and no check-out timeout at waitQueueTimeoutMS 0`,
6119
6119
  rung: "implemented"
6120
6120
  },
6121
6121
  {
@@ -7795,7 +7795,7 @@ const HIKARICP_PGJDBC = machineSchema.parse({
7795
7795
  });
7796
7796
  //#endregion
7797
7797
  //#region src/pg/node-postgres.ts
7798
- const AT$8 = "pg 8.23.1 lib";
7798
+ const AT$9 = "pg 8.23.1 lib";
7799
7799
  const POOL = "pg-pool 3.14.0";
7800
7800
  /**
7801
7801
  * This document is node-postgres 8.23.1 (the npm package pg) with pg-pool 3.14.0, for one client
@@ -7837,75 +7837,75 @@ const NODE_POSTGRES = machineSchema.parse({
7837
7837
  rung: "implemented"
7838
7838
  },
7839
7839
  {
7840
- ref: `${AT$8}/defaults.js:42 max 10 and :46 idleTimeoutMillis 30000: no line of pg or pg-pool reads them, thus a pool does not use them`,
7840
+ ref: `${AT$9}/defaults.js:42 max 10 and :46 idleTimeoutMillis 30000: no line of pg or pg-pool reads them, thus a pool does not use them`,
7841
7841
  rung: "implemented"
7842
7842
  },
7843
7843
  {
7844
- ref: `${AT$8}/defaults.js:65, :69, :73 and :76 statement_timeout, lock_timeout, idle_in_transaction_session_timeout and query_timeout are false`,
7844
+ ref: `${AT$9}/defaults.js:65, :69, :73 and :76 statement_timeout, lock_timeout, idle_in_transaction_session_timeout and query_timeout are false`,
7845
7845
  rung: "implemented"
7846
7846
  },
7847
7847
  {
7848
- ref: `${AT$8}/defaults.js:63-76 the comments of pg: each of the four is in milliseconds, false is no limit, and query_timeout is on the client side`,
7848
+ ref: `${AT$9}/defaults.js:63-76 the comments of pg: each of the four is in milliseconds, false is no limit, and query_timeout is on the client side`,
7849
7849
  rung: "documented"
7850
7850
  },
7851
7851
  {
7852
- ref: `${AT$8}/connection-parameters.js:9-23 val: the config, else the default of pg, :121-124 the three timeouts of the server and query_timeout, with no environment variable`,
7852
+ ref: `${AT$9}/connection-parameters.js:9-23 val: the config, else the default of pg, :121-124 the three timeouts of the server and query_timeout, with no environment variable`,
7853
7853
  rung: "implemented"
7854
7854
  },
7855
7855
  {
7856
- ref: `${AT$8}/client.js:89-98 the Connection gets keepAlive false and keepAliveInitialDelayMillis 0 when the config does not give them, :116 connectionTimeoutMillis 0`,
7856
+ ref: `${AT$9}/client.js:89-98 the Connection gets keepAlive false and keepAliveInitialDelayMillis 0 when the config does not give them, :116 connectionTimeoutMillis 0`,
7857
7857
  rung: "implemented"
7858
7858
  },
7859
7859
  {
7860
- ref: `${AT$8}/stream.js:20-24 and :78-83 outside Cloudflare Workers, the socket is a new net.Socket with no option`,
7860
+ ref: `${AT$9}/stream.js:20-24 and :78-83 outside Cloudflare Workers, the socket is a new net.Socket with no option`,
7861
7861
  rung: "implemented"
7862
7862
  },
7863
7863
  {
7864
- ref: `${AT$8}/connection.js:40-52 setNoDelay(true) before the connect, and setKeepAlive(true, keepAliveInitialDelayMillis) at the connect only when keepAlive is true, :54-65 the error and the close of the socket`,
7864
+ ref: `${AT$9}/connection.js:40-52 setNoDelay(true) before the connect, and setKeepAlive(true, keepAliveInitialDelayMillis) at the connect only when keepAlive is true, :54-65 the error and the close of the socket`,
7865
7865
  rung: "implemented"
7866
7866
  },
7867
7867
  {
7868
- ref: `${AT$8}/client.js:167-176 and :702-737 are the only timers of the client, and connection.js has none: the client sends nothing by itself on an idle connection`,
7868
+ ref: `${AT$9}/client.js:167-176 and :702-737 are the only timers of the client, and connection.js has none: the client sends nothing by itself on an idle connection`,
7869
7869
  rung: "implemented"
7870
7870
  },
7871
7871
  {
7872
- ref: `${AT$8}/client.js:153-230 _connect: no second connect, the connect timer of the client ('timeout expired'), and 'Connection terminated unexpectedly' for an end that the client did not ask for`,
7872
+ ref: `${AT$9}/client.js:153-230 _connect: no second connect, the connect timer of the client ('timeout expired'), and 'Connection terminated unexpectedly' for an end that the client did not ask for`,
7873
7873
  rung: "implemented"
7874
7874
  },
7875
7875
  {
7876
- ref: `${AT$8}/client.js:373-387 the first ReadyForQuery ends the connect and clears the timer, :398-423 an error before it goes to the connect callback, and an error after it makes the client unqueryable`,
7876
+ ref: `${AT$9}/client.js:373-387 the first ReadyForQuery ends the connect and clears the timer, :398-423 an error before it goes to the connect callback, and an error after it makes the client unqueryable`,
7877
7877
  rung: "implemented"
7878
7878
  },
7879
7879
  {
7880
- ref: `${AT$8}/client.js:426-442 an ErrorResponse fails the active query only, and with no active query it is an error of the client`,
7880
+ ref: `${AT$9}/client.js:426-442 an ErrorResponse fails the active query only, and with no active query it is an error of the client`,
7881
7881
  rung: "implemented"
7882
7882
  },
7883
7883
  {
7884
- ref: `${AT$8}/connection.js:137-145 and pg-protocol 1.16.1 dist/parser.js:142-144, :296-323 an ErrorResponse is a DatabaseError, with the severity and the code that the server gives`,
7884
+ ref: `${AT$9}/connection.js:137-145 and pg-protocol 1.16.1 dist/parser.js:142-144, :296-323 an ErrorResponse is a DatabaseError, with the severity and the code that the server gives`,
7885
7885
  rung: "implemented"
7886
7886
  },
7887
7887
  {
7888
- ref: `${AT$8}/client.js:133-151 _errorAllQueries: each query of the client fails with the same error, on the next tick`,
7888
+ ref: `${AT$9}/client.js:133-151 _errorAllQueries: each query of the client fails with the same error, on the next tick`,
7889
7889
  rung: "implemented"
7890
7890
  },
7891
7891
  {
7892
- ref: `${AT$8}/query.js:122-150 a query gives its error or its result to its callback, at the error or at the ReadyForQuery`,
7892
+ ref: `${AT$9}/query.js:122-150 a query gives its error or its result to its callback, at the error or at the ReadyForQuery`,
7893
7893
  rung: "implemented"
7894
7894
  },
7895
7895
  {
7896
- ref: `${AT$8}/client.js:702-737 query_timeout: a Node timer for each query, 'Query read timeout'. The client sends no cancel, and it keeps the active query`,
7896
+ ref: `${AT$9}/client.js:702-737 query_timeout: a Node timer for each query, 'Query read timeout'. The client sends no cancel, and it keeps the active query`,
7897
7897
  rung: "implemented"
7898
7898
  },
7899
7899
  {
7900
- ref: `${AT$8}/client.js:616-641 the next query goes only after a ReadyForQuery, :765-777 a query on an unqueryable or ended client fails at once`,
7900
+ ref: `${AT$9}/client.js:616-641 the next query goes only after a ReadyForQuery, :765-777 a query on an unqueryable or ended client fails at once`,
7901
7901
  rung: "implemented"
7902
7902
  },
7903
7903
  {
7904
- ref: `${AT$8}/client.js:799-836 end: a dead socket or an active query destroys the socket, else connection.js:217-227 sends Terminate and ends the socket`,
7904
+ ref: `${AT$9}/client.js:799-836 end: a dead socket or an active query destroys the socket, else connection.js:217-227 sends Terminate and ends the socket`,
7905
7905
  rung: "implemented"
7906
7906
  },
7907
7907
  {
7908
- ref: `${AT$8}/client.js:543-572 getStartupConf: statement_timeout, lock_timeout and idle_in_transaction_session_timeout go to the server only when they are set`,
7908
+ ref: `${AT$9}/client.js:543-572 getStartupConf: statement_timeout, lock_timeout and idle_in_transaction_session_timeout go to the server only when they are set`,
7909
7909
  rung: "implemented"
7910
7910
  },
7911
7911
  {
@@ -10301,7 +10301,7 @@ const PGPOOL_SESSION = machineSchema.parse({
10301
10301
  });
10302
10302
  //#endregion
10303
10303
  //#region src/pg/postgres-session.ts
10304
- const AT$7 = "postgresql REL_17_11 src";
10304
+ const AT$8 = "postgresql REL_17_11 src";
10305
10305
  const DOC = "postgresql REL_17_11 doc/src/sgml";
10306
10306
  /**
10307
10307
  * This document is the hold of a PostgreSQL 17.11 backend on one client connection, over its TCP
@@ -10341,163 +10341,163 @@ const POSTGRES_SESSION = machineSchema.parse({
10341
10341
  rung: "implemented"
10342
10342
  },
10343
10343
  {
10344
- ref: `${AT$7}/backend/tcop/backend_startup.c:157-161 BackendInitialize calls pq_init in the backend, before the startup packet`,
10344
+ ref: `${AT$8}/backend/tcop/backend_startup.c:157-161 BackendInitialize calls pq_init in the backend, before the startup packet`,
10345
10345
  rung: "implemented"
10346
10346
  },
10347
10347
  {
10348
- ref: `${AT$7}/backend/libpq/pqcomm.c:793-817 AcceptConnection in the postmaster, :180 the Port starts at zeros, :195-220 TCP_NODELAY and SO_KEEPALIVE on each socket that is not AF_UNIX, a failure is FATAL, :264-274 then the four TCP GUCs, a failure is a LOG only`,
10348
+ ref: `${AT$8}/backend/libpq/pqcomm.c:793-817 AcceptConnection in the postmaster, :180 the Port starts at zeros, :195-220 TCP_NODELAY and SO_KEEPALIVE on each socket that is not AF_UNIX, a failure is FATAL, :264-274 then the four TCP GUCs, a failure is a LOG only`,
10349
10349
  rung: "implemented"
10350
10350
  },
10351
10351
  {
10352
- ref: `${AT$7}/backend/libpq/pqcomm.c:1663-1711 pq_setkeepalivesidle: no call at a value equal to the Port's, and 0 sets the value that getsockopt read first; :1748-1795, :1827-1870 and :1902-1945 the same for TCP_KEEPINTVL, TCP_KEEPCNT and TCP_USER_TIMEOUT`,
10352
+ ref: `${AT$8}/backend/libpq/pqcomm.c:1663-1711 pq_setkeepalivesidle: no call at a value equal to the Port's, and 0 sets the value that getsockopt read first; :1748-1795, :1827-1870 and :1902-1945 the same for TCP_KEEPINTVL, TCP_KEEPCNT and TCP_USER_TIMEOUT`,
10353
10353
  rung: "implemented"
10354
10354
  },
10355
10355
  {
10356
- ref: `${AT$7}/backend/libpq/pqcomm.c:87-90 TCP_KEEPIDLE on Linux, :1947-2047 an assign hook sets the socket of the session at once, and a show hook reads the kernel`,
10356
+ ref: `${AT$8}/backend/libpq/pqcomm.c:87-90 TCP_KEEPIDLE on Linux, :1947-2047 an assign hook sets the socket of the session at once, and a show hook reads the kernel`,
10357
10357
  rung: "implemented"
10358
10358
  },
10359
10359
  {
10360
- ref: `${AT$7}/backend/utils/misc/guc_tables.c:3452-3461 tcp_keepalives_idle 0 s, :3463-3472 tcp_keepalives_interval 0 s, :3485-3495 tcp_keepalives_count 0, :3587-3596 tcp_user_timeout 0 ms: each PGC_USERSET, 0 to INT_MAX, 0 is the system default`,
10360
+ ref: `${AT$8}/backend/utils/misc/guc_tables.c:3452-3461 tcp_keepalives_idle 0 s, :3463-3472 tcp_keepalives_interval 0 s, :3485-3495 tcp_keepalives_count 0, :3587-3596 tcp_user_timeout 0 ms: each PGC_USERSET, 0 to INT_MAX, 0 is the system default`,
10361
10361
  rung: "implemented"
10362
10362
  },
10363
10363
  {
10364
- ref: `${AT$7}/backend/utils/misc/guc_tables.c:2611-2620 statement_timeout, :2622-2631 lock_timeout, :2633-2642 idle_in_transaction_session_timeout, :2644-2653 transaction_timeout, :2655-2664 idle_session_timeout: each 0 ms, 0 to INT_MAX, PGC_USERSET, 0 turns it off`,
10364
+ ref: `${AT$8}/backend/utils/misc/guc_tables.c:2611-2620 statement_timeout, :2622-2631 lock_timeout, :2633-2642 idle_in_transaction_session_timeout, :2644-2653 transaction_timeout, :2655-2664 idle_session_timeout: each 0 ms, 0 to INT_MAX, PGC_USERSET, 0 turns it off`,
10365
10365
  rung: "implemented"
10366
10366
  },
10367
10367
  {
10368
- ref: `${AT$7}/backend/utils/misc/guc_tables.c:2774-2783 authentication_timeout 60 s, 1 to 600, PGC_SIGHUP; :3632-3641 client_connection_check_interval 0 ms, 0 to INT_MAX, PGC_USERSET`,
10368
+ ref: `${AT$8}/backend/utils/misc/guc_tables.c:2774-2783 authentication_timeout 60 s, 1 to 600, PGC_SIGHUP; :3632-3641 client_connection_check_interval 0 ms, 0 to INT_MAX, PGC_USERSET`,
10369
10369
  rung: "implemented"
10370
10370
  },
10371
10371
  {
10372
- ref: `${AT$7}/backend/storage/lmgr/proc.c:58-62, backend/tcop/postgres.c:106 and backend/postmaster/postmaster.c:228 the C defaults agree: 0 ms for each timeout, 0 ms for the client check, 60 s for authentication`,
10372
+ ref: `${AT$8}/backend/storage/lmgr/proc.c:58-62, backend/tcop/postgres.c:106 and backend/postmaster/postmaster.c:228 the C defaults agree: 0 ms for each timeout, 0 ms for the client check, 60 s for authentication`,
10373
10373
  rung: "implemented"
10374
10374
  },
10375
10375
  {
10376
- ref: `${AT$7}/include/utils/timeout.h:3-4 and :23-43 one SIGALRM for each timeout id, STARTUP_PACKET_TIMEOUT to CLIENT_CONNECTION_CHECK_TIMEOUT`,
10376
+ ref: `${AT$8}/include/utils/timeout.h:3-4 and :23-43 one SIGALRM for each timeout id, STARTUP_PACKET_TIMEOUT to CLIENT_CONNECTION_CHECK_TIMEOUT`,
10377
10377
  rung: "implemented"
10378
10378
  },
10379
10379
  {
10380
- ref: `${AT$7}/backend/utils/misc/timeout.c:559-575 enable_timeout_after: the deadline is the current time + the delay in ms, :209-350 schedule_alarm: setitimer(ITIMER_REAL) for the nearest deadline, :363-453 handle_sig_alarm sets the latch and calls each handler that is due`,
10380
+ ref: `${AT$8}/backend/utils/misc/timeout.c:559-575 enable_timeout_after: the deadline is the current time + the delay in ms, :209-350 schedule_alarm: setitimer(ITIMER_REAL) for the nearest deadline, :363-453 handle_sig_alarm sets the latch and calls each handler that is due`,
10381
10381
  rung: "implemented"
10382
10382
  },
10383
10383
  {
10384
- ref: `${AT$7}/backend/utils/init/postinit.c:770-782 the handlers of a backend, :1374-1407 the statement timer sends SIGINT, or SIGTERM in authentication, and the lock timer sends SIGINT, :1409-1447 each other handler sets a flag and the latch`,
10384
+ ref: `${AT$8}/backend/utils/init/postinit.c:770-782 the handlers of a backend, :1374-1407 the statement timer sends SIGINT, or SIGTERM in authentication, and the lock timer sends SIGINT, :1409-1447 each other handler sets a flag and the latch`,
10385
10385
  rung: "implemented"
10386
10386
  },
10387
10387
  {
10388
- ref: `${AT$7}/backend/tcop/postgres.c:2999-3023 die (SIGTERM) sets ProcDiePending, :3029-3043 StatementCancelHandler (SIGINT) sets QueryCancelPending, :4292-4294 the two handlers`,
10388
+ ref: `${AT$8}/backend/tcop/postgres.c:2999-3023 die (SIGTERM) sets ProcDiePending, :3029-3043 StatementCancelHandler (SIGINT) sets QueryCancelPending, :4292-4294 the two handlers`,
10389
10389
  rung: "implemented"
10390
10390
  },
10391
10391
  {
10392
- ref: `${AT$7}/backend/tcop/postgres.c:3271-3319 ProcessInterrupts acts on a die request first: FATAL 57014 "canceling authentication due to timeout" in authentication, else FATAL 57P01 "terminating connection due to administrator command"`,
10392
+ ref: `${AT$8}/backend/tcop/postgres.c:3271-3319 ProcessInterrupts acts on a die request first: FATAL 57014 "canceling authentication due to timeout" in authentication, else FATAL 57P01 "terminating connection due to administrator command"`,
10393
10393
  rung: "implemented"
10394
10394
  },
10395
10395
  {
10396
- ref: `${AT$7}/backend/tcop/postgres.c:3321-3350 then the client check, then a lost connection: FATAL 08006 "connection to client lost", with no message to the client`,
10396
+ ref: `${AT$8}/backend/tcop/postgres.c:3321-3350 then the client check, then a lost connection: FATAL 08006 "connection to client lost", with no message to the client`,
10397
10397
  rung: "implemented"
10398
10398
  },
10399
10399
  {
10400
- ref: `${AT$7}/backend/tcop/postgres.c:3372-3430 a cancel: ERROR 55P03 "canceling statement due to lock timeout", ERROR 57014 "canceling statement due to statement timeout"`,
10400
+ ref: `${AT$8}/backend/tcop/postgres.c:3372-3430 a cancel: ERROR 55P03 "canceling statement due to lock timeout", ERROR 57014 "canceling statement due to statement timeout"`,
10401
10401
  rung: "implemented"
10402
10402
  },
10403
10403
  {
10404
- ref: `${AT$7}/backend/tcop/postgres.c:3435-3477 FATAL 25P03 "terminating connection due to idle-in-transaction timeout", FATAL 25P04 "terminating connection due to transaction timeout", FATAL 57P05 "terminating connection due to idle-session timeout"`,
10404
+ ref: `${AT$8}/backend/tcop/postgres.c:3435-3477 FATAL 25P03 "terminating connection due to idle-in-transaction timeout", FATAL 25P04 "terminating connection due to transaction timeout", FATAL 57P05 "terminating connection due to idle-session timeout"`,
10405
10405
  rung: "implemented"
10406
10406
  },
10407
10407
  {
10408
- ref: `${AT$7}/backend/utils/errcodes.txt:106-107 08003 and 08006, :111 08P01, :254-255 25P03 and 25P04, :421 55P03, :428-429 57014 and 57P01, :433 57P05`,
10408
+ ref: `${AT$8}/backend/utils/errcodes.txt:106-107 08003 and 08006, :111 08P01, :254-255 25P03 and 25P04, :421 55P03, :428-429 57014 and 57P01, :433 57P05`,
10409
10409
  rung: "implemented"
10410
10410
  },
10411
10411
  {
10412
- ref: `${AT$7}/backend/tcop/postgres.c:4618-4706 at ReadyForQuery the backend arms idle_in_transaction_session_timeout in a transaction block, open or aborted, and idle_session_timeout outside one; :4714-4750 after a message it disarms them, then checks for interrupts`,
10412
+ ref: `${AT$8}/backend/tcop/postgres.c:4618-4706 at ReadyForQuery the backend arms idle_in_transaction_session_timeout in a transaction block, open or aborted, and idle_session_timeout outside one; :4714-4750 after a message it disarms them, then checks for interrupts`,
10413
10413
  rung: "implemented"
10414
10414
  },
10415
10415
  {
10416
- ref: `${AT$7}/backend/tcop/postgres.c:2770-2796 start_xact_command arms statement_timeout and the client check, each only when not active, :2798-2802 finish_xact_command disarms statement_timeout, :5251-5278 no statement timer when statement_timeout >= transaction_timeout > 0`,
10416
+ ref: `${AT$8}/backend/tcop/postgres.c:2770-2796 start_xact_command arms statement_timeout and the client check, each only when not active, :2798-2802 finish_xact_command disarms statement_timeout, :5251-5278 no statement timer when statement_timeout >= transaction_timeout > 0`,
10417
10417
  rung: "implemented"
10418
10418
  },
10419
10419
  {
10420
- ref: `${AT$7}/backend/utils/adt/misc.c:391-412 pg_sleep: CHECK_FOR_INTERRUPTS before each WaitLatch on the latch of the backend, thus the SIGALRM of a timeout ends its wait`,
10420
+ ref: `${AT$8}/backend/utils/adt/misc.c:391-412 pg_sleep: CHECK_FOR_INTERRUPTS before each WaitLatch on the latch of the backend, thus the SIGALRM of a timeout ends its wait`,
10421
10421
  rung: "implemented"
10422
10422
  },
10423
10423
  {
10424
- ref: `${AT$7}/backend/tcop/postgres.c:4446-4502 an ERROR: disable_all_timeouts, the error to the client, AbortCurrentTransaction; :4562-4563 then ReadyForQuery`,
10424
+ ref: `${AT$8}/backend/tcop/postgres.c:4446-4502 an ERROR: disable_all_timeouts, the error to the client, AbortCurrentTransaction; :4562-4563 then ReadyForQuery`,
10425
10425
  rung: "implemented"
10426
10426
  },
10427
10427
  {
10428
- ref: `${AT$7}/backend/access/transam/xact.c:2174-2176 StartTransaction arms transaction_timeout, :2315-2317, :2592-2594 and :2768-2770 commit, prepare and abort disarm it, :3472-3477 an error in a transaction block aborts the transaction and keeps the block`,
10428
+ ref: `${AT$8}/backend/access/transam/xact.c:2174-2176 StartTransaction arms transaction_timeout, :2315-2317, :2592-2594 and :2768-2770 commit, prepare and abort disarm it, :3472-3477 an error in a transaction block aborts the transaction and keeps the block`,
10429
10429
  rung: "implemented"
10430
10430
  },
10431
10431
  {
10432
- ref: `${AT$7}/backend/storage/lmgr/proc.c:1292-1307 ProcSleep arms lock_timeout with the deadlock timer, :1652-1666 and disarms it after the wait`,
10432
+ ref: `${AT$8}/backend/storage/lmgr/proc.c:1292-1307 ProcSleep arms lock_timeout with the deadlock timer, :1652-1666 and disarms it after the wait`,
10433
10433
  rung: "implemented"
10434
10434
  },
10435
10435
  {
10436
- ref: `${AT$7}/backend/tcop/postgres.c:3652-3661 a client_connection_check_interval above 0 needs a wait set that reports a close`,
10436
+ ref: `${AT$8}/backend/tcop/postgres.c:3652-3661 a client_connection_check_interval above 0 needs a wait set that reports a close`,
10437
10437
  rung: "implemented"
10438
10438
  },
10439
10439
  {
10440
- ref: `${AT$7}/backend/libpq/pqcomm.c:2049-2084 pq_check_connection: a wait of 0 ms for WL_SOCKET_CLOSED`,
10440
+ ref: `${AT$8}/backend/libpq/pqcomm.c:2049-2084 pq_check_connection: a wait of 0 ms for WL_SOCKET_CLOSED`,
10441
10441
  rung: "implemented"
10442
10442
  },
10443
10443
  {
10444
- ref: `${AT$7}/backend/storage/ipc/latch.c:72-85 epoll where sys/epoll.h exists, :1131-1156 WL_SOCKET_CLOSED adds EPOLLRDHUP, and EPOLLERR and EPOLLHUP are always on, :1661-1680 EPOLLERR or EPOLLHUP make the socket readable, writable and closed, :2253-2263 epoll can report a close`,
10444
+ ref: `${AT$8}/backend/storage/ipc/latch.c:72-85 epoll where sys/epoll.h exists, :1131-1156 WL_SOCKET_CLOSED adds EPOLLRDHUP, and EPOLLERR and EPOLLHUP are always on, :1661-1680 EPOLLERR or EPOLLHUP make the socket readable, writable and closed, :2253-2263 epoll can report a close`,
10445
10445
  rung: "implemented"
10446
10446
  },
10447
10447
  {
10448
- ref: `${AT$7}/backend/libpq/be-secure.c:174-261 secure_read and :300-370 secure_write: a wait for the socket or the latch with no timeout; at the latch, ProcessClientReadInterrupt or ProcessClientWriteInterrupt; :234-237 and :343-346 FATAL 57P01 at the death of the postmaster`,
10448
+ ref: `${AT$8}/backend/libpq/be-secure.c:174-261 secure_read and :300-370 secure_write: a wait for the socket or the latch with no timeout; at the latch, ProcessClientReadInterrupt or ProcessClientWriteInterrupt; :234-237 and :343-346 FATAL 57P01 at the death of the postmaster`,
10449
10449
  rung: "implemented"
10450
10450
  },
10451
10451
  {
10452
- ref: `${AT$7}/backend/tcop/postgres.c:513-548 ProcessClientReadInterrupt: each interrupt in the wait for a command, a die request in another read; :559-600 ProcessClientWriteInterrupt: a die request only, with no message to the client`,
10452
+ ref: `${AT$8}/backend/tcop/postgres.c:513-548 ProcessClientReadInterrupt: each interrupt in the wait for a command, a die request in another read; :559-600 ProcessClientWriteInterrupt: a die request only, with no message to the client`,
10453
10453
  rung: "implemented"
10454
10454
  },
10455
10455
  {
10456
- ref: `${AT$7}/backend/libpq/pqcomm.c:287-297 the socket has O_NONBLOCK, and the latch gives the waits; :896-956 pq_recvbuf: 0 bytes or an error is EOF, and an error logs COMMERROR "could not receive data from client: %m"`,
10456
+ ref: `${AT$8}/backend/libpq/pqcomm.c:287-297 the socket has O_NONBLOCK, and the latch gives the waits; :896-956 pq_recvbuf: 0 bytes or an error is EOF, and an error logs COMMERROR "could not receive data from client: %m"`,
10457
10457
  rung: "implemented"
10458
10458
  },
10459
10459
  {
10460
- ref: `${AT$7}/backend/tcop/postgres.c:364-396 SocketBackend: EOF in a transaction logs COMMERROR 08006 "unexpected EOF on client connection with an open transaction", else DEBUG1 08003; :4988-5016 EOF or Terminate: proc_exit(0)`,
10460
+ ref: `${AT$8}/backend/tcop/postgres.c:364-396 SocketBackend: EOF in a transaction logs COMMERROR 08006 "unexpected EOF on client connection with an open transaction", else DEBUG1 08003; :4988-5016 EOF or Terminate: proc_exit(0)`,
10461
10461
  rung: "implemented"
10462
10462
  },
10463
10463
  {
10464
- ref: `${AT$7}/backend/access/transam/xact.c:383-396 IsTransactionState is TRANS_INPROGRESS only; backend/utils/init/postinit.c:1360-1371 ShutdownPostgres aborts the transaction at exit`,
10464
+ ref: `${AT$8}/backend/access/transam/xact.c:383-396 IsTransactionState is TRANS_INPROGRESS only; backend/utils/init/postinit.c:1360-1371 ShutdownPostgres aborts the transaction at exit`,
10465
10465
  rung: "implemented"
10466
10466
  },
10467
10467
  {
10468
- ref: `${AT$7}/backend/libpq/pqcomm.c:1275-1336 a full buffer flushes, and the flush waits for the socket, :1358-1423 internal_flush_buffer: an error logs COMMERROR "could not send data to client: %m" once for each errno, drops the buffer and sets ClientConnectionLost`,
10468
+ ref: `${AT$8}/backend/libpq/pqcomm.c:1275-1336 a full buffer flushes, and the flush waits for the socket, :1358-1423 internal_flush_buffer: an error logs COMMERROR "could not send data to client: %m" once for each errno, drops the buffer and sets ClientConnectionLost`,
10469
10469
  rung: "implemented"
10470
10470
  },
10471
10471
  {
10472
- ref: `${AT$7}/backend/tcop/postgres.c:4310-4316 the backend ignores SIGPIPE`,
10472
+ ref: `${AT$8}/backend/tcop/postgres.c:4310-4316 the backend ignores SIGPIPE`,
10473
10473
  rung: "implemented"
10474
10474
  },
10475
10475
  {
10476
- ref: `${AT$7}/include/utils/elog.h:31-38 COMMERROR is LOG_SERVER_ONLY; backend/utils/error/elog.c:205-228 it goes to the log at log_min_messages WARNING (guc_tables.c:534), and DEBUG1 does not`,
10476
+ ref: `${AT$8}/include/utils/elog.h:31-38 COMMERROR is LOG_SERVER_ONLY; backend/utils/error/elog.c:205-228 it goes to the log at log_min_messages WARNING (guc_tables.c:534), and DEBUG1 does not`,
10477
10477
  rung: "implemented"
10478
10478
  },
10479
10479
  {
10480
- ref: `${AT$7}/backend/utils/error/elog.c:245-262 and :1726-1732 an error goes to the client while the output is DestRemote, :3643-3651 the backend flushes it, :559-590 FATAL ends the process with proc_exit(1)`,
10480
+ ref: `${AT$8}/backend/utils/error/elog.c:245-262 and :1726-1732 an error goes to the client while the output is DestRemote, :3643-3651 the backend flushes it, :559-590 FATAL ends the process with proc_exit(1)`,
10481
10481
  rung: "implemented"
10482
10482
  },
10483
10483
  {
10484
- ref: `${AT$7}/backend/libpq/pqcomm.c:347-392 socket_close keeps the socket open until the process exits`,
10484
+ ref: `${AT$8}/backend/libpq/pqcomm.c:347-392 socket_close keeps the socket open until the process exits`,
10485
10485
  rung: "implemented"
10486
10486
  },
10487
10487
  {
10488
- ref: `${AT$7}/backend/tcop/backend_startup.c:237-253 the startup timer: authentication_timeout, after the DNS lookup, :311-314 the end of the startup packet disarms it, :895-922 its handler and SIGTERM call _exit(1), with no log and no message`,
10488
+ ref: `${AT$8}/backend/tcop/backend_startup.c:237-253 the startup timer: authentication_timeout, after the DNS lookup, :311-314 the end of the startup packet disarms it, :895-922 its handler and SIGTERM call _exit(1), with no log and no message`,
10489
10489
  rung: "implemented"
10490
10490
  },
10491
10491
  {
10492
- ref: `${AT$7}/backend/tcop/backend_startup.c:460-519 ProcessStartupPacket: no byte is a silent end, a part of a packet logs COMMERROR 08P01 "incomplete startup packet"; :328-333 proc_exit(0)`,
10492
+ ref: `${AT$8}/backend/tcop/backend_startup.c:460-519 ProcessStartupPacket: no byte is a silent end, a part of a packet logs COMMERROR 08P01 "incomplete startup packet"; :328-333 proc_exit(0)`,
10493
10493
  rung: "implemented"
10494
10494
  },
10495
10495
  {
10496
- ref: `${AT$7}/backend/utils/init/postinit.c:235-251 PerformAuthentication arms the statement timer at authentication_timeout * 1000 ms, :305 ClientAuthInProgress ends after it, :1210-1215 the GUCs of the startup packet apply after it`,
10496
+ ref: `${AT$8}/backend/utils/init/postinit.c:235-251 PerformAuthentication arms the statement timer at authentication_timeout * 1000 ms, :305 ClientAuthInProgress ends after it, :1210-1215 the GUCs of the startup packet apply after it`,
10497
10497
  rung: "implemented"
10498
10498
  },
10499
10499
  {
10500
- ref: `${AT$7}/backend/libpq/auth.c:260-271 an EOF from the client in authentication: proc_exit(0), with no log; :714-744 recv_password_packet gives an EOF as NULL`,
10500
+ ref: `${AT$8}/backend/libpq/auth.c:260-271 an EOF from the client in authentication: proc_exit(0), with no log; :714-744 recv_password_packet gives an EOF as NULL`,
10501
10501
  rung: "implemented"
10502
10502
  },
10503
10503
  {
@@ -11906,11 +11906,11 @@ const SUPAVISOR_SERVER = machineSchema.parse({
11906
11906
  * of the transports gives the timers.
11907
11907
  */
11908
11908
  /** This text is the folder of the WebSocket transports at the commit of the subject. */
11909
- const AT$6 = "client 2408cea packages/client/src/adapters/websocket";
11909
+ const AT$7 = "client 2408cea packages/client/src/adapters/websocket";
11910
11910
  /** This text is the client transport at that commit. */
11911
- const CT = `${AT$6}/client/transport.ts`;
11911
+ const CT = `${AT$7}/client/transport.ts`;
11912
11912
  /** This text is the server transport at that commit. */
11913
- const ST = `${AT$6}/server/transport.ts`;
11913
+ const ST = `${AT$7}/server/transport.ts`;
11914
11914
  /** This text is the source of the version of the service that the lock of the client gives (pnpm-lock.yaml:443-454). */
11915
11915
  const SERVICE = "@mark1russell7/service 0.5.8 (systems 571e9e5) packages/service/src";
11916
11916
  /** This function gives the arithmetic of a duration in ms. */
@@ -11990,7 +11990,7 @@ const PROCEDURES_WS_CLIENT = machineSchema.parse({
11990
11990
  rung: "implemented"
11991
11991
  },
11992
11992
  {
11993
- ref: `node v24.21.0 deps/undici/src/lib/core/connect.js:120-129 setKeepAlive(true, 60000); deps/uv/src/unix/tcp.c:591-593 uv_tcp_keepalive: 1 s and 10 probes. The ws package sets no keepalive on its socket (ws 8.22.0 lib/websocket.js:260-261), and the transport gives the class only the URL (${CT}:325, ${AT$6}/client/node.ts:30-34).`,
11993
+ ref: `node v24.21.0 deps/undici/src/lib/core/connect.js:120-129 setKeepAlive(true, 60000); deps/uv/src/unix/tcp.c:591-593 uv_tcp_keepalive: 1 s and 10 probes. The ws package sets no keepalive on its socket (ws 8.22.0 lib/websocket.js:260-261), and the transport gives the class only the URL (${CT}:325, ${AT$7}/client/node.ts:30-34).`,
11994
11994
  rung: "implemented"
11995
11995
  },
11996
11996
  {
@@ -12537,7 +12537,7 @@ const PROCEDURES_WS_SERVER = machineSchema.parse({
12537
12537
  });
12538
12538
  //#endregion
12539
12539
  //#region src/proxy/caddy.ts
12540
- const AT$5 = "caddy v2.11.7";
12540
+ const AT$6 = "caddy v2.11.7";
12541
12541
  const XNET = "x/net v0.59.0";
12542
12542
  /**
12543
12543
  * This document is Caddy 2.11.7 as an HTTP/2 proxy of gRPC, for one connection of a client. Its
@@ -12563,11 +12563,11 @@ const CADDY_HTTP2 = machineSchema.parse({
12563
12563
  },
12564
12564
  sources: [
12565
12565
  {
12566
- ref: `${AT$5} modules/caddyhttp/app.go:404-418, :925-940 the defaults of a server: idle_timeout 5 min, read_header_timeout 1 min, read_idle_timeout 1 min, write_idle_timeout 1 min`,
12566
+ ref: `${AT$6} modules/caddyhttp/app.go:404-418, :925-940 the defaults of a server: idle_timeout 5 min, read_header_timeout 1 min, read_idle_timeout 1 min, write_idle_timeout 1 min`,
12567
12567
  rung: "implemented"
12568
12568
  },
12569
12569
  {
12570
- ref: `${AT$5} modules/caddyhttp/app.go:520-533 the protocol h2c: http2.ConfigureServer with a zero http2.Server of ${XNET}`,
12570
+ ref: `${AT$6} modules/caddyhttp/app.go:520-533 the protocol h2c: http2.ConfigureServer with a zero http2.Server of ${XNET}`,
12571
12571
  rung: "implemented"
12572
12572
  },
12573
12573
  {
@@ -12587,15 +12587,15 @@ const CADDY_HTTP2 = machineSchema.parse({
12587
12587
  rung: "implemented"
12588
12588
  },
12589
12589
  {
12590
- ref: `${AT$5} modules/caddyhttp/reverseproxy/reverseproxy.go:1086, :1107-1112, :1393-1397, :1667-1697 a failure of the upstream before the headers of a response: no retry at the defaults, and statusError gives 502`,
12590
+ ref: `${AT$6} modules/caddyhttp/reverseproxy/reverseproxy.go:1086, :1107-1112, :1393-1397, :1667-1697 a failure of the upstream before the headers of a response: no retry at the defaults, and statusError gives 502`,
12591
12591
  rung: "implemented"
12592
12592
  },
12593
12593
  {
12594
- ref: `${AT$5} modules/caddyhttp/reverseproxy/reverseproxy.go:1331-1352 and ${XNET} xs:2296-2310 after the headers, a failed copy panics with http.ErrAbortHandler, and the stream gets RST_STREAM INTERNAL_ERROR`,
12594
+ ref: `${AT$6} modules/caddyhttp/reverseproxy/reverseproxy.go:1331-1352 and ${XNET} xs:2296-2310 after the headers, a failed copy panics with http.ErrAbortHandler, and the stream gets RST_STREAM INTERNAL_ERROR`,
12595
12595
  rung: "implemented"
12596
12596
  },
12597
12597
  {
12598
- ref: `${AT$5} modules/caddyhttp/reverseproxy/httptransport.go:212-226 the defaults of the transport: a dial timeout of 3 s, and an idle upstream connection closes after 2 min`,
12598
+ ref: `${AT$6} modules/caddyhttp/reverseproxy/httptransport.go:212-226 the defaults of the transport: a dial timeout of 3 s, and an idle upstream connection closes after 2 min`,
12599
12599
  rung: "implemented"
12600
12600
  },
12601
12601
  {
@@ -12603,11 +12603,11 @@ const CADDY_HTTP2 = machineSchema.parse({
12603
12603
  rung: "implemented"
12604
12604
  },
12605
12605
  {
12606
- ref: `${AT$5} modules/caddyhttp/app.go:136-142, :753-799, :862-876 a stop calls Shutdown on each server: a GOAWAY at once, and the grace period is eternal at the defaults. Caddy closes no connection by itself`,
12606
+ ref: `${AT$6} modules/caddyhttp/app.go:136-142, :753-799, :862-876 a stop calls Shutdown on each server: a GOAWAY at once, and the grace period is eternal at the defaults. Caddy closes no connection by itself`,
12607
12607
  rung: "implemented"
12608
12608
  },
12609
12609
  {
12610
- ref: `${AT$5} modules/caddyhttp/app.go:570-577 and go1.26.8 src/net/tcpsock.go:291-296 each accepted socket gets the TCP keepalive of Go: 15 s, 15 s and 9 probes`,
12610
+ ref: `${AT$6} modules/caddyhttp/app.go:570-577 and go1.26.8 src/net/tcpsock.go:291-296 each accepted socket gets the TCP keepalive of Go: 15 s, 15 s and 9 probes`,
12611
12611
  rung: "implemented"
12612
12612
  }
12613
12613
  ],
@@ -12898,7 +12898,7 @@ const CADDY_HTTP2 = machineSchema.parse({
12898
12898
  });
12899
12899
  //#endregion
12900
12900
  //#region src/proxy/envoy.ts
12901
- const AT$4 = "envoy v1.39.4";
12901
+ const AT$5 = "envoy v1.39.4";
12902
12902
  /**
12903
12903
  * This document is Envoy 1.39.4 as an HTTP/2 proxy of gRPC, for one connection of a client. Its static
12904
12904
  * configuration is the one of the harness. It has one listener with the HTTP connection manager, one
@@ -12923,67 +12923,67 @@ const ENVOY_HTTP2 = machineSchema.parse({
12923
12923
  },
12924
12924
  sources: [
12925
12925
  {
12926
- ref: `${AT$4} source/common/runtime/runtime_features.cc:274-276 the codec of HTTP/2 is nghttp2: http2_use_oghttp2 is false`,
12926
+ ref: `${AT$5} source/common/runtime/runtime_features.cc:274-276 the codec of HTTP/2 is nghttp2: http2_use_oghttp2 is false`,
12927
12927
  rung: "implemented"
12928
12928
  },
12929
12929
  {
12930
- ref: `${AT$4} hutil.cc:746-777, :805-808 a local reply to a gRPC request is a response of trailers only: :status 200, grpc-status and grpc-message`,
12930
+ ref: `${AT$5} hutil.cc:746-777, :805-808 a local reply to a gRPC request is a response of trailers only: :status 200, grpc-status and grpc-message`,
12931
12931
  rung: "implemented"
12932
12932
  },
12933
12933
  {
12934
- ref: `${AT$4} source/common/grpc/status.cc:6-26 the status of an HTTP code: 429, 502, 503 and 504 give UNAVAILABLE, and an unknown code gives UNKNOWN`,
12934
+ ref: `${AT$5} source/common/grpc/status.cc:6-26 the status of an HTTP code: 429, 502, 503 and 504 give UNAVAILABLE, and an unknown code gives UNKNOWN`,
12935
12935
  rung: "implemented"
12936
12936
  },
12937
12937
  {
12938
- ref: `${AT$4} source/common/http/filter_manager.cc:1120-1127, cm.cc:301-313 and h2.cc:193-199 after the headers of the response, a local reply resets the stream with INTERNAL_ERROR`,
12938
+ ref: `${AT$5} source/common/http/filter_manager.cc:1120-1127, cm.cc:301-313 and h2.cc:193-199 after the headers of the response, a local reply resets the stream with INTERNAL_ERROR`,
12939
12939
  rung: "implemented"
12940
12940
  },
12941
12941
  {
12942
- ref: `${AT$4} api/envoy/config/route/v3/route_components.proto:1373-1384 and source/common/router/config_impl.h:976 the timeout of a route: 15 s when it is not given`,
12942
+ ref: `${AT$5} api/envoy/config/route/v3/route_components.proto:1373-1384 and source/common/router/config_impl.h:976 the timeout of a route: 15 s when it is not given`,
12943
12943
  rung: "implemented"
12944
12944
  },
12945
12945
  {
12946
- ref: `${AT$4} router.cc:180-266, :1309-1331, :1530-1572 the timer of the route starts at the end of the request, and its end gives the local reply 504 "upstream request timeout". The flag grpc_timeout_returns_deadline_exceeded is false (runtime_features.cc:242-244)`,
12946
+ ref: `${AT$5} router.cc:180-266, :1309-1331, :1530-1572 the timer of the route starts at the end of the request, and its end gives the local reply 504 "upstream request timeout". The flag grpc_timeout_returns_deadline_exceeded is false (runtime_features.cc:242-244)`,
12947
12947
  rung: "implemented"
12948
12948
  },
12949
12949
  {
12950
- ref: `${AT$4} route_components.proto:1114-1118 and cm.cc:1731-1772 Envoy reads grpc-timeout only with grpc_timeout_header_max. At the defaults it forwards the header and does not act on it`,
12950
+ ref: `${AT$5} route_components.proto:1114-1118 and cm.cc:1731-1772 Envoy reads grpc-timeout only with grpc_timeout_header_max. At the defaults it forwards the header and does not act on it`,
12951
12951
  rung: "implemented"
12952
12952
  },
12953
12953
  {
12954
- ref: `${AT$4} source/common/http/codec_client.cc:124-144 and router.cc:1574-1581, :1681-1712 a reset of the upstream connection resets each stream on it with ConnectionTermination. With no retry policy, the router sends the local reply 503 "upstream connect error or disconnect/reset before headers. reset reason: connection termination"`,
12954
+ ref: `${AT$5} source/common/http/codec_client.cc:124-144 and router.cc:1574-1581, :1681-1712 a reset of the upstream connection resets each stream on it with ConnectionTermination. With no retry policy, the router sends the local reply 503 "upstream connect error or disconnect/reset before headers. reset reason: connection termination"`,
12955
12955
  rung: "implemented"
12956
12956
  },
12957
12957
  {
12958
- ref: `${AT$4} source/common/router/retry_state_impl.cc:28-47 a route with no retry_on, and a request with no x-envoy-retry-on, get no retry state`,
12958
+ ref: `${AT$5} source/common/router/retry_state_impl.cc:28-47 a route with no retry_on, and a request with no x-envoy-retry-on, get no retry state`,
12959
12959
  rung: "implemented"
12960
12960
  },
12961
12961
  {
12962
- ref: `${AT$4} source/common/upstream/upstream_impl.cc:1206-1207 the connect timeout of a cluster: 5 s. Its end gives the local reply 503 with the reset reason connection timeout`,
12962
+ ref: `${AT$5} source/common/upstream/upstream_impl.cc:1206-1207 the connect timeout of a cluster: 5 s. Its end gives the local reply 503 with the reset reason connection timeout`,
12963
12963
  rung: "implemented"
12964
12964
  },
12965
12965
  {
12966
- ref: `${AT$4} source/extensions/filters/network/http_connection_manager/config.h:372-377 and config.cc:404-425, :488-492 the defaults of the HTTP connection manager: stream_idle_timeout 5 min, request_timeout off, drain_timeout 5 s, delayed_close_timeout 1 s, idle_timeout 1 h`,
12966
+ ref: `${AT$5} source/extensions/filters/network/http_connection_manager/config.h:372-377 and config.cc:404-425, :488-492 the defaults of the HTTP connection manager: stream_idle_timeout 5 min, request_timeout off, drain_timeout 5 s, delayed_close_timeout 1 s, idle_timeout 1 h`,
12967
12967
  rung: "implemented"
12968
12968
  },
12969
12969
  {
12970
- ref: `${AT$4} cm.cc:968-974, :1052-1069 the idle timer of a stream: each frame of the stream arms it again. Its end gives the local reply 504 "stream timeout" for a request that is complete`,
12970
+ ref: `${AT$5} cm.cc:968-974, :1052-1069 the idle timer of a stream: each frame of the stream arms it again. Its end gives the local reply 504 "stream timeout" for a request that is complete`,
12971
12971
  rung: "implemented"
12972
12972
  },
12973
12973
  {
12974
- ref: `${AT$4} cm.cc:207-212, :1699-1705, :819-824 and h2.cc:1176-1193 the idle timer of a connection runs only with no stream open. Its end sends GOAWAY NO_ERROR as a notice, then after drain_timeout the final GOAWAY and the close`,
12974
+ ref: `${AT$5} cm.cc:207-212, :1699-1705, :819-824 and h2.cc:1176-1193 the idle timer of a connection runs only with no stream open. Its end sends GOAWAY NO_ERROR as a notice, then after drain_timeout the final GOAWAY and the close`,
12975
12975
  rung: "implemented"
12976
12976
  },
12977
12977
  {
12978
- ref: `${AT$4} api/envoy/config/core/v3/protocol.proto:538-569 and h2.cc:1013-1029 no PING of HTTP/2 from Envoy when connection_keepalive is not given`,
12978
+ ref: `${AT$5} api/envoy/config/core/v3/protocol.proto:538-569 and h2.cc:1013-1029 no PING of HTTP/2 from Envoy when connection_keepalive is not given`,
12979
12979
  rung: "implemented"
12980
12980
  },
12981
12981
  {
12982
- ref: `${AT$4} source/common/listener_manager/listener_impl.cc:405-416 and upstream_impl.cc:223-228 no SO_KEEPALIVE on a socket when tcp_keepalive is not given. No TCP_USER_TIMEOUT anywhere`,
12982
+ ref: `${AT$5} source/common/listener_manager/listener_impl.cc:405-416 and upstream_impl.cc:223-228 no SO_KEEPALIVE on a socket when tcp_keepalive is not given. No TCP_USER_TIMEOUT anywhere`,
12983
12983
  rung: "implemented"
12984
12984
  },
12985
12985
  {
12986
- ref: `${AT$4} source/server/server.cc:1005-1014, :1097-1127 and source/common/listener_manager/active_tcp_listener.cc:54-63 SIGTERM shuts down the server: each worker closes each connection with NoFlush. No GOAWAY and no timer of the drain`,
12986
+ ref: `${AT$5} source/server/server.cc:1005-1014, :1097-1127 and source/common/listener_manager/active_tcp_listener.cc:54-63 SIGTERM shuts down the server: each worker closes each connection with NoFlush. No GOAWAY and no timer of the drain`,
12987
12987
  rung: "implemented"
12988
12988
  }
12989
12989
  ],
@@ -13343,6 +13343,694 @@ const ENVOY_HTTP2 = machineSchema.parse({
13343
13343
  }
13344
13344
  });
13345
13345
  //#endregion
13346
+ //#region src/proxy/istio.ts
13347
+ const IS = "istio 1.31.3";
13348
+ const AT$4 = "envoy v1.39.4";
13349
+ /** These sources hold for both sides of a sidecar of Istio 1.31.3. */
13350
+ const SHARED_SOURCES = [
13351
+ {
13352
+ ref: `${IS} istio.deps:7 and istio/proxy WORKSPACE:26 the proxy pins Envoy 68eef0a0, one commit after v1.39.4 with the same code`,
13353
+ rung: "implemented"
13354
+ },
13355
+ {
13356
+ ref: `${IS} pilot/pkg/networking/core/listener_builder.go:434-445 the HTTP connection manager of each side: stream_idle_timeout 0, no request timeout and no PING of HTTP/2`,
13357
+ rung: "implemented"
13358
+ },
13359
+ {
13360
+ ref: `${IS} route.go:1361-1384 and :1321-1330 the timeout of each route is 0 unless a VirtualService sets one, and max_grpc_timeout is 0`,
13361
+ rung: "implemented"
13362
+ },
13363
+ {
13364
+ ref: `${IS} pkg/config/mesh/mesh.go:94 and pilot/pkg/networking/core/cluster_traffic_policy.go:302-303 the connect timeout of each cluster: 10 s`,
13365
+ rung: "implemented"
13366
+ },
13367
+ {
13368
+ ref: `${IS} pilot/pkg/networking/core/cluster.go:971-984 no TCP keepalive on a socket of the data plane`,
13369
+ rung: "implemented"
13370
+ },
13371
+ {
13372
+ ref: `${IS} pkg/envoy/proxy.go:136-139 Envoy starts with --drain-time-s 45 and --drain-strategy immediate. mesh.go:44 the drainDuration: 45 s`,
13373
+ rung: "implemented"
13374
+ },
13375
+ {
13376
+ ref: `${AT$4} lm.cc:635-644, :929-984 and source/common/listener_manager/listener_impl.cc:1146-1175 a change of filter chains only is an update in place. It counts listener_in_place_updated and listener_modified (lm.cc:644, :692), and only the changed chains drain`,
13377
+ rung: "implemented"
13378
+ },
13379
+ {
13380
+ ref: `${AT$4} cm.cc:1959-1968 the drain of a filter chain sets drainClose. The HTTP connection manager reads it when it encodes the headers of a response, and then sends the GOAWAY notice`,
13381
+ rung: "implemented"
13382
+ },
13383
+ {
13384
+ ref: `${AT$4} listener_impl.cc:1197-1210 each connection left on a drained chain closes with NoFlush at the end of the drain time`,
13385
+ rung: "implemented"
13386
+ },
13387
+ {
13388
+ ref: `${IS} pkg/envoy/agent.go:158-164 and proxy.go:237-243 at the stop of the pod, pilot-agent kills Envoy (SIGKILL). The kernel closes each socket of Envoy`,
13389
+ rung: "implemented"
13390
+ }
13391
+ ];
13392
+ /** These sources hold for the outbound side only. */
13393
+ const OUTBOUND_SOURCES = [
13394
+ {
13395
+ ref: `${IS} retry.go:35-50 the default retry policy of an outbound route: 2 retries on connect-failure, refused-stream, unavailable, cancelled and retriable-status-codes with no codes, to a host that is not a previous host, with up to 5 picks. route.go:1386-1390 gives it to each outbound route`,
13396
+ rung: "implemented"
13397
+ },
13398
+ {
13399
+ ref: `${AT$4} rs.cc:431-489 a reset gives a retry for a failed connect or a connect timeout (connect-failure) and for a refused stream. The termination of an open connection gives no retry with this list`,
13400
+ rung: "implemented"
13401
+ },
13402
+ {
13403
+ ref: `${AT$4} rs.cc:351-430 a response gives a retry for grpc-status 1 (cancelled) or 14 (unavailable). A grpc-status 7 (PERMISSION_DENIED) gives none`,
13404
+ rung: "implemented"
13405
+ },
13406
+ {
13407
+ ref: `${AT$4} rs.cc:87-101 and source/common/common/backoff_strategy.cc:13-19 the backoff of a retry: a random wait below 25 ms, then below 50 ms, each wait at most 250 ms`,
13408
+ rung: "implemented"
13409
+ },
13410
+ {
13411
+ ref: `${IS} cluster_traffic_policy.go:377, :386-388 the load balancer is LEAST_REQUEST. Envoy breaks a tie at random`,
13412
+ rung: "implemented"
13413
+ }
13414
+ ];
13415
+ /** These sources hold for the inbound side only. */
13416
+ const INBOUND_SOURCES = [
13417
+ {
13418
+ ref: `${IS} route.go:1321-1341 the inbound route has no timeout and no max stream duration. Only a port that is not of gRPC gets a retry policy: 2 retries on reset-before-request`,
13419
+ rung: "implemented"
13420
+ },
13421
+ {
13422
+ ref: `${IS} pilot/pkg/networking/core/httproute.go:140 and pkg/config/protocol/instance.go:156-163 the route gets the protocol of the port, and a port named grpc is of gRPC. Thus the inbound route of the lab has no retry policy`,
13423
+ rung: "implemented"
13424
+ },
13425
+ {
13426
+ ref: `${IS} pilot/pkg/security/authz/builder/builder.go:321-330 and pilot/pkg/xds/lds.go:46-55 the RBAC filter of an AuthorizationPolicy is in the HTTP connection manager of the inbound chain. A change of a policy pushes LDS`,
13427
+ rung: "implemented"
13428
+ },
13429
+ {
13430
+ ref: `${AT$4} source/extensions/filters/http/rbac/rbac_filter.cc:234-235 a denied request gets the local reply 403 "RBAC: access denied". source/common/http/utility.cc:746-753 and source/common/grpc/status.cc:14-15 give it to a gRPC request as trailers only with grpc-status 7 (PERMISSION_DENIED)`,
13431
+ rung: "implemented"
13432
+ },
13433
+ {
13434
+ ref: `${IS} pkg/envoy/admin.go:29-38 and proxy.go:112-115 the drain of a sidecar is drain_listeners?inboundonly&graceful: only the inbound listeners drain`,
13435
+ rung: "implemented"
13436
+ }
13437
+ ];
13438
+ /** This function gives the events of ENVOY_HTTP2 without the SIGTERM of Envoy: pilot-agent gets that signal, and Envoy gets SIGKILL. */
13439
+ const envoyEvents = () => Object.fromEntries(Object.entries(ENVOY_HTTP2.events).filter(([name]) => name !== "app.stop"));
13440
+ /**
13441
+ * This function gives a document of a sidecar of Istio 1.31.3 for one side, from ENVOY_HTTP2. The
13442
+ * Envoy of the sidecar is the code of that document. Istio changes its configuration and its stop:
13443
+ * - The route and the stream have no timeout, and the connect timeout of a cluster is 10 s.
13444
+ * - The outbound side retries a failed connect, a refused stream, and UNAVAILABLE or CANCELLED: 2 times, each on another host.
13445
+ * - The inbound side retries nothing, because the port of the lab is of gRPC.
13446
+ * - An update of LDS drains the changed filter chain. Its next response sends the GOAWAY notice.
13447
+ * - pilot-agent stops Envoy with SIGKILL at the stop of the pod. Envoy sends no GOAWAY then.
13448
+ */
13449
+ const istioSidecar = (side) => {
13450
+ const outbound = side === "outbound";
13451
+ const transitions = ENVOY_HTTP2.transitions.filter((t) => t.id !== "env.stop").map((t) => {
13452
+ if (t.id === "env.upstream-reset" && outbound) return {
13453
+ ...t,
13454
+ note: `${t.note ?? ""}. A reset of an open connection is not on the list of the retries of Istio, thus the app gets UNAVAILABLE`
13455
+ };
13456
+ if (t.id === "env.connect-timeout" && outbound) return {
13457
+ ...t,
13458
+ guard: "num_retries retries of this call are spent",
13459
+ note: "503 with the reset reason connection timeout. A connect timeout is a connect-failure, thus Envoy retries it first"
13460
+ };
13461
+ if (t.id === "env.drained") return {
13462
+ ...t,
13463
+ note: "The final GOAWAY after drain_timeout, from the GOAWAY notice of an idle connection or of a drained chain"
13464
+ };
13465
+ return t;
13466
+ });
13467
+ return machineSchema.parse({
13468
+ format: "mark1russell7.machine/1",
13469
+ id: `istio-sidecar-${side}`,
13470
+ title: outbound ? "The client sidecar of Istio 1.31.3: Envoy 1.39.4 between the app and the mesh, one connection of the app, its streams, its retries, an update of LDS and the kill" : "The server sidecar of Istio 1.31.3: Envoy 1.39.4 between the mesh and the app, one connection of a client sidecar, its streams, the policy, an update of LDS and the kill",
13471
+ layer: "proxy",
13472
+ version: "1.31.3",
13473
+ conditions: {
13474
+ ...ENVOY_HTTP2.conditions,
13475
+ istio: "1.31.3",
13476
+ sidecar: "native: each kubelet is at least 1.33, thus ENABLE_NATIVE_SIDECARS (auto) is on",
13477
+ configuration: outbound ? "the outbound listener of the client pod, one route of the Service with the default retry policy, and one EDS cluster of h2 with mTLS" : "the inbound listener 15006 of the server pod, one filter chain of the port grpc with the RBAC filter, and one inbound cluster of h2c to the app"
13478
+ },
13479
+ sources: [
13480
+ ...ENVOY_HTTP2.sources,
13481
+ ...SHARED_SOURCES,
13482
+ ...outbound ? OUTBOUND_SOURCES : INBOUND_SOURCES
13483
+ ],
13484
+ states: {
13485
+ ...ENVOY_HTTP2.states,
13486
+ marked: { note: "LDS drained the filter chain of the connection. Its next response carries the GOAWAY notice" }
13487
+ },
13488
+ events: {
13489
+ ...envoyEvents(),
13490
+ "upstream.connect-failure": {
13491
+ kind: "local",
13492
+ note: outbound ? "The connect to the chosen host fails: a reset to the SYN, or no host" : "The app refuses the connect: its listener is closed"
13493
+ },
13494
+ "local.chain-drain": {
13495
+ kind: "local",
13496
+ note: "An update of LDS in place drains the filter chain of this connection: its drainClose becomes true"
13497
+ },
13498
+ "timer.chain-drain": {
13499
+ kind: "timer",
13500
+ note: "The drain time of Envoy (--drain-time-s) after the drain of the chain"
13501
+ },
13502
+ "app.kill": {
13503
+ kind: "app",
13504
+ note: "pilot-agent kills Envoy (SIGKILL)"
13505
+ },
13506
+ ...outbound ? {
13507
+ "upstream.retriable": {
13508
+ kind: "local",
13509
+ note: "The upstream answers with grpc-status 14 or 1 before any data, or resets the stream with REFUSED_STREAM"
13510
+ },
13511
+ "timer.retry": {
13512
+ kind: "timer",
13513
+ note: "The backoff of a retry ends"
13514
+ },
13515
+ "tx.request": {
13516
+ kind: "tx",
13517
+ note: "The request goes to another host of the cluster"
13518
+ }
13519
+ } : { "local.rbac-deny": {
13520
+ kind: "local",
13521
+ note: "The RBAC filter of the chain of this connection denies the request: a DENY policy matches the principal of the peer"
13522
+ } }
13523
+ },
13524
+ knobs: {
13525
+ ...ENVOY_HTTP2.knobs,
13526
+ route_timeout: {
13527
+ ...ENVOY_HTTP2.knobs["route_timeout"],
13528
+ default: 0,
13529
+ note: "route.go:1361-1367 (outbound) and :1324 (inbound): 0 unless a VirtualService sets it"
13530
+ },
13531
+ stream_idle_timeout: {
13532
+ ...ENVOY_HTTP2.knobs["stream_idle_timeout"],
13533
+ default: 0,
13534
+ note: "listener_builder.go:440: 0, the timer is off"
13535
+ },
13536
+ connect_timeout: {
13537
+ ...ENVOY_HTTP2.knobs["connect_timeout"],
13538
+ key: "MeshConfig.connectTimeout",
13539
+ default: 10,
13540
+ note: "mesh.go:94: 10 s"
13541
+ },
13542
+ drain_time: {
13543
+ key: "ProxyConfig.drainDuration (--drain-time-s)",
13544
+ scope: "process",
13545
+ unit: "s",
13546
+ default: 45,
13547
+ note: "mesh.go:44, proxy.go:138: 45 s"
13548
+ },
13549
+ ...outbound ? {
13550
+ num_retries: {
13551
+ key: "VirtualService.http.retries.attempts",
13552
+ scope: "server",
13553
+ unit: "count",
13554
+ default: 2,
13555
+ note: "retry.go:36: 2"
13556
+ },
13557
+ base_retry_backoff: {
13558
+ key: "upstream.base_retry_backoff_ms",
13559
+ scope: "process",
13560
+ unit: "ms",
13561
+ default: 25,
13562
+ note: "rs.cc:87-88: 25 ms. The cap is 10 times it (rs.cc:95)"
13563
+ }
13564
+ } : {}
13565
+ },
13566
+ timers: {
13567
+ ...ENVOY_HTTP2.timers,
13568
+ drain: {
13569
+ ...ENVOY_HTTP2.timers["drain"],
13570
+ arms: ["enter:draining"],
13571
+ note: "cm.cc:1699-1705: from the GOAWAY notice, of an idle connection or of a drained chain"
13572
+ },
13573
+ chain_drain: {
13574
+ duration: {
13575
+ knob: "drain_time",
13576
+ unit: "s"
13577
+ },
13578
+ lateness: {
13579
+ knob: "slack",
13580
+ unit: "s"
13581
+ },
13582
+ arms: ["local.chain-drain"],
13583
+ fires: "timer.chain-drain",
13584
+ note: "listener_impl.cc:1197-1210: the drain sequence of the chain, with the strategy immediate"
13585
+ },
13586
+ ...outbound ? { retry_backoff: {
13587
+ duration: {
13588
+ expr: "min(base_retry_backoff * pow(2, fired), 10 * base_retry_backoff)",
13589
+ unit: "ms"
13590
+ },
13591
+ lateness: {
13592
+ knob: "slack",
13593
+ unit: "s"
13594
+ },
13595
+ early: {
13596
+ expr: "min(base_retry_backoff * pow(2, fired), 10 * base_retry_backoff)",
13597
+ unit: "ms"
13598
+ },
13599
+ arms: [
13600
+ "upstream.connect-failure",
13601
+ "upstream.connect-timeout",
13602
+ "upstream.retriable"
13603
+ ],
13604
+ cancels: ["peer.rst", "peer.fin"],
13605
+ fires: "timer.retry",
13606
+ backoff: { resets: ["rx.headers"] },
13607
+ note: "backoff_strategy.cc:13-19: a random wait from 0 to the interval, thus as early as the whole interval"
13608
+ } } : {}
13609
+ },
13610
+ transitions: [
13611
+ ...transitions,
13612
+ ...outbound ? [
13613
+ {
13614
+ id: "isc.retry",
13615
+ from: "active",
13616
+ to: "active",
13617
+ on: [
13618
+ "upstream.connect-failure",
13619
+ "upstream.connect-timeout",
13620
+ "upstream.retriable"
13621
+ ],
13622
+ guard: "fewer than num_retries retries of this call",
13623
+ timer: "retry_backoff",
13624
+ note: "The retry waits its backoff. A response of PERMISSION_DENIED is not retriable: retriable-status-codes lists no code",
13625
+ source: "retry.go:35-50, rs.cc:351-430, :431-489"
13626
+ },
13627
+ {
13628
+ id: "isc.retry-send",
13629
+ from: "active",
13630
+ to: "active",
13631
+ on: "timer.retry",
13632
+ timer: "retry_backoff",
13633
+ emits: ["tx.request"],
13634
+ note: "The predicate previous_hosts picks another host",
13635
+ source: "retry.go:40-48"
13636
+ },
13637
+ {
13638
+ id: "isc.retries-spent",
13639
+ from: "active",
13640
+ to: "idle",
13641
+ on: ["upstream.connect-failure", "upstream.retriable"],
13642
+ guard: "num_retries retries of this call are spent",
13643
+ errno: "UNAVAILABLE",
13644
+ emits: ["tx.local-reply"],
13645
+ note: "A failed connect gives the local reply 503. A response of the upstream passes to the app",
13646
+ source: "router.cc:1681-1712"
13647
+ }
13648
+ ] : [{
13649
+ id: "isi.inbound-refused",
13650
+ from: "active",
13651
+ to: "idle",
13652
+ on: "upstream.connect-failure",
13653
+ errno: "UNAVAILABLE",
13654
+ emits: ["tx.local-reply"],
13655
+ note: "503 with the reset reason remote connection failure. The inbound route has no retry policy, thus the client sidecar gets UNAVAILABLE and retries it on another host",
13656
+ source: "route.go:1321-1341, router.cc:1681-1712"
13657
+ }, {
13658
+ id: "isi.rbac-deny",
13659
+ from: "active",
13660
+ to: "idle",
13661
+ on: "local.rbac-deny",
13662
+ errno: "PERMISSION_DENIED",
13663
+ emits: ["tx.local-reply"],
13664
+ note: "403 RBAC: access denied, as trailers only with grpc-status 7. The chain of the connection decides, thus a connection on a drained chain keeps the old policy",
13665
+ source: "rbac_filter.cc:234-235, utility.cc:746-753, status.cc:14-15"
13666
+ }],
13667
+ {
13668
+ id: "isc.chain-drain",
13669
+ from: ["idle", "active"],
13670
+ to: "marked",
13671
+ on: "local.chain-drain",
13672
+ timer: "chain_drain",
13673
+ note: "An open connection keeps the old chain and its policy. A new connection gets the new chain",
13674
+ source: "lm.cc:635-644, listener_impl.cc:1146-1175"
13675
+ },
13676
+ {
13677
+ id: "isc.chain-goaway",
13678
+ from: "marked",
13679
+ to: "draining",
13680
+ on: ["upstream.headers", "upstream.end"],
13681
+ emits: ["tx.goaway"],
13682
+ note: "The headers of the next response, a local reply too, carry the GOAWAY notice",
13683
+ source: "cm.cc:1959-1968"
13684
+ },
13685
+ {
13686
+ id: "isc.chain-closed",
13687
+ from: ["marked", "draining"],
13688
+ to: "ended",
13689
+ on: "timer.chain-drain",
13690
+ timer: "chain_drain",
13691
+ emits: ["tx.fin"],
13692
+ note: "NoFlush: a call in flight ends with the close",
13693
+ source: "listener_impl.cc:1197-1210"
13694
+ },
13695
+ {
13696
+ id: "isc.killed",
13697
+ from: [
13698
+ "idle",
13699
+ "active",
13700
+ "draining",
13701
+ "marked"
13702
+ ],
13703
+ to: "ended",
13704
+ on: "app.kill",
13705
+ emits: ["tx.fin"],
13706
+ note: "No GOAWAY: the kernel closes each socket, with a reset when data is unread. A call in flight ends before the headers of its response",
13707
+ source: "agent.go:158-164, proxy.go:237-243"
13708
+ },
13709
+ {
13710
+ id: "isc.client-end-marked",
13711
+ from: "marked",
13712
+ to: "ended",
13713
+ on: ["peer.fin", "peer.rst"],
13714
+ source: "source/common/network/connection_impl.cc:804-819"
13715
+ }
13716
+ ],
13717
+ over: {
13718
+ ...ENVOY_HTTP2.over,
13719
+ states: {
13720
+ ...ENVOY_HTTP2.over.states,
13721
+ marked: "ESTABLISHED"
13722
+ },
13723
+ note: outbound ? "The socket of the app is on loopback. The socket of the mesh leg is a Linux TCP socket with TCP_NODELAY and no keepalive" : "The socket of the mesh leg is a Linux TCP socket with TCP_NODELAY and no keepalive. The socket to the app is on loopback"
13724
+ }
13725
+ });
13726
+ };
13727
+ /** This document is the client sidecar of Istio 1.31.3 (`istioSidecar("outbound")`). */
13728
+ const ISTIO_SIDECAR_OUTBOUND = istioSidecar("outbound");
13729
+ /** This document is the server sidecar of Istio 1.31.3 (`istioSidecar("inbound")`). */
13730
+ const ISTIO_SIDECAR_INBOUND = istioSidecar("inbound");
13731
+ /**
13732
+ * This document is pilot-agent of Istio 1.31.3: the lifecycle of the Envoy of a sidecar at the stop
13733
+ * of its pod. With a native sidecar, the preStop hook drains the inbound listeners at the deletion.
13734
+ * The kubelet sends SIGTERM after each container of the app exited. Then pilot-agent stops Envoy with
13735
+ * SIGKILL at once, because the drain is done. Without a native sidecar, SIGTERM starts the drain, and
13736
+ * the SIGKILL comes terminationDrainDuration later (5 s). With EXIT_ON_ZERO_ACTIVE_CONNECTIONS, it waits the
13737
+ * minimum drain, then polls the active connections each 1 s.
13738
+ */
13739
+ const PILOT_AGENT = machineSchema.parse({
13740
+ format: "mark1russell7.machine/1",
13741
+ id: "pilot-agent",
13742
+ title: "pilot-agent of Istio 1.31.3: the drain and the kill of the Envoy of a sidecar at the stop of its pod",
13743
+ layer: "proxy",
13744
+ version: "1.31.3",
13745
+ conditions: {
13746
+ istio: "1.31.3",
13747
+ kubelet: "v1.37.0",
13748
+ sidecar: "native when each kubelet is at least 1.33 (ENABLE_NATIVE_SIDECARS auto)"
13749
+ },
13750
+ sources: [
13751
+ {
13752
+ ref: `${IS} pilot/pkg/features/pilot.go:346 and pkg/kube/inject/webhook.go:1332-1381 ENABLE_NATIVE_SIDECARS is auto: on when each kubelet is at least 1.33`,
13753
+ rung: "implemented"
13754
+ },
13755
+ {
13756
+ ref: `${IS} manifests/charts/istio-control/istio-discovery/files/injection-template.yaml:225-235 a native sidecar gets the preStop hook pilot-agent request POST drain`,
13757
+ rung: "implemented"
13758
+ },
13759
+ {
13760
+ ref: `${IS} pilot/cmd/pilot-agent/status/server.go:439, :1069-1081 and pilot/cmd/pilot-agent/options/statusserver.go:37-41 the request drain calls DrainNow`,
13761
+ rung: "implemented"
13762
+ },
13763
+ {
13764
+ ref: `${IS} pkg/envoy/agent.go:146-155, pkg/envoy/proxy.go:112-115 and pkg/envoy/admin.go:29-38 DrainNow posts drain_listeners?inboundonly&graceful&skip_exit, and turns the later drain off`,
13765
+ rung: "implemented"
13766
+ },
13767
+ {
13768
+ ref: `${IS} pilot/cmd/pilot-agent/app/cmd.go:153-154 SIGTERM cancels the context of the agent`,
13769
+ rung: "implemented"
13770
+ },
13771
+ {
13772
+ ref: `${IS} agent.go:158-164 at the stop, with the drain already done, the agent aborts at once`,
13773
+ rung: "implemented"
13774
+ },
13775
+ {
13776
+ ref: `${IS} agent.go:165-168, :217-228 without the drain done, the agent drains, and aborts terminationDrainDuration later`,
13777
+ rung: "implemented"
13778
+ },
13779
+ {
13780
+ ref: `${IS} agent.go:37, :169-216, :238-245 with EXIT_ON_ZERO_ACTIVE_CONNECTIONS, it waits the minimum drain, then polls downstream_cx_active each 1 s, and aborts at zero`,
13781
+ rung: "implemented"
13782
+ },
13783
+ {
13784
+ ref: `${IS} proxy.go:237-243 the abort kills Envoy: cmd.Process.Kill(), thus SIGKILL`,
13785
+ rung: "implemented"
13786
+ },
13787
+ {
13788
+ ref: `${IS} pkg/config/mesh/mesh.go:44-45 drainDuration 45 s and terminationDrainDuration 5 s`,
13789
+ rung: "implemented"
13790
+ },
13791
+ {
13792
+ ref: `${IS} pilot/cmd/pilot-agent/options/options.go:171-178 MINIMUM_DRAIN_DURATION 5 s, EXIT_ON_ZERO_ACTIVE_CONNECTIONS false`,
13793
+ rung: "implemented"
13794
+ },
13795
+ {
13796
+ ref: "kubernetes v1.37.0 pkg/kubelet/kuberuntime/kuberuntime_container.go:895-915 and kuberuntime_termination_order.go:28-99 the kubelet runs the preStop hook of a sidecar at the deletion, and sends SIGTERM to it after each main container exited",
13797
+ rung: "implemented"
13798
+ }
13799
+ ],
13800
+ states: {
13801
+ "[none]": {
13802
+ initial: true,
13803
+ pseudo: true,
13804
+ note: "Before the start of Envoy"
13805
+ },
13806
+ running: { note: "Envoy runs, and its listeners take connections" },
13807
+ drained: { note: "The preStop drain ran: each inbound connection sends the GOAWAY notice with its next response. The later drain is off" },
13808
+ draining: { note: "The drain at SIGTERM, for terminationDrainDuration" },
13809
+ "minimum-drain": { note: "The drain at SIGTERM, for the minimum drain, with EXIT_ON_ZERO_ACTIVE_CONNECTIONS" },
13810
+ polling: { note: "The agent polls the active connections of Envoy each 1 s" },
13811
+ ended: {
13812
+ final: true,
13813
+ note: "Envoy is gone"
13814
+ }
13815
+ },
13816
+ events: {
13817
+ "local.start": {
13818
+ kind: "local",
13819
+ note: "The agent starts Envoy"
13820
+ },
13821
+ "app.prestop": {
13822
+ kind: "app",
13823
+ note: "The kubelet runs the preStop hook of the sidecar: pilot-agent request POST drain"
13824
+ },
13825
+ "app.sigterm": {
13826
+ kind: "app",
13827
+ note: "The kubelet sends SIGTERM to pilot-agent"
13828
+ },
13829
+ "timer.termination-drain": {
13830
+ kind: "timer",
13831
+ note: "terminationDrainDuration after the drain at SIGTERM"
13832
+ },
13833
+ "timer.minimum-drain": {
13834
+ kind: "timer",
13835
+ note: "The minimum drain after the drain at SIGTERM"
13836
+ },
13837
+ "timer.active-check": {
13838
+ kind: "timer",
13839
+ note: "The poll of downstream_cx_active"
13840
+ },
13841
+ "local.envoy-exit": {
13842
+ kind: "local",
13843
+ note: "Envoy exits by itself"
13844
+ },
13845
+ "tx.drain-listeners": {
13846
+ kind: "tx",
13847
+ note: "A POST to the admin of Envoy: drain_listeners?inboundonly&graceful, with skip_exit from the preStop hook"
13848
+ },
13849
+ "tx.kill": {
13850
+ kind: "tx",
13851
+ note: "SIGKILL to Envoy"
13852
+ }
13853
+ },
13854
+ knobs: {
13855
+ termination_drain: {
13856
+ key: "ProxyConfig.terminationDrainDuration",
13857
+ scope: "pod",
13858
+ unit: "s",
13859
+ default: 5,
13860
+ note: "mesh.go:45: 5 s"
13861
+ },
13862
+ minimum_drain: {
13863
+ key: "MINIMUM_DRAIN_DURATION",
13864
+ scope: "pod",
13865
+ unit: "s",
13866
+ default: 5,
13867
+ note: "options.go:171-174: 5 s"
13868
+ },
13869
+ exit_on_zero: {
13870
+ key: "EXIT_ON_ZERO_ACTIVE_CONNECTIONS",
13871
+ scope: "pod",
13872
+ unit: null,
13873
+ default: 0,
13874
+ note: "options.go:176-178: false (0)"
13875
+ },
13876
+ active_check: {
13877
+ key: "activeConnectionCheckDelay",
13878
+ scope: "build",
13879
+ unit: "s",
13880
+ default: 1,
13881
+ note: "agent.go:37: 1 s, a constant"
13882
+ },
13883
+ slack: {
13884
+ key: "the lateness of a timer of Go in the agent",
13885
+ scope: "process",
13886
+ unit: "s",
13887
+ default: .01,
13888
+ note: "An assumption of this document, not a value of Istio"
13889
+ }
13890
+ },
13891
+ timers: {
13892
+ termination_drain: {
13893
+ duration: {
13894
+ knob: "termination_drain",
13895
+ unit: "s"
13896
+ },
13897
+ lateness: {
13898
+ knob: "slack",
13899
+ unit: "s"
13900
+ },
13901
+ arms: ["enter:draining"],
13902
+ cancels: ["local.envoy-exit"],
13903
+ fires: "timer.termination-drain",
13904
+ note: "agent.go:217-228: time.After(terminationDrainDuration)"
13905
+ },
13906
+ minimum_drain: {
13907
+ duration: {
13908
+ knob: "minimum_drain",
13909
+ unit: "s"
13910
+ },
13911
+ lateness: {
13912
+ knob: "slack",
13913
+ unit: "s"
13914
+ },
13915
+ arms: ["enter:minimum-drain"],
13916
+ fires: "timer.minimum-drain",
13917
+ note: "agent.go:172-174: time.Sleep, thus an exit of Envoy does not end it"
13918
+ },
13919
+ active_check: {
13920
+ duration: {
13921
+ knob: "active_check",
13922
+ unit: "s"
13923
+ },
13924
+ lateness: {
13925
+ knob: "slack",
13926
+ unit: "s"
13927
+ },
13928
+ arms: ["enter:polling"],
13929
+ cancels: ["local.envoy-exit"],
13930
+ fires: "timer.active-check",
13931
+ backoff: { resets: ["enter:polling"] },
13932
+ note: "agent.go:176-181: a ticker of 1 s, thus it starts again at each poll"
13933
+ }
13934
+ },
13935
+ transitions: [
13936
+ {
13937
+ id: "pa.start",
13938
+ from: "[none]",
13939
+ to: "running",
13940
+ on: "local.start",
13941
+ source: "proxy.go:229-235"
13942
+ },
13943
+ {
13944
+ id: "pa.prestop-drain",
13945
+ from: "running",
13946
+ to: "drained",
13947
+ on: "app.prestop",
13948
+ emits: ["tx.drain-listeners"],
13949
+ note: "DrainNow with skip_exit: the drain starts at the deletion, beside the SIGTERM of the app",
13950
+ source: "injection-template.yaml:225-235, server.go:1069-1081, agent.go:146-155"
13951
+ },
13952
+ {
13953
+ id: "pa.kill-drained",
13954
+ from: "drained",
13955
+ to: "ended",
13956
+ on: "app.sigterm",
13957
+ emits: ["tx.kill"],
13958
+ note: "skipDrain: no wait. The kubelet sends SIGTERM once the app exited",
13959
+ source: "agent.go:158-164, proxy.go:237-243"
13960
+ },
13961
+ {
13962
+ id: "pa.sigterm-drain",
13963
+ from: "running",
13964
+ to: "draining",
13965
+ on: "app.sigterm",
13966
+ guard: "exit_on_zero is 0",
13967
+ timer: "termination_drain",
13968
+ emits: ["tx.drain-listeners"],
13969
+ note: "A sidecar that is not native: the drain at SIGTERM",
13970
+ source: "agent.go:165-168, :217-228"
13971
+ },
13972
+ {
13973
+ id: "pa.drain-done",
13974
+ from: "draining",
13975
+ to: "ended",
13976
+ on: "timer.termination-drain",
13977
+ timer: "termination_drain",
13978
+ emits: ["tx.kill"],
13979
+ source: "agent.go:224-226, proxy.go:237-243"
13980
+ },
13981
+ {
13982
+ id: "pa.sigterm-wait",
13983
+ from: "running",
13984
+ to: "minimum-drain",
13985
+ on: "app.sigterm",
13986
+ guard: "exit_on_zero is 1",
13987
+ timer: "minimum_drain",
13988
+ emits: ["tx.drain-listeners"],
13989
+ source: "agent.go:165-174"
13990
+ },
13991
+ {
13992
+ id: "pa.poll-start",
13993
+ from: "minimum-drain",
13994
+ to: "polling",
13995
+ on: "timer.minimum-drain",
13996
+ timer: "minimum_drain",
13997
+ source: "agent.go:175-178"
13998
+ },
13999
+ {
14000
+ id: "pa.poll",
14001
+ from: "polling",
14002
+ to: "polling",
14003
+ on: "timer.active-check",
14004
+ guard: "downstream_cx_active is above 0 on a listener that is not of the agent",
14005
+ timer: "active_check",
14006
+ source: "agent.go:207-214"
14007
+ },
14008
+ {
14009
+ id: "pa.zero",
14010
+ from: "polling",
14011
+ to: "ended",
14012
+ on: "timer.active-check",
14013
+ guard: "downstream_cx_active is 0, or the stat is not there",
14014
+ timer: "active_check",
14015
+ emits: ["tx.kill"],
14016
+ source: "agent.go:201-211, proxy.go:237-243"
14017
+ },
14018
+ {
14019
+ id: "pa.envoy-exit",
14020
+ from: [
14021
+ "running",
14022
+ "drained",
14023
+ "draining",
14024
+ "minimum-drain",
14025
+ "polling"
14026
+ ],
14027
+ to: "ended",
14028
+ on: "local.envoy-exit",
14029
+ source: "agent.go:184-187, :219-222"
14030
+ }
14031
+ ]
14032
+ });
14033
+ //#endregion
13346
14034
  //#region src/proxy/nginx.ts
13347
14035
  const AT$3 = "nginx release-1.29.6";
13348
14036
  const V2 = "src/http/v2/ngx_http_v2.c";
@@ -14451,6 +15139,513 @@ const DOCKER_PROXY_LINK = machineSchema.parse({
14451
15139
  over: overOf(["linked", "half-closed"])
14452
15140
  });
14453
15141
  //#endregion
15142
+ //#region src/proxy/ztunnel.ts
15143
+ const Z = "ztunnel 1.31.3";
15144
+ const I = "istio 1.31.3";
15145
+ /**
15146
+ * This document is ztunnel 1.31.3 in the ambient mesh of Istio, in in-pod mode. It is one HBONE
15147
+ * connection from the ztunnel of a client pod to the port 15008 of a server pod. The flows of the
15148
+ * apps are its streams. The agent istio-cni redirects each connection of an app to the listener
15149
+ * 15001 of ztunnel, in the network namespace of the pod. Thus the HBONE socket has the address of the pod.
15150
+ *
15151
+ * The PING of the connection has a fixed cadence: 10 s of sleep, a PING, then at most 20 s for its
15152
+ * PONG. Both are constants, and data does not put a PING off. Thus a link that fails is found 20 s to
15153
+ * 30 s later.
15154
+ *
15155
+ * At the end of a stream or of its connection, ztunnel shuts down the socket of the app. The app then
15156
+ * gets a FIN. No timer closes an idle connection or an old one. At SIGTERM, ztunnel sends GOAWAY, and
15157
+ * it ends what is left at its deadline of 25 s.
15158
+ */
15159
+ const ZTUNNEL_HBONE = machineSchema.parse({
15160
+ format: "mark1russell7.machine/1",
15161
+ id: "ztunnel-hbone",
15162
+ title: "ztunnel 1.31.3 in in-pod mode: one HBONE connection from a client pod to a server pod, its PING, its drain and the close of each flow of the app",
15163
+ layer: "proxy",
15164
+ version: "1.31.3",
15165
+ conditions: {
15166
+ ztunnel: "1.31.3",
15167
+ istio: "1.31.3 with the profile ambient: istio-cni and ztunnel on each node",
15168
+ mode: "in-pod: istio-cni redirects the traffic of each pod to the listeners of ztunnel in the network namespace of the pod",
15169
+ connection: "one HBONE connection to the port 15008 of a server pod, with mTLS and HTTP/2, and its streams"
15170
+ },
15171
+ sources: [
15172
+ {
15173
+ ref: `${Z} src/proxy/h2/client.rs:50-58 and src/proxy/outbound.rs:446-452 the key of the pool: the source identity, the destination identities, the destination address and the source IP. In in-pod mode the destination is the server pod at port 15008`,
15174
+ rung: "implemented"
15175
+ },
15176
+ {
15177
+ ref: `${Z} src/config.rs:74, :106, :790 and src/proxy/h2/client.rs:183-190 at most 100 streams on one HBONE connection`,
15178
+ rung: "implemented"
15179
+ },
15180
+ {
15181
+ ref: `${Z} src/config.rs:75, :105, :795 and src/proxy/pool.rs:142-146 POOL_UNUSED_RELEASE_TIMEOUT is 5 min. A release does not close the connection: HTTP/2 closes it when no reference and no stream is left`,
15182
+ rung: "implemented"
15183
+ },
15184
+ {
15185
+ ref: `${Z} src/proxy.rs:645, :695 the TCP connect of ztunnel times out at 10 s, a constant`,
15186
+ rung: "implemented"
15187
+ },
15188
+ {
15189
+ ref: `${Z} src/proxy/h2.rs:31-76 the PING loop: 10 s of sleep, a PING, at most 20 s for its PONG, then again. PING_INTERVAL and PING_TIMEOUT are constants (:36-37)`,
15190
+ rung: "implemented"
15191
+ },
15192
+ {
15193
+ ref: `${Z} src/proxy/h2.rs:222-225 the PING is not data aware: data on the connection does not put a PING off`,
15194
+ rung: "implemented"
15195
+ },
15196
+ {
15197
+ ref: `${Z} src/proxy/h2/client.rs:237-238 and src/proxy/h2/server.rs:160-168 at a PING timeout the client drops the connection, and the server calls abrupt_shutdown(NO_ERROR)`,
15198
+ rung: "implemented"
15199
+ },
15200
+ {
15201
+ ref: `${Z} src/proxy/h2.rs:229-238 and src/copy.rs:176-183, :198-212 at the end of a stream or of its connection, the copy loop shuts down the socket of the app: a FIN`,
15202
+ rung: "implemented"
15203
+ },
15204
+ {
15205
+ ref: "linux v6.6 net/ipv4/tcp.c:2781-2807 the close of a socket with unread bytes in its receive queue sends a reset, and else a FIN",
15206
+ rung: "implemented"
15207
+ },
15208
+ {
15209
+ ref: `${Z} src/config.rs:44-48, :355-360, :913-931 and src/proxy.rs:109-126 the TCP keepalive: 180 s idle, 180 s between probes and 9 probes, on each socket that ztunnel connects. No TCP_USER_TIMEOUT`,
15210
+ rung: "implemented"
15211
+ },
15212
+ {
15213
+ ref: `${Z} src/proxy, src/copy.rs and src/config.rs: no idle timeout of L4 and no maximum age of a connection, from a search of the tag`,
15214
+ rung: "derived"
15215
+ },
15216
+ {
15217
+ ref: `${Z} src/proxy/outbound.rs: a connect of the pool that fails ends the flow of the app before its copy starts. The app sees its socket close before any byte of an answer`,
15218
+ rung: "derived"
15219
+ },
15220
+ {
15221
+ ref: `${I} cni/pkg/nodeagent/informers.go:316-325, :396-408 and ${Z} src/inpod/statemanager.rs:170-191 and src/drain.rs:58-70 at the deletion of a pod, the node agent sends DelWorkload, and ztunnel drains the proxy of that pod at once`,
15222
+ rung: "implemented"
15223
+ },
15224
+ {
15225
+ ref: `${Z} src/config.rs:101, :810-827 and src/app.rs:391-399 the deadline of the drain: CONNECTION_TERMINATION_DEADLINE, else the grace less 5 s. The chart sets the grace to 30 s (${I} manifests/charts/ztunnel/values.yaml:102): 25 s`,
15226
+ rung: "implemented"
15227
+ },
15228
+ {
15229
+ ref: `${Z} src/proxy/h2/server.rs:170-172 and src/proxy/outbound.rs:121 at SIGTERM the accept loops stop, and the HBONE server sends GOAWAY`,
15230
+ rung: "implemented"
15231
+ },
15232
+ {
15233
+ ref: `${Z} src/proxy/connection_manager.rs:133, :364-376 and src/proxy/inbound.rs:273-280 a CONNECT that a policy denies gets 401. At a change of a policy, ztunnel checks each open inbound connection again and closes each one that it now denies`,
15234
+ rung: "implemented"
15235
+ },
15236
+ {
15237
+ ref: `${Z} proto/workload.proto:148-198 the workload API has only routing preferences and a health policy for load balancing. No field of a DestinationRule reaches ztunnel on an L4 path`,
15238
+ rung: "derived"
15239
+ }
15240
+ ],
15241
+ states: {
15242
+ "[none]": {
15243
+ initial: true,
15244
+ pseudo: true,
15245
+ note: "Before the first flow of the app that needs the connection"
15246
+ },
15247
+ connecting: { note: "The TCP connect and the TLS handshake to the port 15008 of the server pod. The flow of the app waits" },
15248
+ ready: { note: "The connection carries the flows of the apps as streams. The PING loop runs" },
15249
+ draining: { note: "After SIGTERM: the HBONE server sent GOAWAY, and the open streams go on until the deadline" },
15250
+ ended: {
15251
+ final: true,
15252
+ note: "The connection closed. Each flow of the app on it got a FIN"
15253
+ }
15254
+ },
15255
+ events: {
15256
+ "local.accept": {
15257
+ kind: "local",
15258
+ note: "The listener 15001 accepts a connection of the app, and the pool has no connection for its key"
15259
+ },
15260
+ "local.connected": {
15261
+ kind: "local",
15262
+ note: "The TCP connect and the TLS handshake to 15008 complete"
15263
+ },
15264
+ "local.connect-failed": {
15265
+ kind: "local",
15266
+ note: "The connect to 15008 fails: a reset, a refusal or a failed handshake"
15267
+ },
15268
+ "local.stream-end": {
15269
+ kind: "local",
15270
+ note: "The last stream on the connection ends"
15271
+ },
15272
+ "local.policy-denied": {
15273
+ kind: "local",
15274
+ note: "A change of a policy denies the connection: on the side of the server"
15275
+ },
15276
+ "local.del-workload": {
15277
+ kind: "local",
15278
+ note: "DelWorkload of the node agent of istio-cni for the pod: its deletion"
15279
+ },
15280
+ "rx.pong": {
15281
+ kind: "rx",
15282
+ note: "The PONG of the last PING"
15283
+ },
15284
+ "peer.rst": {
15285
+ kind: "peer",
15286
+ note: "A reset of the HBONE socket"
15287
+ },
15288
+ "peer.fin": {
15289
+ kind: "peer",
15290
+ note: "An end of file of the HBONE socket, or the end of the HTTP/2 connection"
15291
+ },
15292
+ "app.stop": {
15293
+ kind: "app",
15294
+ note: "SIGTERM to ztunnel: a restart or a deletion of its pod"
15295
+ },
15296
+ "timer.connect": {
15297
+ kind: "timer",
15298
+ note: "The connect does not complete in 10 s"
15299
+ },
15300
+ "timer.ping": {
15301
+ kind: "timer",
15302
+ note: "10 s after the last PONG: the next PING"
15303
+ },
15304
+ "timer.pong": {
15305
+ kind: "timer",
15306
+ note: "No PONG for 20 s after a PING"
15307
+ },
15308
+ "timer.release": {
15309
+ kind: "timer",
15310
+ note: "No stream on the connection for the unused release timeout"
15311
+ },
15312
+ "timer.deadline": {
15313
+ kind: "timer",
15314
+ note: "The deadline of the drain after SIGTERM"
15315
+ },
15316
+ "tx.ping": {
15317
+ kind: "tx",
15318
+ note: "A PING of HTTP/2"
15319
+ },
15320
+ "tx.goaway": {
15321
+ kind: "tx",
15322
+ note: "A GOAWAY of the HBONE server"
15323
+ },
15324
+ "tx.close": {
15325
+ kind: "tx",
15326
+ note: "The close of the HBONE connection"
15327
+ },
15328
+ "tx.app-fin": {
15329
+ kind: "tx",
15330
+ note: "The shutdown of the socket of each flow of the app on the connection: a FIN, or a reset when bytes are unread"
15331
+ },
15332
+ "tx.app-close": {
15333
+ kind: "tx",
15334
+ note: "The close of the socket of the app whose flow waited for the connect, before any byte of an answer"
15335
+ }
15336
+ },
15337
+ knobs: {
15338
+ connect_timeout: {
15339
+ key: "the TCP connect timeout of ztunnel",
15340
+ scope: "build",
15341
+ unit: "s",
15342
+ default: 10,
15343
+ note: "proxy.rs:645: a constant"
15344
+ },
15345
+ ping_interval: {
15346
+ key: "PING_INTERVAL",
15347
+ scope: "build",
15348
+ unit: "s",
15349
+ default: 10,
15350
+ note: "h2.rs:36: a constant"
15351
+ },
15352
+ ping_timeout: {
15353
+ key: "PING_TIMEOUT",
15354
+ scope: "build",
15355
+ unit: "s",
15356
+ default: 20,
15357
+ note: "h2.rs:37: a constant"
15358
+ },
15359
+ pool_release: {
15360
+ key: "POOL_UNUSED_RELEASE_TIMEOUT",
15361
+ scope: "process",
15362
+ unit: "s",
15363
+ default: 300,
15364
+ note: "config.rs:75: 5 min, an environment variable"
15365
+ },
15366
+ deadline: {
15367
+ key: "CONNECTION_TERMINATION_DEADLINE",
15368
+ scope: "process",
15369
+ unit: "s",
15370
+ default: 25,
15371
+ note: "config.rs:810-827: unset, thus the grace of 30 s of the chart less 5 s"
15372
+ },
15373
+ keepidle: {
15374
+ key: "the TCP keepalive idle of ztunnel",
15375
+ scope: "process",
15376
+ unit: "s",
15377
+ default: 180,
15378
+ note: "config.rs:44-48"
15379
+ },
15380
+ keepintvl: {
15381
+ key: "the TCP keepalive interval of ztunnel",
15382
+ scope: "process",
15383
+ unit: "s",
15384
+ default: 180,
15385
+ note: "config.rs:44-48"
15386
+ },
15387
+ keepcnt: {
15388
+ key: "the TCP keepalive count of ztunnel",
15389
+ scope: "process",
15390
+ unit: "count",
15391
+ default: 9,
15392
+ note: "config.rs:44-48"
15393
+ },
15394
+ slack: {
15395
+ key: "the lateness of the runtime of tokio for one step",
15396
+ scope: "process",
15397
+ unit: "s",
15398
+ default: .01,
15399
+ note: "An assumption of this document, not a value of ztunnel"
15400
+ }
15401
+ },
15402
+ timers: {
15403
+ connect: {
15404
+ duration: {
15405
+ knob: "connect_timeout",
15406
+ unit: "s"
15407
+ },
15408
+ lateness: {
15409
+ knob: "slack",
15410
+ unit: "s"
15411
+ },
15412
+ arms: ["enter:connecting"],
15413
+ cancels: ["local.connected", "local.connect-failed"],
15414
+ fires: "timer.connect",
15415
+ note: "proxy.rs:645, :695"
15416
+ },
15417
+ ping: {
15418
+ duration: {
15419
+ knob: "ping_interval",
15420
+ unit: "s"
15421
+ },
15422
+ lateness: {
15423
+ knob: "slack",
15424
+ unit: "s"
15425
+ },
15426
+ arms: ["enter:ready", "rx.pong"],
15427
+ fires: "timer.ping",
15428
+ backoff: { resets: ["rx.pong"] },
15429
+ note: "h2.rs:39, :56: the sleep before each PING. It starts again after each PONG, thus it detects nothing by itself"
15430
+ },
15431
+ pong: {
15432
+ duration: {
15433
+ expr: "ping_interval + ping_timeout",
15434
+ unit: "s"
15435
+ },
15436
+ early: {
15437
+ knob: "ping_interval",
15438
+ unit: "s"
15439
+ },
15440
+ lateness: {
15441
+ expr: "2 * slack",
15442
+ unit: "s"
15443
+ },
15444
+ arms: ["enter:ready", "rx.pong"],
15445
+ cancels: ["peer.rst", "peer.fin"],
15446
+ fires: "timer.pong",
15447
+ note: "h2.rs:46: the wait of 20 s for the PONG of the PING that comes 10 s after the last PONG. A failure at a time in the cycle is found 20 s to 30 s later, and data does not change it"
15448
+ },
15449
+ release: {
15450
+ duration: {
15451
+ knob: "pool_release",
15452
+ unit: "s"
15453
+ },
15454
+ lateness: {
15455
+ knob: "slack",
15456
+ unit: "s"
15457
+ },
15458
+ arms: ["local.stream-end"],
15459
+ cancels: ["local.accept"],
15460
+ fires: "timer.release",
15461
+ note: "pool.rs:142-146: from the end of the last stream"
15462
+ },
15463
+ deadline: {
15464
+ duration: {
15465
+ knob: "deadline",
15466
+ unit: "s"
15467
+ },
15468
+ lateness: {
15469
+ knob: "slack",
15470
+ unit: "s"
15471
+ },
15472
+ arms: ["app.stop"],
15473
+ fires: "timer.deadline",
15474
+ note: "app.rs:391-399: from SIGTERM"
15475
+ }
15476
+ },
15477
+ realizes: {
15478
+ "systems.mechanism.heartbeat-interval": { timer: "ping" },
15479
+ "systems.mechanism.heartbeat-detection-time": {
15480
+ duration: {
15481
+ expr: "ping_interval + ping_timeout",
15482
+ unit: "s"
15483
+ },
15484
+ lateness: {
15485
+ expr: "2 * slack",
15486
+ unit: "s"
15487
+ },
15488
+ note: "The PING 10 s after the last PONG, and the drop 20 s after the PING"
15489
+ }
15490
+ },
15491
+ transitions: [
15492
+ {
15493
+ id: "zt.connect",
15494
+ from: "[none]",
15495
+ to: "connecting",
15496
+ on: "local.accept",
15497
+ timer: "connect",
15498
+ source: "outbound.rs:446-452, client.rs:50-58"
15499
+ },
15500
+ {
15501
+ id: "zt.connected",
15502
+ from: "connecting",
15503
+ to: "ready",
15504
+ on: "local.connected",
15505
+ timer: "pong",
15506
+ source: "client.rs:183-190"
15507
+ },
15508
+ {
15509
+ id: "zt.connect-failed",
15510
+ from: "connecting",
15511
+ to: "ended",
15512
+ on: "local.connect-failed",
15513
+ emits: ["tx.app-close"],
15514
+ note: "A reset of the SYN to 15008 fails the connect at once. The app sees its socket close before any byte of an answer: a client of gRPC counts a failed connect",
15515
+ source: "outbound.rs"
15516
+ },
15517
+ {
15518
+ id: "zt.connect-timeout",
15519
+ from: "connecting",
15520
+ to: "ended",
15521
+ on: "timer.connect",
15522
+ timer: "connect",
15523
+ emits: ["tx.app-close"],
15524
+ source: "proxy.rs:645, :695"
15525
+ },
15526
+ {
15527
+ id: "zt.ping",
15528
+ from: "ready",
15529
+ to: "ready",
15530
+ on: "timer.ping",
15531
+ timer: "ping",
15532
+ emits: ["tx.ping"],
15533
+ source: "h2.rs:39-46"
15534
+ },
15535
+ {
15536
+ id: "zt.pong",
15537
+ from: "ready",
15538
+ to: "ready",
15539
+ on: "rx.pong",
15540
+ note: "The PONG starts the sleep and the wait again",
15541
+ source: "h2.rs:46-56"
15542
+ },
15543
+ {
15544
+ id: "zt.pong-timeout",
15545
+ from: "ready",
15546
+ to: "ended",
15547
+ on: "timer.pong",
15548
+ timer: "pong",
15549
+ emits: ["tx.close", "tx.app-fin"],
15550
+ note: "The client drops the connection, and the server calls abrupt_shutdown(NO_ERROR). Each flow of the app on it gets a FIN",
15551
+ source: "client.rs:237-238, server.rs:160-168, copy.rs:176-183"
15552
+ },
15553
+ {
15554
+ id: "zt.reset",
15555
+ from: ["ready", "draining"],
15556
+ to: "ended",
15557
+ on: ["peer.rst", "peer.fin"],
15558
+ emits: ["tx.app-fin"],
15559
+ note: "A reset or an end of file of the HBONE socket ends each stream. The copy loop shuts down the socket of each app: a FIN, not a reset",
15560
+ source: "h2.rs:229-238, copy.rs:198-212"
15561
+ },
15562
+ {
15563
+ id: "zt.policy-denied",
15564
+ from: "ready",
15565
+ to: "ended",
15566
+ on: "local.policy-denied",
15567
+ emits: ["tx.close", "tx.app-fin"],
15568
+ note: "The server side checks each open inbound connection again at a change of a policy, and closes the ones that it now denies",
15569
+ source: "connection_manager.rs:364-376"
15570
+ },
15571
+ {
15572
+ id: "zt.release",
15573
+ from: "ready",
15574
+ to: "ended",
15575
+ on: "timer.release",
15576
+ timer: "release",
15577
+ guard: "no stream is open and no other flow holds the connection",
15578
+ emits: ["tx.close"],
15579
+ source: "pool.rs:142-146"
15580
+ },
15581
+ {
15582
+ id: "zt.stop",
15583
+ from: "ready",
15584
+ to: "draining",
15585
+ on: "app.stop",
15586
+ timer: "deadline",
15587
+ emits: ["tx.goaway"],
15588
+ note: "The accept loops stop, and the HBONE server sends GOAWAY",
15589
+ source: "server.rs:170-172, outbound.rs:121"
15590
+ },
15591
+ {
15592
+ id: "zt.drained",
15593
+ from: "draining",
15594
+ to: "ended",
15595
+ on: "local.stream-end",
15596
+ emits: ["tx.close"],
15597
+ source: "drain.rs:52-70"
15598
+ },
15599
+ {
15600
+ id: "zt.deadline",
15601
+ from: "draining",
15602
+ to: "ended",
15603
+ on: "timer.deadline",
15604
+ timer: "deadline",
15605
+ emits: ["tx.close", "tx.app-fin"],
15606
+ note: "ztunnel ends what is left itself, before the SIGKILL of the kubelet",
15607
+ source: "app.rs:391-399, pool.rs:345-347"
15608
+ },
15609
+ {
15610
+ id: "zt.del-workload",
15611
+ from: [
15612
+ "connecting",
15613
+ "ready",
15614
+ "draining"
15615
+ ],
15616
+ to: "ended",
15617
+ on: "local.del-workload",
15618
+ emits: ["tx.close", "tx.app-fin"],
15619
+ note: "The proxy of a deleted pod drains at once, with no deadline",
15620
+ source: "statemanager.rs:170-191, drain.rs:58-70"
15621
+ }
15622
+ ],
15623
+ over: {
15624
+ machine: "systems.machine.linux-tcp",
15625
+ states: {
15626
+ connecting: "SYN_SENT",
15627
+ ready: "ESTABLISHED",
15628
+ draining: "ESTABLISHED"
15629
+ },
15630
+ sets: {
15631
+ keepidle: {
15632
+ knob: "keepidle",
15633
+ unit: "s"
15634
+ },
15635
+ keepintvl: {
15636
+ knob: "keepintvl",
15637
+ unit: "s"
15638
+ },
15639
+ keepcnt: {
15640
+ knob: "keepcnt",
15641
+ unit: "count"
15642
+ }
15643
+ },
15644
+ ends: "peer.rst",
15645
+ note: "The HBONE socket in the network namespace of the client pod: a Linux TCP socket with the keepalive of ztunnel and no TCP_USER_TIMEOUT. A peer that is gone ends it at 180 + 9 × 180 = 1800 s, after the PING"
15646
+ }
15647
+ });
15648
+ //#endregion
14454
15649
  //#region src/rabbit/amqplib.ts
14455
15650
  const AT$1 = "amqplib 2.2.0 lib";
14456
15651
  /**
@@ -16526,9 +17721,13 @@ const MACHINES = byId([
16526
17721
  ENVOY_HTTP2,
16527
17722
  CADDY_HTTP2,
16528
17723
  NGINX_GRPC,
16529
- TRAEFIK_HTTP2
17724
+ TRAEFIK_HTTP2,
17725
+ ISTIO_SIDECAR_OUTBOUND,
17726
+ ISTIO_SIDECAR_INBOUND,
17727
+ PILOT_AGENT,
17728
+ ZTUNNEL_HBONE
16530
17729
  ]);
16531
17730
  //#endregion
16532
- export { AMQPLIB, ATEN_DETECTOR, CADDY_HTTP2, DOCKER_PROXY_LINK, ENVOY_HTTP2, ETCD_SERVER, GO_TRANSPORT, GRPC_GO_SERVER, GRPC_JS, HIKARICP_PGJDBC, IOREDIS_SENTINEL, IOREDIS_STATUS, LINUX_TCP, MACHINES, MANIFESTATIONS, MONGODB_NODE, MONGOD_REPL, MONGOD_SESSION, NF_CONNTRACK_TCP, NGINX_GRPC, NODE_HTTP_AGENT, NODE_HTTP_SERVER, NODE_POSTGRES, NODE_TIMER_EARLY, PGBOUNCER_CLIENT, PGBOUNCER_SERVER, PGPOOL_SESSION, POSTGRES_SESSION, PROCEDURES_WS_CLIENT, PROCEDURES_WS_SERVER, RABBITMQ_CONNECTION, RA_MEMBER, REDIS_CLIENT, SENTINEL, SUPAVISOR_CLIENT, SUPAVISOR_SERVER, TOXIPROXY_LINK, TRAEFIK_HTTP2, UNDICI_CLIENT, UNDICI_RETRY, UNDICI_TICK_MS, goLateSeconds, goTimerLateness, nodeEarlySeconds, nodeLateSeconds, nodeTimerLateness, undiciFastEarly, undiciFastLateness };
17731
+ export { AMQPLIB, ATEN_DETECTOR, CADDY_HTTP2, DOCKER_PROXY_LINK, ENVOY_HTTP2, ETCD_SERVER, GO_TRANSPORT, GRPC_GO_SERVER, GRPC_JS, HIKARICP_PGJDBC, IOREDIS_SENTINEL, IOREDIS_STATUS, ISTIO_SIDECAR_INBOUND, ISTIO_SIDECAR_OUTBOUND, LINUX_TCP, MACHINES, MANIFESTATIONS, MONGODB_NODE, MONGOD_REPL, MONGOD_SESSION, NF_CONNTRACK_TCP, NGINX_GRPC, NODE_HTTP_AGENT, NODE_HTTP_SERVER, NODE_POSTGRES, NODE_TIMER_EARLY, PGBOUNCER_CLIENT, PGBOUNCER_SERVER, PGPOOL_SESSION, PILOT_AGENT, POSTGRES_SESSION, PROCEDURES_WS_CLIENT, PROCEDURES_WS_SERVER, RABBITMQ_CONNECTION, RA_MEMBER, REDIS_CLIENT, SENTINEL, SUPAVISOR_CLIENT, SUPAVISOR_SERVER, TOXIPROXY_LINK, TRAEFIK_HTTP2, UNDICI_CLIENT, UNDICI_RETRY, UNDICI_TICK_MS, ZTUNNEL_HBONE, goLateSeconds, goTimerLateness, istioSidecar, nodeEarlySeconds, nodeLateSeconds, nodeTimerLateness, undiciFastEarly, undiciFastLateness };
16533
17732
 
16534
17733
  //# sourceMappingURL=index.js.map