@mark1russell7/machines 0.3.23 → 0.3.25

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
  ],
@@ -3478,6 +3478,10 @@ var linux_tcp_default = {
3478
3478
  {
3479
3479
  "ref": "net/ipv4/tcp_input.c:791-834 tcp_event_data_recv(): the first data starts quick-ACK mode; :326-333 tcp_in_quickack_mode(); :5552-5576 __tcp_ack_snd_check(): an ACK at once or delayed; net/ipv4/tcp_output.c:161-176 tcp_event_data_sent(): ping-pong mode",
3480
3480
  "rung": "implemented"
3481
+ },
3482
+ {
3483
+ "ref": "net/ipv4/tcp_timer.c:604 and :624-631 tcp_retransmit_timer(): each firing sends the SYN again, and in SYN_SENT the RTO doubles only after tcp_syn_linear_timeouts firings; the same at 6.17 (:448 total_rto, :671-678)",
3484
+ "rung": "implemented"
3481
3485
  }
3482
3486
  ],
3483
3487
  states: {
@@ -3541,6 +3545,10 @@ var linux_tcp_default = {
3541
3545
  "note": "the first retransmission the RTO timer makes, which sets retrans_stamp; the tail loss probe one RTO earlier does not"
3542
3546
  },
3543
3547
  "timer.syn.exhausted": { "kind": "timer" },
3548
+ "timer.syn": {
3549
+ "kind": "timer",
3550
+ "note": "the SYN timer fires and the SYN goes out again"
3551
+ },
3544
3552
  "timer.synack.exhausted": { "kind": "timer" },
3545
3553
  "timer.rto": {
3546
3554
  "kind": "timer",
@@ -3661,6 +3669,32 @@ var linux_tcp_default = {
3661
3669
  "fires": "timer.syn.exhausted",
3662
3670
  "note": "6.6: linear 1 s waits for the first tcp_syn_linear_timeouts retransmissions, then doubling; 131 s at the defaults. Each wait is a timer of the wheel, rounded up at its level: up to 6.08 s late in all at HZ 1000, because the wait of 64 s can be 4.096 s late"
3663
3671
  },
3672
+ "syn_retransmit": {
3673
+ "duration": {
3674
+ "model": "linux.syn-wait",
3675
+ "knobs": ["fired", "tcp_syn_linear_timeouts"],
3676
+ "unit": "s"
3677
+ },
3678
+ "lateness": {
3679
+ "model": "linux.syn-wait-lateness",
3680
+ "knobs": [
3681
+ "fired",
3682
+ "tcp_syn_linear_timeouts",
3683
+ "hz"
3684
+ ],
3685
+ "unit": "s"
3686
+ },
3687
+ "early": {
3688
+ "model": "linux.jiffy",
3689
+ "knobs": ["hz"],
3690
+ "unit": "s"
3691
+ },
3692
+ "arms": ["enter:SYN_SENT"],
3693
+ "cancels": ["rx.synack", "rx.rst"],
3694
+ "fires": "timer.syn",
3695
+ "backoff": { "resets": ["enter:SYN_SENT"] },
3696
+ "note": "each firing sends the SYN again: the waits 0 to tcp_syn_linear_timeouts keep the initial RTO of 1 s (TCP_TIMEOUT_INIT), then each firing doubles the wait, up to TCP_RTO_MAX. Each wait is a timer of the wheel: a wait of 1 s is up to 64 ms late at HZ 1000. syn_giveup is what gives up on it. Through a stall of the path, the first SYN after its end gets through (recovery)"
3697
+ },
3664
3698
  "retransmit": {
3665
3699
  "duration": {
3666
3700
  "model": "linux.rto-wait",
@@ -5019,7 +5053,7 @@ const IOREDIS_STATUS = machineSchema.parse(ioredis_status_default);
5019
5053
  const MANIFESTATIONS = z.record(z.string(), z.array(z.string())).parse(manifestations_default);
5020
5054
  //#endregion
5021
5055
  //#region src/mongo/mongod-replication.ts
5022
- const AT$11 = "mongodb r9.0.4 src/mongo/db/repl";
5056
+ const AT$12 = "mongodb r9.0.4 src/mongo/db/repl";
5023
5057
  /**
5024
5058
  * This document is the replication of mongod 9.0.4. It gives one member of a replica set, its view
5025
5059
  * of the primary, and the election that it can hold. The states are the states of the member. The
@@ -5050,95 +5084,95 @@ const MONGOD_REPL = machineSchema.parse({
5050
5084
  },
5051
5085
  sources: [
5052
5086
  {
5053
- 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`,
5054
5088
  rung: "implemented"
5055
5089
  },
5056
5090
  {
5057
- 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`,
5058
5092
  rung: "implemented"
5059
5093
  },
5060
5094
  {
5061
- 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`,
5062
5096
  rung: "implemented"
5063
5097
  },
5064
5098
  {
5065
- ref: `${AT$11}/topology_coordinator.h:62 kMaxHeartbeatRetries 2`,
5099
+ ref: `${AT$12}/topology_coordinator.h:62 kMaxHeartbeatRetries 2`,
5066
5100
  rung: "implemented"
5067
5101
  },
5068
5102
  {
5069
- 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`,
5070
5104
  rung: "implemented"
5071
5105
  },
5072
5106
  {
5073
- 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`,
5074
5108
  rung: "implemented"
5075
5109
  },
5076
5110
  {
5077
- 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`,
5078
5112
  rung: "implemented"
5079
5113
  },
5080
5114
  {
5081
- 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`,
5082
5116
  rung: "implemented"
5083
5117
  },
5084
5118
  {
5085
- 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`,
5086
5120
  rung: "implemented"
5087
5121
  },
5088
5122
  {
5089
- 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`,
5090
5124
  rung: "implemented"
5091
5125
  },
5092
5126
  {
5093
- 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`,
5094
5128
  rung: "implemented"
5095
5129
  },
5096
5130
  {
5097
- 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`,
5098
5132
  rung: "implemented"
5099
5133
  },
5100
5134
  {
5101
- 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`,
5102
5136
  rung: "implemented"
5103
5137
  },
5104
5138
  {
5105
- 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`,
5106
5140
  rung: "implemented"
5107
5141
  },
5108
5142
  {
5109
- 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`,
5110
5144
  rung: "implemented"
5111
5145
  },
5112
5146
  {
5113
- 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`,
5114
5148
  rung: "implemented"
5115
5149
  },
5116
5150
  {
5117
- 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`,
5118
5152
  rung: "implemented"
5119
5153
  },
5120
5154
  {
5121
- 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`,
5122
5156
  rung: "implemented"
5123
5157
  },
5124
5158
  {
5125
- 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`,
5126
5160
  rung: "implemented"
5127
5161
  },
5128
5162
  {
5129
- 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`,
5130
5164
  rung: "implemented"
5131
5165
  },
5132
5166
  {
5133
- 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`,
5134
5168
  rung: "implemented"
5135
5169
  },
5136
5170
  {
5137
- 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`,
5138
5172
  rung: "implemented"
5139
5173
  },
5140
5174
  {
5141
- 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`,
5142
5176
  rung: "implemented"
5143
5177
  },
5144
5178
  {
@@ -5146,19 +5180,19 @@ const MONGOD_REPL = machineSchema.parse({
5146
5180
  rung: "implemented"
5147
5181
  },
5148
5182
  {
5149
- 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`,
5150
5184
  rung: "implemented"
5151
5185
  },
5152
5186
  {
5153
- 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`,
5154
5188
  rung: "implemented"
5155
5189
  },
5156
5190
  {
5157
- 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`,
5158
5192
  rung: "implemented"
5159
5193
  },
5160
5194
  {
5161
- 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`,
5162
5196
  rung: "implemented"
5163
5197
  },
5164
5198
  {
@@ -5777,7 +5811,7 @@ const MONGOD_REPL = machineSchema.parse({
5777
5811
  });
5778
5812
  //#endregion
5779
5813
  //#region src/mongo/mongod-session.ts
5780
- const AT$10 = "mongodb r9.0.4 src/mongo";
5814
+ const AT$11 = "mongodb r9.0.4 src/mongo";
5781
5815
  /**
5782
5816
  * This document is the hold of mongod 9.0.4 on one client connection, over its socket. `mongod`
5783
5817
  * turns keepalive on for each TCP session. It lowers two keepalive options of the socket to a
@@ -5804,27 +5838,27 @@ const MONGOD_SESSION = machineSchema.parse({
5804
5838
  },
5805
5839
  sources: [
5806
5840
  {
5807
- 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`,
5808
5842
  rung: "implemented"
5809
5843
  },
5810
5844
  {
5811
- 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`,
5812
5846
  rung: "implemented"
5813
5847
  },
5814
5848
  {
5815
- 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`,
5816
5850
  rung: "implemented"
5817
5851
  },
5818
5852
  {
5819
- 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`,
5820
5854
  rung: "implemented"
5821
5855
  },
5822
5856
  {
5823
- 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`,
5824
5858
  rung: "implemented"
5825
5859
  },
5826
5860
  {
5827
- 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`,
5828
5862
  rung: "implemented"
5829
5863
  }
5830
5864
  ],
@@ -5986,7 +6020,7 @@ const MONGOD_SESSION = machineSchema.parse({
5986
6020
  });
5987
6021
  //#endregion
5988
6022
  //#region src/mongo/mongodb-node.ts
5989
- const AT$9 = "mongodb 7.7.0 src";
6023
+ const AT$10 = "mongodb 7.7.0 src";
5990
6024
  /**
5991
6025
  * This document is the MongoDB Node driver 7.7.0, for one server of a replica set. It gives one
5992
6026
  * connection of the driver by its role, and the timers that act on it. The roles are the monitor
@@ -6013,75 +6047,75 @@ const MONGODB_NODE = machineSchema.parse({
6013
6047
  },
6014
6048
  sources: [
6015
6049
  {
6016
- 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`,
6017
6051
  rung: "implemented"
6018
6052
  },
6019
6053
  {
6020
- 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`,
6021
6055
  rung: "implemented"
6022
6056
  },
6023
6057
  {
6024
- 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`,
6025
6059
  rung: "implemented"
6026
6060
  },
6027
6061
  {
6028
- 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`,
6029
6063
  rung: "implemented"
6030
6064
  },
6031
6065
  {
6032
- 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`,
6033
6067
  rung: "implemented"
6034
6068
  },
6035
6069
  {
6036
- 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`,
6037
6071
  rung: "implemented"
6038
6072
  },
6039
6073
  {
6040
- 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`,
6041
6075
  rung: "implemented"
6042
6076
  },
6043
6077
  {
6044
- 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`,
6045
6079
  rung: "implemented"
6046
6080
  },
6047
6081
  {
6048
- 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`,
6049
6083
  rung: "implemented"
6050
6084
  },
6051
6085
  {
6052
- 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`,
6053
6087
  rung: "implemented"
6054
6088
  },
6055
6089
  {
6056
- 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`,
6057
6091
  rung: "implemented"
6058
6092
  },
6059
6093
  {
6060
- 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`,
6061
6095
  rung: "implemented"
6062
6096
  },
6063
6097
  {
6064
- 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`,
6065
6099
  rung: "implemented"
6066
6100
  },
6067
6101
  {
6068
- 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`,
6069
6103
  rung: "implemented"
6070
6104
  },
6071
6105
  {
6072
- 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`,
6073
6107
  rung: "implemented"
6074
6108
  },
6075
6109
  {
6076
- 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`,
6077
6111
  rung: "implemented"
6078
6112
  },
6079
6113
  {
6080
- 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`,
6081
6115
  rung: "implemented"
6082
6116
  },
6083
6117
  {
6084
- 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`,
6085
6119
  rung: "implemented"
6086
6120
  },
6087
6121
  {
@@ -7761,7 +7795,7 @@ const HIKARICP_PGJDBC = machineSchema.parse({
7761
7795
  });
7762
7796
  //#endregion
7763
7797
  //#region src/pg/node-postgres.ts
7764
- const AT$8 = "pg 8.23.1 lib";
7798
+ const AT$9 = "pg 8.23.1 lib";
7765
7799
  const POOL = "pg-pool 3.14.0";
7766
7800
  /**
7767
7801
  * This document is node-postgres 8.23.1 (the npm package pg) with pg-pool 3.14.0, for one client
@@ -7803,75 +7837,75 @@ const NODE_POSTGRES = machineSchema.parse({
7803
7837
  rung: "implemented"
7804
7838
  },
7805
7839
  {
7806
- 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`,
7807
7841
  rung: "implemented"
7808
7842
  },
7809
7843
  {
7810
- 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`,
7811
7845
  rung: "implemented"
7812
7846
  },
7813
7847
  {
7814
- 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`,
7815
7849
  rung: "documented"
7816
7850
  },
7817
7851
  {
7818
- 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`,
7819
7853
  rung: "implemented"
7820
7854
  },
7821
7855
  {
7822
- 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`,
7823
7857
  rung: "implemented"
7824
7858
  },
7825
7859
  {
7826
- 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`,
7827
7861
  rung: "implemented"
7828
7862
  },
7829
7863
  {
7830
- 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`,
7831
7865
  rung: "implemented"
7832
7866
  },
7833
7867
  {
7834
- 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`,
7835
7869
  rung: "implemented"
7836
7870
  },
7837
7871
  {
7838
- 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`,
7839
7873
  rung: "implemented"
7840
7874
  },
7841
7875
  {
7842
- 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`,
7843
7877
  rung: "implemented"
7844
7878
  },
7845
7879
  {
7846
- 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`,
7847
7881
  rung: "implemented"
7848
7882
  },
7849
7883
  {
7850
- 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`,
7851
7885
  rung: "implemented"
7852
7886
  },
7853
7887
  {
7854
- 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`,
7855
7889
  rung: "implemented"
7856
7890
  },
7857
7891
  {
7858
- 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`,
7859
7893
  rung: "implemented"
7860
7894
  },
7861
7895
  {
7862
- 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`,
7863
7897
  rung: "implemented"
7864
7898
  },
7865
7899
  {
7866
- 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`,
7867
7901
  rung: "implemented"
7868
7902
  },
7869
7903
  {
7870
- 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`,
7871
7905
  rung: "implemented"
7872
7906
  },
7873
7907
  {
7874
- 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`,
7875
7909
  rung: "implemented"
7876
7910
  },
7877
7911
  {
@@ -10267,7 +10301,7 @@ const PGPOOL_SESSION = machineSchema.parse({
10267
10301
  });
10268
10302
  //#endregion
10269
10303
  //#region src/pg/postgres-session.ts
10270
- const AT$7 = "postgresql REL_17_11 src";
10304
+ const AT$8 = "postgresql REL_17_11 src";
10271
10305
  const DOC = "postgresql REL_17_11 doc/src/sgml";
10272
10306
  /**
10273
10307
  * This document is the hold of a PostgreSQL 17.11 backend on one client connection, over its TCP
@@ -10307,163 +10341,163 @@ const POSTGRES_SESSION = machineSchema.parse({
10307
10341
  rung: "implemented"
10308
10342
  },
10309
10343
  {
10310
- 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`,
10311
10345
  rung: "implemented"
10312
10346
  },
10313
10347
  {
10314
- 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`,
10315
10349
  rung: "implemented"
10316
10350
  },
10317
10351
  {
10318
- 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`,
10319
10353
  rung: "implemented"
10320
10354
  },
10321
10355
  {
10322
- 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`,
10323
10357
  rung: "implemented"
10324
10358
  },
10325
10359
  {
10326
- 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`,
10327
10361
  rung: "implemented"
10328
10362
  },
10329
10363
  {
10330
- 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`,
10331
10365
  rung: "implemented"
10332
10366
  },
10333
10367
  {
10334
- 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`,
10335
10369
  rung: "implemented"
10336
10370
  },
10337
10371
  {
10338
- 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`,
10339
10373
  rung: "implemented"
10340
10374
  },
10341
10375
  {
10342
- 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`,
10343
10377
  rung: "implemented"
10344
10378
  },
10345
10379
  {
10346
- 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`,
10347
10381
  rung: "implemented"
10348
10382
  },
10349
10383
  {
10350
- 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`,
10351
10385
  rung: "implemented"
10352
10386
  },
10353
10387
  {
10354
- 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`,
10355
10389
  rung: "implemented"
10356
10390
  },
10357
10391
  {
10358
- 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"`,
10359
10393
  rung: "implemented"
10360
10394
  },
10361
10395
  {
10362
- 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`,
10363
10397
  rung: "implemented"
10364
10398
  },
10365
10399
  {
10366
- 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"`,
10367
10401
  rung: "implemented"
10368
10402
  },
10369
10403
  {
10370
- 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"`,
10371
10405
  rung: "implemented"
10372
10406
  },
10373
10407
  {
10374
- 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`,
10375
10409
  rung: "implemented"
10376
10410
  },
10377
10411
  {
10378
- 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`,
10379
10413
  rung: "implemented"
10380
10414
  },
10381
10415
  {
10382
- 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`,
10383
10417
  rung: "implemented"
10384
10418
  },
10385
10419
  {
10386
- 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`,
10387
10421
  rung: "implemented"
10388
10422
  },
10389
10423
  {
10390
- 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`,
10391
10425
  rung: "implemented"
10392
10426
  },
10393
10427
  {
10394
- 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`,
10395
10429
  rung: "implemented"
10396
10430
  },
10397
10431
  {
10398
- 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`,
10399
10433
  rung: "implemented"
10400
10434
  },
10401
10435
  {
10402
- 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`,
10403
10437
  rung: "implemented"
10404
10438
  },
10405
10439
  {
10406
- 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`,
10407
10441
  rung: "implemented"
10408
10442
  },
10409
10443
  {
10410
- 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`,
10411
10445
  rung: "implemented"
10412
10446
  },
10413
10447
  {
10414
- 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`,
10415
10449
  rung: "implemented"
10416
10450
  },
10417
10451
  {
10418
- 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`,
10419
10453
  rung: "implemented"
10420
10454
  },
10421
10455
  {
10422
- 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"`,
10423
10457
  rung: "implemented"
10424
10458
  },
10425
10459
  {
10426
- 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)`,
10427
10461
  rung: "implemented"
10428
10462
  },
10429
10463
  {
10430
- 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`,
10431
10465
  rung: "implemented"
10432
10466
  },
10433
10467
  {
10434
- 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`,
10435
10469
  rung: "implemented"
10436
10470
  },
10437
10471
  {
10438
- 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`,
10439
10473
  rung: "implemented"
10440
10474
  },
10441
10475
  {
10442
- 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`,
10443
10477
  rung: "implemented"
10444
10478
  },
10445
10479
  {
10446
- 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)`,
10447
10481
  rung: "implemented"
10448
10482
  },
10449
10483
  {
10450
- 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`,
10451
10485
  rung: "implemented"
10452
10486
  },
10453
10487
  {
10454
- 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`,
10455
10489
  rung: "implemented"
10456
10490
  },
10457
10491
  {
10458
- 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)`,
10459
10493
  rung: "implemented"
10460
10494
  },
10461
10495
  {
10462
- 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`,
10463
10497
  rung: "implemented"
10464
10498
  },
10465
10499
  {
10466
- 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`,
10467
10501
  rung: "implemented"
10468
10502
  },
10469
10503
  {
@@ -11872,11 +11906,11 @@ const SUPAVISOR_SERVER = machineSchema.parse({
11872
11906
  * of the transports gives the timers.
11873
11907
  */
11874
11908
  /** This text is the folder of the WebSocket transports at the commit of the subject. */
11875
- const AT$6 = "client 2408cea packages/client/src/adapters/websocket";
11909
+ const AT$7 = "client 2408cea packages/client/src/adapters/websocket";
11876
11910
  /** This text is the client transport at that commit. */
11877
- const CT = `${AT$6}/client/transport.ts`;
11911
+ const CT = `${AT$7}/client/transport.ts`;
11878
11912
  /** This text is the server transport at that commit. */
11879
- const ST = `${AT$6}/server/transport.ts`;
11913
+ const ST = `${AT$7}/server/transport.ts`;
11880
11914
  /** This text is the source of the version of the service that the lock of the client gives (pnpm-lock.yaml:443-454). */
11881
11915
  const SERVICE = "@mark1russell7/service 0.5.8 (systems 571e9e5) packages/service/src";
11882
11916
  /** This function gives the arithmetic of a duration in ms. */
@@ -11956,7 +11990,7 @@ const PROCEDURES_WS_CLIENT = machineSchema.parse({
11956
11990
  rung: "implemented"
11957
11991
  },
11958
11992
  {
11959
- 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).`,
11960
11994
  rung: "implemented"
11961
11995
  },
11962
11996
  {
@@ -12503,7 +12537,7 @@ const PROCEDURES_WS_SERVER = machineSchema.parse({
12503
12537
  });
12504
12538
  //#endregion
12505
12539
  //#region src/proxy/caddy.ts
12506
- const AT$5 = "caddy v2.11.7";
12540
+ const AT$6 = "caddy v2.11.7";
12507
12541
  const XNET = "x/net v0.59.0";
12508
12542
  /**
12509
12543
  * This document is Caddy 2.11.7 as an HTTP/2 proxy of gRPC, for one connection of a client. Its
@@ -12529,11 +12563,11 @@ const CADDY_HTTP2 = machineSchema.parse({
12529
12563
  },
12530
12564
  sources: [
12531
12565
  {
12532
- 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`,
12533
12567
  rung: "implemented"
12534
12568
  },
12535
12569
  {
12536
- 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}`,
12537
12571
  rung: "implemented"
12538
12572
  },
12539
12573
  {
@@ -12553,15 +12587,15 @@ const CADDY_HTTP2 = machineSchema.parse({
12553
12587
  rung: "implemented"
12554
12588
  },
12555
12589
  {
12556
- 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`,
12557
12591
  rung: "implemented"
12558
12592
  },
12559
12593
  {
12560
- 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`,
12561
12595
  rung: "implemented"
12562
12596
  },
12563
12597
  {
12564
- 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`,
12565
12599
  rung: "implemented"
12566
12600
  },
12567
12601
  {
@@ -12569,11 +12603,11 @@ const CADDY_HTTP2 = machineSchema.parse({
12569
12603
  rung: "implemented"
12570
12604
  },
12571
12605
  {
12572
- 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`,
12573
12607
  rung: "implemented"
12574
12608
  },
12575
12609
  {
12576
- 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`,
12577
12611
  rung: "implemented"
12578
12612
  }
12579
12613
  ],
@@ -12864,7 +12898,7 @@ const CADDY_HTTP2 = machineSchema.parse({
12864
12898
  });
12865
12899
  //#endregion
12866
12900
  //#region src/proxy/envoy.ts
12867
- const AT$4 = "envoy v1.39.4";
12901
+ const AT$5 = "envoy v1.39.4";
12868
12902
  /**
12869
12903
  * This document is Envoy 1.39.4 as an HTTP/2 proxy of gRPC, for one connection of a client. Its static
12870
12904
  * configuration is the one of the harness. It has one listener with the HTTP connection manager, one
@@ -12889,67 +12923,67 @@ const ENVOY_HTTP2 = machineSchema.parse({
12889
12923
  },
12890
12924
  sources: [
12891
12925
  {
12892
- 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`,
12893
12927
  rung: "implemented"
12894
12928
  },
12895
12929
  {
12896
- 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`,
12897
12931
  rung: "implemented"
12898
12932
  },
12899
12933
  {
12900
- 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`,
12901
12935
  rung: "implemented"
12902
12936
  },
12903
12937
  {
12904
- 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`,
12905
12939
  rung: "implemented"
12906
12940
  },
12907
12941
  {
12908
- 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`,
12909
12943
  rung: "implemented"
12910
12944
  },
12911
12945
  {
12912
- 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)`,
12913
12947
  rung: "implemented"
12914
12948
  },
12915
12949
  {
12916
- 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`,
12917
12951
  rung: "implemented"
12918
12952
  },
12919
12953
  {
12920
- 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"`,
12921
12955
  rung: "implemented"
12922
12956
  },
12923
12957
  {
12924
- 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`,
12925
12959
  rung: "implemented"
12926
12960
  },
12927
12961
  {
12928
- 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`,
12929
12963
  rung: "implemented"
12930
12964
  },
12931
12965
  {
12932
- 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`,
12933
12967
  rung: "implemented"
12934
12968
  },
12935
12969
  {
12936
- 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`,
12937
12971
  rung: "implemented"
12938
12972
  },
12939
12973
  {
12940
- 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`,
12941
12975
  rung: "implemented"
12942
12976
  },
12943
12977
  {
12944
- 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`,
12945
12979
  rung: "implemented"
12946
12980
  },
12947
12981
  {
12948
- 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`,
12949
12983
  rung: "implemented"
12950
12984
  },
12951
12985
  {
12952
- 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`,
12953
12987
  rung: "implemented"
12954
12988
  }
12955
12989
  ],
@@ -13309,6 +13343,694 @@ const ENVOY_HTTP2 = machineSchema.parse({
13309
13343
  }
13310
13344
  });
13311
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
13312
14034
  //#region src/proxy/nginx.ts
13313
14035
  const AT$3 = "nginx release-1.29.6";
13314
14036
  const V2 = "src/http/v2/ngx_http_v2.c";
@@ -16492,9 +17214,12 @@ const MACHINES = byId([
16492
17214
  ENVOY_HTTP2,
16493
17215
  CADDY_HTTP2,
16494
17216
  NGINX_GRPC,
16495
- TRAEFIK_HTTP2
17217
+ TRAEFIK_HTTP2,
17218
+ ISTIO_SIDECAR_OUTBOUND,
17219
+ ISTIO_SIDECAR_INBOUND,
17220
+ PILOT_AGENT
16496
17221
  ]);
16497
17222
  //#endregion
16498
- 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 };
17223
+ 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, goLateSeconds, goTimerLateness, istioSidecar, nodeEarlySeconds, nodeLateSeconds, nodeTimerLateness, undiciFastEarly, undiciFastLateness };
16499
17224
 
16500
17225
  //# sourceMappingURL=index.js.map