@mark1russell7/machines 0.3.16 → 0.3.17

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$9 = "grpc-go v1.84.0";
4
+ const AT$10 = "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$9} 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$10} 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$9} 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$10} 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$9} 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$10} 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$9} 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$10} 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$9} 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$10} 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$9} 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$10} 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$9} internal/transport/http2_server.go:1291-1310 Close closes the net.Conn: a FIN, or a reset when bytes are unread`,
34
+ ref: `${AT$10} 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$9} 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$10} 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$9} server.go:192, :1000-1009 a deadline of 120 s for the handshake of each new connection (ConnectionTimeout)`,
42
+ ref: `${AT$10} 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$9} server.go:894-905 the comment of grpc-go: Go sets a TCP keepalive of 15 s on each accepted connection`,
46
+ ref: `${AT$10} 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$8 = "@grpc/grpc-js 1.14.6 src";
705
+ const AT$9 = "@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$8}/transport.ts:70 KEEPALIVE_TIMEOUT_MS is 20000`,
735
+ ref: `${AT$9}/transport.ts:70 KEEPALIVE_TIMEOUT_MS is 20000`,
736
736
  rung: "implemented"
737
737
  },
738
738
  {
739
- ref: `${AT$8}/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$9}/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$8}/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$9}/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$8}/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$9}/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$8}/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$9}/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$8}/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$9}/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$8}/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$9}/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$8}/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$9}/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$8}/transport.ts:684-687 shutdown closes the session: a GOAWAY, then the end of the socket after the last stream`,
767
+ ref: `${AT$9}/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$8}/transport.ts:792-810 the transport is ready at the first SETTINGS of the server (remoteSettings)`,
771
+ ref: `${AT$9}/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$8}/transport.ts:818-840 the TCP connect is net.connect with no timeout`,
775
+ ref: `${AT$9}/transport.ts:818-840 the TCP connect is net.connect with no timeout`,
776
776
  rung: "implemented"
777
777
  },
778
778
  {
779
- ref: `${AT$8}/transport.ts:862 setNoDelay on each connection: TCP_NODELAY, thus no Nagle. No setKeepAlive anywhere in the package`,
779
+ ref: `${AT$9}/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$8}/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$9}/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$8}/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$9}/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$8}/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$9}/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$8}/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$9}/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$8}/load-balancing-call.ts:338-345 a pick in TRANSIENT_FAILURE fails the call at once, unless it asks for waitForReady`,
799
+ ref: `${AT$9}/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$8}/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$9}/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$8}/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$9}/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$8}/subchannel-call.ts:269-279 a RST_STREAM CANCEL of the server ends the call with CANCELLED 'Call cancelled'`,
811
+ ref: `${AT$9}/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,19 +816,19 @@ const GRPC_JS = machineSchema.parse({
816
816
  rung: "observed"
817
817
  },
818
818
  {
819
- ref: `${AT$8}/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$9}/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$8}/subchannel.ts:298-304 a failed connect takes the subchannel to TRANSIENT_FAILURE`,
823
+ ref: `${AT$9}/subchannel.ts:298-304 a failed connect takes the subchannel to TRANSIENT_FAILURE`,
824
824
  rung: "implemented"
825
825
  },
826
826
  {
827
- ref: `${AT$8}/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$9}/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$8}/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`,
831
+ ref: `${AT$9}/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`,
832
832
  rung: "implemented"
833
833
  },
834
834
  {
@@ -2582,7 +2582,7 @@ const UNDICI_CLIENT = machineSchema.parse({
2582
2582
  });
2583
2583
  //#endregion
2584
2584
  //#region src/ioredis-sentinel.ts
2585
- const AT$7 = "ioredis 6.0.0 built";
2585
+ const AT$8 = "ioredis 6.0.0 built";
2586
2586
  /**
2587
2587
  * This document is the Sentinel path of ioredis 6.0.0. It tells how ioredis finds the primary of a
2588
2588
  * group through the Sentinels, loses it, and connects to the new one. The standalone states of
@@ -2603,43 +2603,43 @@ const IOREDIS_SENTINEL = machineSchema.parse({
2603
2603
  },
2604
2604
  sources: [
2605
2605
  {
2606
- ref: `${AT$7}/connectors/SentinelConnector/index.js:46-121 connect (each Sentinel in turn, then sentinelRetryStrategy)`,
2606
+ ref: `${AT$8}/connectors/SentinelConnector/index.js:46-121 connect (each Sentinel in turn, then sentinelRetryStrategy)`,
2607
2607
  rung: "implemented"
2608
2608
  },
2609
2609
  {
2610
- ref: `${AT$7}/connectors/SentinelConnector/index.js:145-151 resolveMaster (get-master-addr-by-name, then SENTINEL sentinels)`,
2610
+ ref: `${AT$8}/connectors/SentinelConnector/index.js:145-151 resolveMaster (get-master-addr-by-name, then SENTINEL sentinels)`,
2611
2611
  rung: "implemented"
2612
2612
  },
2613
2613
  {
2614
- ref: `${AT$7}/connectors/SentinelConnector/index.js:175-212 connectToSentinel and resolve (one connection for each question, no retry)`,
2614
+ ref: `${AT$8}/connectors/SentinelConnector/index.js:175-212 connectToSentinel and resolve (one connection for each question, no retry)`,
2615
2615
  rung: "implemented"
2616
2616
  },
2617
2617
  {
2618
- ref: `${AT$7}/connectors/SentinelConnector/index.js:27-39 check (the role of the ready check)`,
2618
+ ref: `${AT$8}/connectors/SentinelConnector/index.js:27-39 check (the role of the ready check)`,
2619
2619
  rung: "implemented"
2620
2620
  },
2621
2621
  {
2622
- ref: `${AT$7}/connectors/SentinelConnector/FailoverDetector.js:6-43 (+switch-master, only with failoverDetector)`,
2622
+ ref: `${AT$8}/connectors/SentinelConnector/FailoverDetector.js:6-43 (+switch-master, only with failoverDetector)`,
2623
2623
  rung: "implemented"
2624
2624
  },
2625
2625
  {
2626
- ref: `${AT$7}/redis/RedisOptions.js:9-57 (the defaults)`,
2626
+ ref: `${AT$8}/redis/RedisOptions.js:9-57 (the defaults)`,
2627
2627
  rung: "implemented"
2628
2628
  },
2629
2629
  {
2630
- ref: `${AT$7}/redis/event_handler.js:294-355 closeHandler (retryStrategy, then maxRetriesPerRequest flushes the queue)`,
2630
+ ref: `${AT$8}/redis/event_handler.js:294-355 closeHandler (retryStrategy, then maxRetriesPerRequest flushes the queue)`,
2631
2631
  rung: "implemented"
2632
2632
  },
2633
2633
  {
2634
- ref: `${AT$7}/redis/event_handler.js:364-449 readyHandler (retryAttempts back to 0, the resend, the offline queue)`,
2634
+ ref: `${AT$8}/redis/event_handler.js:364-449 readyHandler (retryAttempts back to 0, the resend, the offline queue)`,
2635
2635
  rung: "implemented"
2636
2636
  },
2637
2637
  {
2638
- ref: `${AT$7}/Redis.js:123-240 _connect (connectTimeout, keepAlive) and :379-405 sendCommand (the offline queue)`,
2638
+ ref: `${AT$8}/Redis.js:123-240 _connect (connectTimeout, keepAlive) and :379-405 sendCommand (the offline queue)`,
2639
2639
  rung: "implemented"
2640
2640
  },
2641
2641
  {
2642
- ref: `${AT$7}/Redis.js:599-605 handleReconnection (reconnectOnError: null, thus a READONLY error goes to the caller)`,
2642
+ ref: `${AT$8}/Redis.js:599-605 handleReconnection (reconnectOnError: null, thus a READONLY error goes to the caller)`,
2643
2643
  rung: "implemented"
2644
2644
  }
2645
2645
  ],
@@ -4799,7 +4799,7 @@ const IOREDIS_STATUS = machineSchema.parse(ioredis_status_default);
4799
4799
  const MANIFESTATIONS = z.record(z.string(), z.array(z.string())).parse(manifestations_default);
4800
4800
  //#endregion
4801
4801
  //#region src/mongo/mongod-replication.ts
4802
- const AT$6 = "mongodb r9.0.4 src/mongo/db/repl";
4802
+ const AT$7 = "mongodb r9.0.4 src/mongo/db/repl";
4803
4803
  /**
4804
4804
  * This document is the replication of mongod 9.0.4. It gives one member of a replica set, its view
4805
4805
  * of the primary, and the election that it can hold. The states are the states of the member. The
@@ -4830,95 +4830,95 @@ const MONGOD_REPL = machineSchema.parse({
4830
4830
  },
4831
4831
  sources: [
4832
4832
  {
4833
- ref: `${AT$6}/repl_set_config.idl:74-109 the settings: heartbeatIntervalMillis 2000, heartbeatTimeoutSecs 10, electionTimeoutMillis 10000, catchUpTimeoutMillis -1, catchUpTakeoverDelayMillis 30000`,
4833
+ ref: `${AT$7}/repl_set_config.idl:74-109 the settings: heartbeatIntervalMillis 2000, heartbeatTimeoutSecs 10, electionTimeoutMillis 10000, catchUpTimeoutMillis -1, catchUpTakeoverDelayMillis 30000`,
4834
4834
  rung: "implemented"
4835
4835
  },
4836
4836
  {
4837
- ref: `${AT$6}/repl_server_parameters.idl:320-328 replElectionTimeoutOffsetLimitFraction 0.15`,
4837
+ ref: `${AT$7}/repl_server_parameters.idl:320-328 replElectionTimeoutOffsetLimitFraction 0.15`,
4838
4838
  rung: "implemented"
4839
4839
  },
4840
4840
  {
4841
- ref: `${AT$6}/topology_coordinator.cpp:1058-1101 the heartbeat window and the timeout of each request, :1124-1147 the next heartbeat, :1239-1248 a member DOWN`,
4841
+ ref: `${AT$7}/topology_coordinator.cpp:1058-1101 the heartbeat window and the timeout of each request, :1124-1147 the next heartbeat, :1239-1248 a member DOWN`,
4842
4842
  rung: "implemented"
4843
4843
  },
4844
4844
  {
4845
- ref: `${AT$6}/topology_coordinator.h:62 kMaxHeartbeatRetries 2`,
4845
+ ref: `${AT$7}/topology_coordinator.h:62 kMaxHeartbeatRetries 2`,
4846
4846
  rung: "implemented"
4847
4847
  },
4848
4848
  {
4849
- ref: `${AT$6}/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`,
4849
+ ref: `${AT$7}/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`,
4850
4850
  rung: "implemented"
4851
4851
  },
4852
4852
  {
4853
- ref: `${AT$6}/data_replicator_external_state_impl.cpp:70-81 an oplog batch that names a primary postpones the election`,
4853
+ ref: `${AT$7}/data_replicator_external_state_impl.cpp:70-81 an oplog batch that names a primary postpones the election`,
4854
4854
  rung: "implemented"
4855
4855
  },
4856
4856
  {
4857
- ref: `${AT$6}/delayable_timeout_callback.cpp:149-172 the offset changes at most once in its own length`,
4857
+ ref: `${AT$7}/delayable_timeout_callback.cpp:149-172 the offset changes at most once in its own length`,
4858
4858
  rung: "implemented"
4859
4859
  },
4860
4860
  {
4861
- ref: `${AT$6}/topology_coordinator.cpp:1440-1457 and :1476-1489 the liveness check: a primary that cannot see a majority steps down`,
4861
+ ref: `${AT$7}/topology_coordinator.cpp:1440-1457 and :1476-1489 the liveness check: a primary that cannot see a majority steps down`,
4862
4862
  rung: "implemented"
4863
4863
  },
4864
4864
  {
4865
- ref: `${AT$6}/replication_coordinator_impl_heartbeat.cpp:1158-1188 the liveness check runs at the stalest member's last update plus the election timeout`,
4865
+ ref: `${AT$7}/replication_coordinator_impl_heartbeat.cpp:1158-1188 the liveness check runs at the stalest member's last update plus the election timeout`,
4866
4866
  rung: "implemented"
4867
4867
  },
4868
4868
  {
4869
- ref: `${AT$6}/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`,
4869
+ ref: `${AT$7}/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`,
4870
4870
  rung: "implemented"
4871
4871
  },
4872
4872
  {
4873
- ref: `${AT$6}/vote_requester.cpp:96 a vote request times out at min(electionTimeoutMillis, 30 s), :160-177 a majority of yes votes ends the round`,
4873
+ ref: `${AT$7}/vote_requester.cpp:96 a vote request times out at min(electionTimeoutMillis, 30 s), :160-177 a majority of yes votes ends the round`,
4874
4874
  rung: "implemented"
4875
4875
  },
4876
4876
  {
4877
- ref: `${AT$6}/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`,
4877
+ ref: `${AT$7}/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`,
4878
4878
  rung: "implemented"
4879
4879
  },
4880
4880
  {
4881
- ref: `${AT$6}/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`,
4881
+ ref: `${AT$7}/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`,
4882
4882
  rung: "implemented"
4883
4883
  },
4884
4884
  {
4885
- ref: `${AT$6}/topology_coordinator.cpp:3841-3849 and :3910-3932 a restarted heartbeat, and the latest optime that the catch-up waits for`,
4885
+ ref: `${AT$7}/topology_coordinator.cpp:3841-3849 and :3910-3932 a restarted heartbeat, and the latest optime that the catch-up waits for`,
4886
4886
  rung: "implemented"
4887
4887
  },
4888
4888
  {
4889
- ref: `${AT$6}/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`,
4889
+ ref: `${AT$7}/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`,
4890
4890
  rung: "implemented"
4891
4891
  },
4892
4892
  {
4893
- ref: `${AT$6}/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`,
4893
+ ref: `${AT$7}/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`,
4894
4894
  rung: "implemented"
4895
4895
  },
4896
4896
  {
4897
- ref: `${AT$6}/repl_set_commands.cpp:545-561 stepDownSecs 60 and secondaryCatchUpPeriodSecs 10`,
4897
+ ref: `${AT$7}/repl_set_commands.cpp:545-561 stepDownSecs 60 and secondaryCatchUpPeriodSecs 10`,
4898
4898
  rung: "implemented"
4899
4899
  },
4900
4900
  {
4901
- ref: `${AT$6}/replication_coordinator_impl.idl:18-26 enableElectionHandoff true, and replication_coordinator_impl.cpp:2830-2873 the hand-off: replSetStepUp with skipDryRun`,
4901
+ ref: `${AT$7}/replication_coordinator_impl.idl:18-26 enableElectionHandoff true, and replication_coordinator_impl.cpp:2830-2873 the hand-off: replSetStepUp with skipDryRun`,
4902
4902
  rung: "implemented"
4903
4903
  },
4904
4904
  {
4905
- ref: `${AT$6}/replication_coordinator_impl.cpp:1516 the reconfig of the term, :4598 and :4750 a new config starts each heartbeat again`,
4905
+ ref: `${AT$7}/replication_coordinator_impl.cpp:1516 the reconfig of the term, :4598 and :4750 a new config starts each heartbeat again`,
4906
4906
  rung: "implemented"
4907
4907
  },
4908
4908
  {
4909
- ref: `${AT$6}/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`,
4909
+ ref: `${AT$7}/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`,
4910
4910
  rung: "implemented"
4911
4911
  },
4912
4912
  {
4913
- ref: `${AT$6}/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`,
4913
+ ref: `${AT$7}/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`,
4914
4914
  rung: "implemented"
4915
4915
  },
4916
4916
  {
4917
- ref: `${AT$6}/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`,
4917
+ ref: `${AT$7}/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`,
4918
4918
  rung: "implemented"
4919
4919
  },
4920
4920
  {
4921
- ref: `${AT$6}/repl_server_parameters.idl:121-126 oplogRetriedFindMaxSeconds 2, :234-244 oplogFetcherSteadyStateMaxFetcherRestarts 1, :344-351 oplogNetworkTimeoutBufferSeconds 5`,
4921
+ ref: `${AT$7}/repl_server_parameters.idl:121-126 oplogRetriedFindMaxSeconds 2, :234-244 oplogFetcherSteadyStateMaxFetcherRestarts 1, :344-351 oplogNetworkTimeoutBufferSeconds 5`,
4922
4922
  rung: "implemented"
4923
4923
  },
4924
4924
  {
@@ -4926,19 +4926,19 @@ const MONGOD_REPL = machineSchema.parse({
4926
4926
  rung: "implemented"
4927
4927
  },
4928
4928
  {
4929
- ref: `${AT$6}/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`,
4929
+ ref: `${AT$7}/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`,
4930
4930
  rung: "implemented"
4931
4931
  },
4932
4932
  {
4933
- ref: `${AT$6}/replication_coordinator_impl.cpp:4947-4972 a member that loses its sync source starts each heartbeat again at once`,
4933
+ ref: `${AT$7}/replication_coordinator_impl.cpp:4947-4972 a member that loses its sync source starts each heartbeat again at once`,
4934
4934
  rung: "implemented"
4935
4935
  },
4936
4936
  {
4937
- ref: `${AT$6}/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`,
4937
+ ref: `${AT$7}/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`,
4938
4938
  rung: "implemented"
4939
4939
  },
4940
4940
  {
4941
- ref: `${AT$6}/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`,
4941
+ ref: `${AT$7}/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`,
4942
4942
  rung: "implemented"
4943
4943
  },
4944
4944
  {
@@ -5557,7 +5557,7 @@ const MONGOD_REPL = machineSchema.parse({
5557
5557
  });
5558
5558
  //#endregion
5559
5559
  //#region src/mongo/mongod-session.ts
5560
- const AT$5 = "mongodb r9.0.4 src/mongo";
5560
+ const AT$6 = "mongodb r9.0.4 src/mongo";
5561
5561
  /**
5562
5562
  * This document is the hold of mongod 9.0.4 on one client connection, over its socket. `mongod`
5563
5563
  * turns keepalive on for each TCP session. It lowers two keepalive options of the socket to a
@@ -5584,27 +5584,27 @@ const MONGOD_SESSION = machineSchema.parse({
5584
5584
  },
5585
5585
  sources: [
5586
5586
  {
5587
- ref: `${AT$5}/transport/asio/asio_session_impl.cpp:156-165 each TCP session: TCP_NODELAY, SO_KEEPALIVE, setSocketKeepAliveParams, failures at debug 3 in a release build`,
5587
+ ref: `${AT$6}/transport/asio/asio_session_impl.cpp:156-165 each TCP session: TCP_NODELAY, SO_KEEPALIVE, setSocketKeepAliveParams, failures at debug 3 in a release build`,
5588
5588
  rung: "implemented"
5589
5589
  },
5590
5590
  {
5591
- ref: `${AT$5}/util/net/socket_utils.h:15-16 kMaxKeepIdleSecs 300 and kMaxKeepIntvlSecs 1, :19-22 the defaults of setSocketKeepAliveParams`,
5591
+ ref: `${AT$6}/util/net/socket_utils.h:15-16 kMaxKeepIdleSecs 300 and kMaxKeepIntvlSecs 1, :19-22 the defaults of setSocketKeepAliveParams`,
5592
5592
  rung: "implemented"
5593
5593
  },
5594
5594
  {
5595
- ref: `${AT$5}/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`,
5595
+ ref: `${AT$6}/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`,
5596
5596
  rung: "implemented"
5597
5597
  },
5598
5598
  {
5599
- ref: `${AT$5}/util/net/socket_utils.cpp:176-181 and :190-194 the log of a failed read or set, at the severity of the caller`,
5599
+ ref: `${AT$6}/util/net/socket_utils.cpp:176-181 and :190-194 the log of a failed read or set, at the severity of the caller`,
5600
5600
  rung: "implemented"
5601
5601
  },
5602
5602
  {
5603
- ref: `${AT$5}/util/net/sock.cpp:135-142 the older socket path: SO_KEEPALIVE, then the same maximums, failures as errors`,
5603
+ ref: `${AT$6}/util/net/sock.cpp:135-142 the older socket path: SO_KEEPALIVE, then the same maximums, failures as errors`,
5604
5604
  rung: "implemented"
5605
5605
  },
5606
5606
  {
5607
- ref: `${AT$5}/db/repl/replication_info.cpp:131-143 an awaitable hello waits until now + maxAwaitTimeMS on the precise clock, or a change of the topology`,
5607
+ ref: `${AT$6}/db/repl/replication_info.cpp:131-143 an awaitable hello waits until now + maxAwaitTimeMS on the precise clock, or a change of the topology`,
5608
5608
  rung: "implemented"
5609
5609
  }
5610
5610
  ],
@@ -5766,7 +5766,7 @@ const MONGOD_SESSION = machineSchema.parse({
5766
5766
  });
5767
5767
  //#endregion
5768
5768
  //#region src/mongo/mongodb-node.ts
5769
- const AT$4 = "mongodb 7.7.0 src";
5769
+ const AT$5 = "mongodb 7.7.0 src";
5770
5770
  /**
5771
5771
  * This document is the MongoDB Node driver 7.7.0, for one server of a replica set. It gives one
5772
5772
  * connection of the driver by its role, and the timers that act on it. The roles are the monitor
@@ -5793,75 +5793,75 @@ const MONGODB_NODE = machineSchema.parse({
5793
5793
  },
5794
5794
  sources: [
5795
5795
  {
5796
- ref: `${AT$4}/connection_string.ts:804-807 connectTimeoutMS 30000, :850-853 heartbeatFrequencyMS 10000, :934-937 minHeartbeatFrequencyMS 500`,
5796
+ ref: `${AT$5}/connection_string.ts:804-807 connectTimeoutMS 30000, :850-853 heartbeatFrequencyMS 10000, :934-937 minHeartbeatFrequencyMS 500`,
5797
5797
  rung: "implemented"
5798
5798
  },
5799
5799
  {
5800
- ref: `${AT$4}/connection_string.ts:1100-1103 serverSelectionTimeoutMS 30000, :1107-1111 socketTimeoutMS 0, :1178-1182 waitQueueTimeoutMS 0`,
5800
+ ref: `${AT$5}/connection_string.ts:1100-1103 serverSelectionTimeoutMS 30000, :1107-1111 socketTimeoutMS 0, :1178-1182 waitQueueTimeoutMS 0`,
5801
5801
  rung: "implemented"
5802
5802
  },
5803
5803
  {
5804
- ref: `${AT$4}/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`,
5804
+ ref: `${AT$5}/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`,
5805
5805
  rung: "implemented"
5806
5806
  },
5807
5807
  {
5808
- ref: `${AT$4}/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`,
5808
+ ref: `${AT$5}/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`,
5809
5809
  rung: "implemented"
5810
5810
  },
5811
5811
  {
5812
- ref: `${AT$4}/cmap/connect.ts:117-120 the handshake reads with socketTimeoutMS = connectTimeoutMS`,
5812
+ ref: `${AT$5}/cmap/connect.ts:117-120 the handshake reads with socketTimeoutMS = connectTimeoutMS`,
5813
5813
  rung: "implemented"
5814
5814
  },
5815
5815
  {
5816
- ref: `${AT$4}/sdam/monitor.ts:245-259 the streaming protocol, :338-371 the awaitable hello: maxAwaitTimeMS = heartbeatFrequencyMS, socketTimeoutMS = connectTimeoutMS + maxAwaitTimeMS`,
5816
+ ref: `${AT$5}/sdam/monitor.ts:245-259 the streaming protocol, :338-371 the awaitable hello: maxAwaitTimeMS = heartbeatFrequencyMS, socketTimeoutMS = connectTimeoutMS + maxAwaitTimeMS`,
5817
5817
  rung: "implemented"
5818
5818
  },
5819
5819
  {
5820
- ref: `${AT$4}/sdam/monitor.ts:273-293 a failed heartbeat: ResetPool, and InterruptInUseConnections for a timeout`,
5820
+ ref: `${AT$5}/sdam/monitor.ts:273-293 a failed heartbeat: ResetPool, and InterruptInUseConnections for a timeout`,
5821
5821
  rung: "implemented"
5822
5822
  },
5823
5823
  {
5824
- ref: `${AT$4}/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`,
5824
+ ref: `${AT$5}/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`,
5825
5825
  rung: "implemented"
5826
5826
  },
5827
5827
  {
5828
- ref: `${AT$4}/sdam/monitor.ts:490-565 the RTT pinger: its own connection, a hello each heartbeatFrequencyMS, no socket timeout`,
5828
+ ref: `${AT$5}/sdam/monitor.ts:490-565 the RTT pinger: its own connection, a hello each heartbeatFrequencyMS, no socket timeout`,
5829
5829
  rung: "implemented"
5830
5830
  },
5831
5831
  {
5832
- ref: `${AT$4}/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`,
5832
+ ref: `${AT$5}/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`,
5833
5833
  rung: "implemented"
5834
5834
  },
5835
5835
  {
5836
- ref: `${AT$4}/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`,
5836
+ ref: `${AT$5}/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`,
5837
5837
  rung: "implemented"
5838
5838
  },
5839
5839
  {
5840
- ref: `${AT$4}/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`,
5840
+ ref: `${AT$5}/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`,
5841
5841
  rung: "implemented"
5842
5842
  },
5843
5843
  {
5844
- ref: `${AT$4}/sdam/topology_description.ts:458-467 a primary that another primary replaces is Unknown, and nothing clears its pool`,
5844
+ ref: `${AT$5}/sdam/topology_description.ts:458-467 a primary that another primary replaces is Unknown, and nothing clears its pool`,
5845
5845
  rung: "implemented"
5846
5846
  },
5847
5847
  {
5848
- ref: `${AT$4}/cmap/connection_pool.ts:417-468 clear, :475-481 interruptInUseConnections: PoolClearedOnNetworkError, :584 a connection idle for maxIdleTimeMS is perished at the next check-out`,
5848
+ ref: `${AT$5}/cmap/connection_pool.ts:417-468 clear, :475-481 interruptInUseConnections: PoolClearedOnNetworkError, :584 a connection idle for maxIdleTimeMS is perished at the next check-out`,
5849
5849
  rung: "implemented"
5850
5850
  },
5851
5851
  {
5852
- ref: `${AT$4}/cmap/errors.ts:37-84 PoolClearedError and PoolClearedOnNetworkError, with the label PoolRequestedRetry`,
5852
+ ref: `${AT$5}/cmap/errors.ts:37-84 PoolClearedError and PoolClearedOnNetworkError, with the label PoolRequestedRetry`,
5853
5853
  rung: "implemented"
5854
5854
  },
5855
5855
  {
5856
- ref: `${AT$4}/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`,
5856
+ ref: `${AT$5}/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`,
5857
5857
  rung: "implemented"
5858
5858
  },
5859
5859
  {
5860
- ref: `${AT$4}/error.ts:1377-1394 the retryable codes, :1431-1436 isRetryableWriteError: RetryableWriteError or PoolRequestedRetry`,
5860
+ ref: `${AT$5}/error.ts:1377-1394 the retryable codes, :1431-1436 isRetryableWriteError: RetryableWriteError or PoolRequestedRetry`,
5861
5861
  rung: "implemented"
5862
5862
  },
5863
5863
  {
5864
- ref: `${AT$4}/timeout.ts:362-372 the legacy timeout context: the selection timeout, and no check-out timeout at waitQueueTimeoutMS 0`,
5864
+ ref: `${AT$5}/timeout.ts:362-372 the legacy timeout context: the selection timeout, and no check-out timeout at waitQueueTimeoutMS 0`,
5865
5865
  rung: "implemented"
5866
5866
  },
5867
5867
  {
@@ -7541,7 +7541,7 @@ const HIKARICP_PGJDBC = machineSchema.parse({
7541
7541
  });
7542
7542
  //#endregion
7543
7543
  //#region src/pg/node-postgres.ts
7544
- const AT$3 = "pg 8.23.1 lib";
7544
+ const AT$4 = "pg 8.23.1 lib";
7545
7545
  const POOL = "pg-pool 3.14.0";
7546
7546
  /**
7547
7547
  * This document is node-postgres 8.23.1 (the npm package pg) with pg-pool 3.14.0, for one client
@@ -7583,75 +7583,75 @@ const NODE_POSTGRES = machineSchema.parse({
7583
7583
  rung: "implemented"
7584
7584
  },
7585
7585
  {
7586
- ref: `${AT$3}/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`,
7586
+ ref: `${AT$4}/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`,
7587
7587
  rung: "implemented"
7588
7588
  },
7589
7589
  {
7590
- ref: `${AT$3}/defaults.js:65, :69, :73 and :76 statement_timeout, lock_timeout, idle_in_transaction_session_timeout and query_timeout are false`,
7590
+ ref: `${AT$4}/defaults.js:65, :69, :73 and :76 statement_timeout, lock_timeout, idle_in_transaction_session_timeout and query_timeout are false`,
7591
7591
  rung: "implemented"
7592
7592
  },
7593
7593
  {
7594
- ref: `${AT$3}/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`,
7594
+ ref: `${AT$4}/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`,
7595
7595
  rung: "documented"
7596
7596
  },
7597
7597
  {
7598
- ref: `${AT$3}/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`,
7598
+ ref: `${AT$4}/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`,
7599
7599
  rung: "implemented"
7600
7600
  },
7601
7601
  {
7602
- ref: `${AT$3}/client.js:89-98 the Connection gets keepAlive false and keepAliveInitialDelayMillis 0 when the config does not give them, :116 connectionTimeoutMillis 0`,
7602
+ ref: `${AT$4}/client.js:89-98 the Connection gets keepAlive false and keepAliveInitialDelayMillis 0 when the config does not give them, :116 connectionTimeoutMillis 0`,
7603
7603
  rung: "implemented"
7604
7604
  },
7605
7605
  {
7606
- ref: `${AT$3}/stream.js:20-24 and :78-83 outside Cloudflare Workers, the socket is a new net.Socket with no option`,
7606
+ ref: `${AT$4}/stream.js:20-24 and :78-83 outside Cloudflare Workers, the socket is a new net.Socket with no option`,
7607
7607
  rung: "implemented"
7608
7608
  },
7609
7609
  {
7610
- ref: `${AT$3}/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`,
7610
+ ref: `${AT$4}/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`,
7611
7611
  rung: "implemented"
7612
7612
  },
7613
7613
  {
7614
- ref: `${AT$3}/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`,
7614
+ ref: `${AT$4}/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`,
7615
7615
  rung: "implemented"
7616
7616
  },
7617
7617
  {
7618
- ref: `${AT$3}/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`,
7618
+ ref: `${AT$4}/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`,
7619
7619
  rung: "implemented"
7620
7620
  },
7621
7621
  {
7622
- ref: `${AT$3}/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`,
7622
+ ref: `${AT$4}/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`,
7623
7623
  rung: "implemented"
7624
7624
  },
7625
7625
  {
7626
- ref: `${AT$3}/client.js:426-442 an ErrorResponse fails the active query only, and with no active query it is an error of the client`,
7626
+ ref: `${AT$4}/client.js:426-442 an ErrorResponse fails the active query only, and with no active query it is an error of the client`,
7627
7627
  rung: "implemented"
7628
7628
  },
7629
7629
  {
7630
- ref: `${AT$3}/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`,
7630
+ ref: `${AT$4}/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`,
7631
7631
  rung: "implemented"
7632
7632
  },
7633
7633
  {
7634
- ref: `${AT$3}/client.js:133-151 _errorAllQueries: each query of the client fails with the same error, on the next tick`,
7634
+ ref: `${AT$4}/client.js:133-151 _errorAllQueries: each query of the client fails with the same error, on the next tick`,
7635
7635
  rung: "implemented"
7636
7636
  },
7637
7637
  {
7638
- ref: `${AT$3}/query.js:122-150 a query gives its error or its result to its callback, at the error or at the ReadyForQuery`,
7638
+ ref: `${AT$4}/query.js:122-150 a query gives its error or its result to its callback, at the error or at the ReadyForQuery`,
7639
7639
  rung: "implemented"
7640
7640
  },
7641
7641
  {
7642
- ref: `${AT$3}/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`,
7642
+ ref: `${AT$4}/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`,
7643
7643
  rung: "implemented"
7644
7644
  },
7645
7645
  {
7646
- ref: `${AT$3}/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`,
7646
+ ref: `${AT$4}/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`,
7647
7647
  rung: "implemented"
7648
7648
  },
7649
7649
  {
7650
- ref: `${AT$3}/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`,
7650
+ ref: `${AT$4}/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`,
7651
7651
  rung: "implemented"
7652
7652
  },
7653
7653
  {
7654
- ref: `${AT$3}/client.js:543-572 getStartupConf: statement_timeout, lock_timeout and idle_in_transaction_session_timeout go to the server only when they are set`,
7654
+ ref: `${AT$4}/client.js:543-572 getStartupConf: statement_timeout, lock_timeout and idle_in_transaction_session_timeout go to the server only when they are set`,
7655
7655
  rung: "implemented"
7656
7656
  },
7657
7657
  {
@@ -10047,7 +10047,7 @@ const PGPOOL_SESSION = machineSchema.parse({
10047
10047
  });
10048
10048
  //#endregion
10049
10049
  //#region src/pg/postgres-session.ts
10050
- const AT$2 = "postgresql REL_17_11 src";
10050
+ const AT$3 = "postgresql REL_17_11 src";
10051
10051
  const DOC = "postgresql REL_17_11 doc/src/sgml";
10052
10052
  /**
10053
10053
  * This document is the hold of a PostgreSQL 17.11 backend on one client connection, over its TCP
@@ -10087,163 +10087,163 @@ const POSTGRES_SESSION = machineSchema.parse({
10087
10087
  rung: "implemented"
10088
10088
  },
10089
10089
  {
10090
- ref: `${AT$2}/backend/tcop/backend_startup.c:157-161 BackendInitialize calls pq_init in the backend, before the startup packet`,
10090
+ ref: `${AT$3}/backend/tcop/backend_startup.c:157-161 BackendInitialize calls pq_init in the backend, before the startup packet`,
10091
10091
  rung: "implemented"
10092
10092
  },
10093
10093
  {
10094
- ref: `${AT$2}/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`,
10094
+ ref: `${AT$3}/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`,
10095
10095
  rung: "implemented"
10096
10096
  },
10097
10097
  {
10098
- ref: `${AT$2}/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`,
10098
+ ref: `${AT$3}/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`,
10099
10099
  rung: "implemented"
10100
10100
  },
10101
10101
  {
10102
- ref: `${AT$2}/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`,
10102
+ ref: `${AT$3}/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`,
10103
10103
  rung: "implemented"
10104
10104
  },
10105
10105
  {
10106
- ref: `${AT$2}/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`,
10106
+ ref: `${AT$3}/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`,
10107
10107
  rung: "implemented"
10108
10108
  },
10109
10109
  {
10110
- ref: `${AT$2}/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`,
10110
+ ref: `${AT$3}/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`,
10111
10111
  rung: "implemented"
10112
10112
  },
10113
10113
  {
10114
- ref: `${AT$2}/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`,
10114
+ ref: `${AT$3}/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`,
10115
10115
  rung: "implemented"
10116
10116
  },
10117
10117
  {
10118
- ref: `${AT$2}/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`,
10118
+ ref: `${AT$3}/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`,
10119
10119
  rung: "implemented"
10120
10120
  },
10121
10121
  {
10122
- ref: `${AT$2}/include/utils/timeout.h:3-4 and :23-43 one SIGALRM for each timeout id, STARTUP_PACKET_TIMEOUT to CLIENT_CONNECTION_CHECK_TIMEOUT`,
10122
+ ref: `${AT$3}/include/utils/timeout.h:3-4 and :23-43 one SIGALRM for each timeout id, STARTUP_PACKET_TIMEOUT to CLIENT_CONNECTION_CHECK_TIMEOUT`,
10123
10123
  rung: "implemented"
10124
10124
  },
10125
10125
  {
10126
- ref: `${AT$2}/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`,
10126
+ ref: `${AT$3}/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`,
10127
10127
  rung: "implemented"
10128
10128
  },
10129
10129
  {
10130
- ref: `${AT$2}/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`,
10130
+ ref: `${AT$3}/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`,
10131
10131
  rung: "implemented"
10132
10132
  },
10133
10133
  {
10134
- ref: `${AT$2}/backend/tcop/postgres.c:2999-3023 die (SIGTERM) sets ProcDiePending, :3029-3043 StatementCancelHandler (SIGINT) sets QueryCancelPending, :4292-4294 the two handlers`,
10134
+ ref: `${AT$3}/backend/tcop/postgres.c:2999-3023 die (SIGTERM) sets ProcDiePending, :3029-3043 StatementCancelHandler (SIGINT) sets QueryCancelPending, :4292-4294 the two handlers`,
10135
10135
  rung: "implemented"
10136
10136
  },
10137
10137
  {
10138
- ref: `${AT$2}/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"`,
10138
+ ref: `${AT$3}/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"`,
10139
10139
  rung: "implemented"
10140
10140
  },
10141
10141
  {
10142
- ref: `${AT$2}/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`,
10142
+ ref: `${AT$3}/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`,
10143
10143
  rung: "implemented"
10144
10144
  },
10145
10145
  {
10146
- ref: `${AT$2}/backend/tcop/postgres.c:3372-3430 a cancel: ERROR 55P03 "canceling statement due to lock timeout", ERROR 57014 "canceling statement due to statement timeout"`,
10146
+ ref: `${AT$3}/backend/tcop/postgres.c:3372-3430 a cancel: ERROR 55P03 "canceling statement due to lock timeout", ERROR 57014 "canceling statement due to statement timeout"`,
10147
10147
  rung: "implemented"
10148
10148
  },
10149
10149
  {
10150
- ref: `${AT$2}/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"`,
10150
+ ref: `${AT$3}/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"`,
10151
10151
  rung: "implemented"
10152
10152
  },
10153
10153
  {
10154
- ref: `${AT$2}/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`,
10154
+ ref: `${AT$3}/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`,
10155
10155
  rung: "implemented"
10156
10156
  },
10157
10157
  {
10158
- ref: `${AT$2}/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`,
10158
+ ref: `${AT$3}/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`,
10159
10159
  rung: "implemented"
10160
10160
  },
10161
10161
  {
10162
- ref: `${AT$2}/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`,
10162
+ ref: `${AT$3}/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`,
10163
10163
  rung: "implemented"
10164
10164
  },
10165
10165
  {
10166
- ref: `${AT$2}/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`,
10166
+ ref: `${AT$3}/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`,
10167
10167
  rung: "implemented"
10168
10168
  },
10169
10169
  {
10170
- ref: `${AT$2}/backend/tcop/postgres.c:4446-4502 an ERROR: disable_all_timeouts, the error to the client, AbortCurrentTransaction; :4562-4563 then ReadyForQuery`,
10170
+ ref: `${AT$3}/backend/tcop/postgres.c:4446-4502 an ERROR: disable_all_timeouts, the error to the client, AbortCurrentTransaction; :4562-4563 then ReadyForQuery`,
10171
10171
  rung: "implemented"
10172
10172
  },
10173
10173
  {
10174
- ref: `${AT$2}/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`,
10174
+ ref: `${AT$3}/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`,
10175
10175
  rung: "implemented"
10176
10176
  },
10177
10177
  {
10178
- ref: `${AT$2}/backend/storage/lmgr/proc.c:1292-1307 ProcSleep arms lock_timeout with the deadlock timer, :1652-1666 and disarms it after the wait`,
10178
+ ref: `${AT$3}/backend/storage/lmgr/proc.c:1292-1307 ProcSleep arms lock_timeout with the deadlock timer, :1652-1666 and disarms it after the wait`,
10179
10179
  rung: "implemented"
10180
10180
  },
10181
10181
  {
10182
- ref: `${AT$2}/backend/tcop/postgres.c:3652-3661 a client_connection_check_interval above 0 needs a wait set that reports a close`,
10182
+ ref: `${AT$3}/backend/tcop/postgres.c:3652-3661 a client_connection_check_interval above 0 needs a wait set that reports a close`,
10183
10183
  rung: "implemented"
10184
10184
  },
10185
10185
  {
10186
- ref: `${AT$2}/backend/libpq/pqcomm.c:2049-2084 pq_check_connection: a wait of 0 ms for WL_SOCKET_CLOSED`,
10186
+ ref: `${AT$3}/backend/libpq/pqcomm.c:2049-2084 pq_check_connection: a wait of 0 ms for WL_SOCKET_CLOSED`,
10187
10187
  rung: "implemented"
10188
10188
  },
10189
10189
  {
10190
- ref: `${AT$2}/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`,
10190
+ ref: `${AT$3}/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`,
10191
10191
  rung: "implemented"
10192
10192
  },
10193
10193
  {
10194
- ref: `${AT$2}/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`,
10194
+ ref: `${AT$3}/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`,
10195
10195
  rung: "implemented"
10196
10196
  },
10197
10197
  {
10198
- ref: `${AT$2}/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`,
10198
+ ref: `${AT$3}/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`,
10199
10199
  rung: "implemented"
10200
10200
  },
10201
10201
  {
10202
- ref: `${AT$2}/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"`,
10202
+ ref: `${AT$3}/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"`,
10203
10203
  rung: "implemented"
10204
10204
  },
10205
10205
  {
10206
- ref: `${AT$2}/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)`,
10206
+ ref: `${AT$3}/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)`,
10207
10207
  rung: "implemented"
10208
10208
  },
10209
10209
  {
10210
- ref: `${AT$2}/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`,
10210
+ ref: `${AT$3}/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`,
10211
10211
  rung: "implemented"
10212
10212
  },
10213
10213
  {
10214
- ref: `${AT$2}/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`,
10214
+ ref: `${AT$3}/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`,
10215
10215
  rung: "implemented"
10216
10216
  },
10217
10217
  {
10218
- ref: `${AT$2}/backend/tcop/postgres.c:4310-4316 the backend ignores SIGPIPE`,
10218
+ ref: `${AT$3}/backend/tcop/postgres.c:4310-4316 the backend ignores SIGPIPE`,
10219
10219
  rung: "implemented"
10220
10220
  },
10221
10221
  {
10222
- ref: `${AT$2}/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`,
10222
+ ref: `${AT$3}/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`,
10223
10223
  rung: "implemented"
10224
10224
  },
10225
10225
  {
10226
- ref: `${AT$2}/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)`,
10226
+ ref: `${AT$3}/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)`,
10227
10227
  rung: "implemented"
10228
10228
  },
10229
10229
  {
10230
- ref: `${AT$2}/backend/libpq/pqcomm.c:347-392 socket_close keeps the socket open until the process exits`,
10230
+ ref: `${AT$3}/backend/libpq/pqcomm.c:347-392 socket_close keeps the socket open until the process exits`,
10231
10231
  rung: "implemented"
10232
10232
  },
10233
10233
  {
10234
- ref: `${AT$2}/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`,
10234
+ ref: `${AT$3}/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`,
10235
10235
  rung: "implemented"
10236
10236
  },
10237
10237
  {
10238
- ref: `${AT$2}/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)`,
10238
+ ref: `${AT$3}/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)`,
10239
10239
  rung: "implemented"
10240
10240
  },
10241
10241
  {
10242
- ref: `${AT$2}/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`,
10242
+ ref: `${AT$3}/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`,
10243
10243
  rung: "implemented"
10244
10244
  },
10245
10245
  {
10246
- ref: `${AT$2}/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`,
10246
+ ref: `${AT$3}/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`,
10247
10247
  rung: "implemented"
10248
10248
  },
10249
10249
  {
@@ -12271,6 +12271,818 @@ const PROCEDURES_WS_SERVER = machineSchema.parse({
12271
12271
  }
12272
12272
  });
12273
12273
  //#endregion
12274
+ //#region src/proxy/envoy.ts
12275
+ const AT$2 = "envoy v1.39.4";
12276
+ /**
12277
+ * This document is Envoy 1.39.4 as an HTTP/2 proxy of gRPC, for one connection of a client. Its static
12278
+ * configuration is the one of the harness. It has one listener with the HTTP connection manager, one
12279
+ * route with no timeout of its own, and one cluster of h2c. Each other field is at its default.
12280
+ *
12281
+ * Envoy answers a failure of its upstream itself. Before the headers of the response, it sends a local
12282
+ * reply: a gRPC response of trailers only, with a status from the HTTP code (503 and 504 give UNAVAILABLE).
12283
+ * After the headers, it resets the stream with INTERNAL_ERROR. It retries no call at the defaults. The
12284
+ * route ends each call 15 s after the end of its request. Envoy sets no keepalive of HTTP/2 or of TCP. At
12285
+ * SIGTERM it closes each connection with no GOAWAY.
12286
+ */
12287
+ const ENVOY_HTTP2 = machineSchema.parse({
12288
+ format: "mark1russell7.machine/1",
12289
+ id: "envoy-http2",
12290
+ title: "Envoy 1.39.4 as an HTTP/2 proxy of gRPC: one connection of a client, its streams to one cluster, the local replies and the close",
12291
+ layer: "proxy",
12292
+ version: "1.39.4",
12293
+ conditions: {
12294
+ envoy: "v1.39.4",
12295
+ codec: "nghttp2 1.66.0",
12296
+ configuration: "one listener with the HTTP connection manager and the router, one route with no timeout, retry or max_stream_duration, and one STATIC cluster with http2_protocol_options"
12297
+ },
12298
+ sources: [
12299
+ {
12300
+ ref: `${AT$2} source/common/runtime/runtime_features.cc:274-276 the codec of HTTP/2 is nghttp2: http2_use_oghttp2 is false`,
12301
+ rung: "implemented"
12302
+ },
12303
+ {
12304
+ ref: `${AT$2} 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`,
12305
+ rung: "implemented"
12306
+ },
12307
+ {
12308
+ ref: `${AT$2} 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`,
12309
+ rung: "implemented"
12310
+ },
12311
+ {
12312
+ ref: `${AT$2} 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`,
12313
+ rung: "implemented"
12314
+ },
12315
+ {
12316
+ ref: `${AT$2} 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`,
12317
+ rung: "implemented"
12318
+ },
12319
+ {
12320
+ ref: `${AT$2} 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)`,
12321
+ rung: "implemented"
12322
+ },
12323
+ {
12324
+ ref: `${AT$2} 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`,
12325
+ rung: "implemented"
12326
+ },
12327
+ {
12328
+ ref: `${AT$2} 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"`,
12329
+ rung: "implemented"
12330
+ },
12331
+ {
12332
+ ref: `${AT$2} 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`,
12333
+ rung: "implemented"
12334
+ },
12335
+ {
12336
+ ref: `${AT$2} 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`,
12337
+ rung: "implemented"
12338
+ },
12339
+ {
12340
+ ref: `${AT$2} 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`,
12341
+ rung: "implemented"
12342
+ },
12343
+ {
12344
+ ref: `${AT$2} 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`,
12345
+ rung: "implemented"
12346
+ },
12347
+ {
12348
+ ref: `${AT$2} 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`,
12349
+ rung: "implemented"
12350
+ },
12351
+ {
12352
+ ref: `${AT$2} 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`,
12353
+ rung: "implemented"
12354
+ },
12355
+ {
12356
+ ref: `${AT$2} 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`,
12357
+ rung: "implemented"
12358
+ },
12359
+ {
12360
+ ref: `${AT$2} 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`,
12361
+ rung: "implemented"
12362
+ }
12363
+ ],
12364
+ states: {
12365
+ "[none]": {
12366
+ initial: true,
12367
+ pseudo: true,
12368
+ note: "Before the accept of the connection of the client"
12369
+ },
12370
+ idle: { note: "The connection of the client, with no stream open. The idle timer of the connection runs" },
12371
+ active: { note: "A stream of the client is open: its request goes to the cluster" },
12372
+ draining: { note: "After the GOAWAY notice of an idle connection, until its final GOAWAY" },
12373
+ ended: {
12374
+ final: true,
12375
+ note: "The connection of the client closed"
12376
+ }
12377
+ },
12378
+ events: {
12379
+ "local.accept": {
12380
+ kind: "local",
12381
+ note: "The listener accepts the connection of the client"
12382
+ },
12383
+ "rx.headers": {
12384
+ kind: "rx",
12385
+ note: "The headers of a new stream of the client: a call"
12386
+ },
12387
+ "rx.request-end": {
12388
+ kind: "rx",
12389
+ note: "The end of the request of the stream (END_STREAM): a unary call sends it at once"
12390
+ },
12391
+ "rx.frame": {
12392
+ kind: "rx",
12393
+ note: "Any frame of the stream, in either direction"
12394
+ },
12395
+ "upstream.connect-timeout": {
12396
+ kind: "local",
12397
+ note: "The connect to the cluster does not complete in connect_timeout"
12398
+ },
12399
+ "upstream.headers": {
12400
+ kind: "local",
12401
+ note: "The headers of the response of the upstream go to the client"
12402
+ },
12403
+ "upstream.end": {
12404
+ kind: "local",
12405
+ note: "The response of the upstream ends with its status: the stream closes"
12406
+ },
12407
+ "upstream.reset": {
12408
+ kind: "local",
12409
+ note: "The upstream connection ends with a reset or an end of file while the stream waits: ConnectionTermination"
12410
+ },
12411
+ "timer.route": {
12412
+ kind: "timer",
12413
+ note: "The timeout of the route ends after the end of the request"
12414
+ },
12415
+ "timer.stream-idle": {
12416
+ kind: "timer",
12417
+ note: "No frame of the stream for stream_idle_timeout"
12418
+ },
12419
+ "timer.idle": {
12420
+ kind: "timer",
12421
+ note: "No stream open for idle_timeout"
12422
+ },
12423
+ "timer.drain": {
12424
+ kind: "timer",
12425
+ note: "drain_timeout after the GOAWAY notice"
12426
+ },
12427
+ "app.stop": {
12428
+ kind: "app",
12429
+ note: "SIGTERM or SIGINT to the process of Envoy"
12430
+ },
12431
+ "peer.fin": {
12432
+ kind: "peer",
12433
+ note: "The client ends the connection"
12434
+ },
12435
+ "peer.rst": {
12436
+ kind: "peer",
12437
+ note: "A reset of the connection of the client"
12438
+ },
12439
+ "tx.local-reply": {
12440
+ kind: "tx",
12441
+ note: "A response of trailers only with the gRPC status of the HTTP code, before the headers of a response"
12442
+ },
12443
+ "tx.rst-stream": {
12444
+ kind: "tx",
12445
+ note: "RST_STREAM INTERNAL_ERROR of a stream whose response headers went out"
12446
+ },
12447
+ "tx.goaway": {
12448
+ kind: "tx",
12449
+ note: "A GOAWAY NO_ERROR to the client"
12450
+ },
12451
+ "tx.fin": {
12452
+ kind: "tx",
12453
+ note: "The close of the connection of the client: a FIN"
12454
+ }
12455
+ },
12456
+ knobs: {
12457
+ route_timeout: {
12458
+ key: "RouteAction.timeout",
12459
+ scope: "server",
12460
+ unit: "s",
12461
+ default: 15,
12462
+ off: 0,
12463
+ note: "config_impl.h:976: 15 s. 0 turns it off"
12464
+ },
12465
+ stream_idle_timeout: {
12466
+ key: "HttpConnectionManager.stream_idle_timeout",
12467
+ scope: "server",
12468
+ unit: "s",
12469
+ default: 300,
12470
+ off: 0,
12471
+ note: "config.h:372-373: 5 min"
12472
+ },
12473
+ idle_timeout: {
12474
+ key: "HttpConnectionManager.common_http_protocol_options.idle_timeout",
12475
+ scope: "server",
12476
+ unit: "s",
12477
+ default: 3600,
12478
+ off: 0,
12479
+ note: "config.cc:488-492: 1 h"
12480
+ },
12481
+ drain_timeout: {
12482
+ key: "HttpConnectionManager.drain_timeout",
12483
+ scope: "server",
12484
+ unit: "s",
12485
+ default: 5,
12486
+ note: "config.cc:411: 5000 ms"
12487
+ },
12488
+ connect_timeout: {
12489
+ key: "Cluster.connect_timeout",
12490
+ scope: "server",
12491
+ unit: "s",
12492
+ default: 5,
12493
+ note: "upstream_impl.cc:1206-1207: 5 s"
12494
+ },
12495
+ slack: {
12496
+ key: "the lateness of the event loop of a worker of Envoy for one step",
12497
+ scope: "process",
12498
+ unit: "s",
12499
+ default: .01,
12500
+ note: "An assumption of this document, not a value of Envoy"
12501
+ },
12502
+ hz: {
12503
+ key: "CONFIG_HZ",
12504
+ scope: "global",
12505
+ unit: "Hz",
12506
+ default: null,
12507
+ note: "The build option of the kernel"
12508
+ }
12509
+ },
12510
+ timers: {
12511
+ route: {
12512
+ duration: {
12513
+ knob: "route_timeout",
12514
+ unit: "s"
12515
+ },
12516
+ lateness: {
12517
+ knob: "slack",
12518
+ unit: "s"
12519
+ },
12520
+ arms: ["rx.request-end"],
12521
+ cancels: [
12522
+ "upstream.end",
12523
+ "upstream.reset",
12524
+ "peer.rst",
12525
+ "peer.fin"
12526
+ ],
12527
+ fires: "timer.route",
12528
+ note: "router.cc:1309-1331: from the end of the request. A stream that does not end its request never starts it"
12529
+ },
12530
+ stream_idle: {
12531
+ duration: {
12532
+ knob: "stream_idle_timeout",
12533
+ unit: "s"
12534
+ },
12535
+ lateness: {
12536
+ knob: "slack",
12537
+ unit: "s"
12538
+ },
12539
+ arms: ["rx.headers", "rx.frame"],
12540
+ cancels: [
12541
+ "upstream.end",
12542
+ "upstream.reset",
12543
+ "peer.rst",
12544
+ "peer.fin"
12545
+ ],
12546
+ fires: "timer.stream-idle",
12547
+ note: "cm.cc:968-974: each frame of the stream arms it again"
12548
+ },
12549
+ idle: {
12550
+ duration: {
12551
+ knob: "idle_timeout",
12552
+ unit: "s"
12553
+ },
12554
+ lateness: {
12555
+ knob: "slack",
12556
+ unit: "s"
12557
+ },
12558
+ arms: ["enter:idle"],
12559
+ cancels: ["rx.headers"],
12560
+ fires: "timer.idle",
12561
+ note: "cm.cc:207-212, :398-400: only with no stream open. A PING does not arm it again"
12562
+ },
12563
+ drain: {
12564
+ duration: {
12565
+ knob: "drain_timeout",
12566
+ unit: "s"
12567
+ },
12568
+ lateness: {
12569
+ knob: "slack",
12570
+ unit: "s"
12571
+ },
12572
+ arms: ["timer.idle"],
12573
+ fires: "timer.drain",
12574
+ note: "cm.cc:1699-1705: from the GOAWAY notice"
12575
+ }
12576
+ },
12577
+ transitions: [
12578
+ {
12579
+ id: "env.accept",
12580
+ from: "[none]",
12581
+ to: "idle",
12582
+ on: "local.accept",
12583
+ timer: "idle",
12584
+ source: "source/common/listener_manager/active_tcp_listener.cc"
12585
+ },
12586
+ {
12587
+ id: "env.stream",
12588
+ from: "idle",
12589
+ to: "active",
12590
+ on: "rx.headers",
12591
+ timer: "stream_idle",
12592
+ source: "cm.cc:968-974"
12593
+ },
12594
+ {
12595
+ id: "env.request-end",
12596
+ from: "active",
12597
+ to: "active",
12598
+ on: "rx.request-end",
12599
+ timer: "route",
12600
+ source: "router.cc:1309-1331"
12601
+ },
12602
+ {
12603
+ id: "env.replied",
12604
+ from: "active",
12605
+ to: "idle",
12606
+ on: "upstream.end",
12607
+ note: "The status of the upstream passes to the client unchanged",
12608
+ source: "router.cc"
12609
+ },
12610
+ {
12611
+ id: "env.upstream-reset",
12612
+ from: "active",
12613
+ to: "idle",
12614
+ on: "upstream.reset",
12615
+ guard: "no headers of the response went to the client",
12616
+ errno: "UNAVAILABLE",
12617
+ emits: ["tx.local-reply"],
12618
+ note: "503 upstream connect error or disconnect/reset before headers. reset reason: connection termination, as trailers only with grpc-status 14. No retry",
12619
+ source: "codec_client.cc:124-144, router.cc:1574-1581, :1681-1712"
12620
+ },
12621
+ {
12622
+ id: "env.upstream-reset-streaming",
12623
+ from: "active",
12624
+ to: "idle",
12625
+ on: "upstream.reset",
12626
+ guard: "the headers of the response went to the client",
12627
+ errno: "INTERNAL",
12628
+ emits: ["tx.rst-stream"],
12629
+ source: "filter_manager.cc:1120-1127, cm.cc:301-313"
12630
+ },
12631
+ {
12632
+ id: "env.route-timeout",
12633
+ from: "active",
12634
+ to: "idle",
12635
+ on: "timer.route",
12636
+ timer: "route",
12637
+ errno: "UNAVAILABLE",
12638
+ emits: ["tx.local-reply"],
12639
+ note: "504 upstream request timeout. The upstream stream is reset",
12640
+ source: "router.cc:1530-1572"
12641
+ },
12642
+ {
12643
+ id: "env.stream-idle",
12644
+ from: "active",
12645
+ to: "idle",
12646
+ on: "timer.stream-idle",
12647
+ timer: "stream_idle",
12648
+ errno: "UNAVAILABLE",
12649
+ emits: ["tx.local-reply"],
12650
+ note: "504 stream timeout for a request that is complete. A request that is still open gets 408, thus UNKNOWN",
12651
+ source: "cm.cc:1052-1069, hutil.cc:1535-1540"
12652
+ },
12653
+ {
12654
+ id: "env.connect-timeout",
12655
+ from: "active",
12656
+ to: "idle",
12657
+ on: "upstream.connect-timeout",
12658
+ errno: "UNAVAILABLE",
12659
+ emits: ["tx.local-reply"],
12660
+ note: "503 with the reset reason connection timeout",
12661
+ source: "upstream_impl.cc:1206-1207, router.cc:1681-1712"
12662
+ },
12663
+ {
12664
+ id: "env.idle",
12665
+ from: "idle",
12666
+ to: "draining",
12667
+ on: "timer.idle",
12668
+ timer: "idle",
12669
+ emits: ["tx.goaway"],
12670
+ note: "The GOAWAY notice: last-stream-id 2^31 − 1",
12671
+ source: "cm.cc:1699-1705, h2.cc:1176-1193"
12672
+ },
12673
+ {
12674
+ id: "env.drained",
12675
+ from: "draining",
12676
+ to: "ended",
12677
+ on: "timer.drain",
12678
+ timer: "drain",
12679
+ emits: ["tx.goaway", "tx.fin"],
12680
+ source: "cm.cc:819-824"
12681
+ },
12682
+ {
12683
+ id: "env.stop",
12684
+ from: [
12685
+ "idle",
12686
+ "active",
12687
+ "draining"
12688
+ ],
12689
+ to: "ended",
12690
+ on: "app.stop",
12691
+ emits: ["tx.fin"],
12692
+ note: "No GOAWAY: the close of a connection with NoFlush. A call in flight ends with the close",
12693
+ source: "server.cc:1005-1014, active_tcp_listener.cc:54-63"
12694
+ },
12695
+ {
12696
+ id: "env.client-end",
12697
+ from: [
12698
+ "idle",
12699
+ "active",
12700
+ "draining"
12701
+ ],
12702
+ to: "ended",
12703
+ on: ["peer.fin", "peer.rst"],
12704
+ source: "source/common/network/connection_impl.cc:804-819"
12705
+ }
12706
+ ],
12707
+ over: {
12708
+ machine: "systems.machine.linux-tcp",
12709
+ states: {
12710
+ idle: "ESTABLISHED",
12711
+ active: "ESTABLISHED",
12712
+ draining: "ESTABLISHED"
12713
+ },
12714
+ sets: {},
12715
+ ends: "peer.rst",
12716
+ note: "The socket toward the client: a Linux TCP socket with TCP_NODELAY and no keepalive. The socket toward the cluster is the same"
12717
+ }
12718
+ });
12719
+ //#endregion
12720
+ //#region src/proxy/tcp-proxies.ts
12721
+ const TOXI = "toxiproxy v2.12.0";
12722
+ const MOBY = "moby docker-v29.1.5";
12723
+ /** These are the facts of Go that both proxies share: the TCP keepalive of a socket that the caller does not set. */
12724
+ const GO_KEEPALIVE = [
12725
+ {
12726
+ ref: "go1.23.0 and go1.25.6 src/net/dial.go:19-26 the defaults of the TCP keepalive: 15 s idle, 15 s between probes, 9 probes",
12727
+ rung: "implemented"
12728
+ },
12729
+ {
12730
+ ref: "go1.23.0 and go1.25.6 src/net/tcpsock_posix.go:121, :158-164 and tcpsock.go:289-305 an accepted and a dialed connection get the KeepAlive of a zero ListenConfig or Dialer: on, with the defaults",
12731
+ rung: "implemented"
12732
+ },
12733
+ {
12734
+ ref: "linux v6.6 net/ipv4/tcp.c:2781-2807 the close of a socket with unread bytes in its receive queue sends a reset, and else a FIN",
12735
+ rung: "implemented"
12736
+ }
12737
+ ];
12738
+ /** These are the knobs of the TCP keepalive of Go, which each socket of the two proxies gets. */
12739
+ const GO_KNOBS = {
12740
+ keepidle: {
12741
+ key: "the TCP keepalive idle of Go",
12742
+ scope: "process",
12743
+ unit: "s",
12744
+ default: 15,
12745
+ note: "dial.go:23: no caller sets it"
12746
+ },
12747
+ keepintvl: {
12748
+ key: "the TCP keepalive interval of Go",
12749
+ scope: "process",
12750
+ unit: "s",
12751
+ default: 15,
12752
+ note: "dial.go:24"
12753
+ },
12754
+ keepcnt: {
12755
+ key: "the TCP keepalive count of Go",
12756
+ scope: "process",
12757
+ unit: "count",
12758
+ default: 9,
12759
+ note: "dial.go:26"
12760
+ },
12761
+ slack: {
12762
+ key: "the lateness of the scheduler of Go for one copy",
12763
+ scope: "process",
12764
+ unit: "s",
12765
+ default: .01,
12766
+ note: "An assumption of this document, not a value of the proxy"
12767
+ },
12768
+ hz: {
12769
+ key: "CONFIG_HZ",
12770
+ scope: "global",
12771
+ unit: "Hz",
12772
+ default: null,
12773
+ note: "The build option of the kernel"
12774
+ }
12775
+ };
12776
+ /** These are the events of a proxied connection: one socket toward the client, and one toward the upstream. */
12777
+ const EVENTS = {
12778
+ "local.accept": {
12779
+ kind: "local",
12780
+ note: "The listener accepts a connection of the client"
12781
+ },
12782
+ "local.dialed": {
12783
+ kind: "local",
12784
+ note: "The connect to the upstream completes"
12785
+ },
12786
+ "local.dial-failed": {
12787
+ kind: "local",
12788
+ note: "The connect to the upstream fails"
12789
+ },
12790
+ "peer.client-fin": {
12791
+ kind: "peer",
12792
+ note: "The client ends its side: an end of file for the proxy"
12793
+ },
12794
+ "peer.upstream-fin": {
12795
+ kind: "peer",
12796
+ note: "The upstream ends its side: an end of file for the proxy"
12797
+ },
12798
+ "peer.client-rst": {
12799
+ kind: "peer",
12800
+ note: "A reset of the socket toward the client: its read fails with ECONNRESET"
12801
+ },
12802
+ "peer.upstream-rst": {
12803
+ kind: "peer",
12804
+ note: "A reset of the socket toward the upstream: its read fails with ECONNRESET"
12805
+ },
12806
+ "app.stop": {
12807
+ kind: "app",
12808
+ note: "SIGINT or SIGTERM to the process of the proxy"
12809
+ },
12810
+ "tx.client-fin": {
12811
+ kind: "tx",
12812
+ note: "The proxy ends its side toward the client: a FIN, or a reset when bytes are unread"
12813
+ },
12814
+ "tx.upstream-fin": {
12815
+ kind: "tx",
12816
+ note: "The proxy ends its side toward the upstream: a FIN, or a reset when bytes are unread"
12817
+ }
12818
+ };
12819
+ /** This function gives the TCP socket under each side of a proxied connection: the keepalive of Go, and no other option. */
12820
+ const overOf = (states) => ({
12821
+ machine: "systems.machine.linux-tcp",
12822
+ states: Object.fromEntries(states.map((state) => [state, "ESTABLISHED"])),
12823
+ sets: {
12824
+ keepidle: {
12825
+ knob: "keepidle",
12826
+ unit: "s"
12827
+ },
12828
+ keepintvl: {
12829
+ knob: "keepintvl",
12830
+ unit: "s"
12831
+ },
12832
+ keepcnt: {
12833
+ knob: "keepcnt",
12834
+ unit: "count"
12835
+ }
12836
+ },
12837
+ ends: "peer.client-rst",
12838
+ note: "Each socket of the proxy, toward the client and toward the upstream: a Linux TCP socket with the keepalive of Go. A peer that is gone ends it at 15 + 9 × 15 = 150 s"
12839
+ });
12840
+ /**
12841
+ * This document is one proxied connection of Toxiproxy 2.12.0, with no toxic. Toxiproxy copies TCP, and it
12842
+ * knows no protocol above it. It has no timer on a link. Each socket gets the TCP keepalive of Go. It has
12843
+ * no half-close: an end of file or an error on either side closes both sockets. A stop of the process
12844
+ * shuts down only the HTTP API, and the exit of the process then closes each socket.
12845
+ */
12846
+ const TOXIPROXY_LINK = machineSchema.parse({
12847
+ format: "mark1russell7.machine/1",
12848
+ id: "toxiproxy-link",
12849
+ title: "Toxiproxy 2.12.0 with no toxic: one proxied TCP connection, its two links and its close",
12850
+ layer: "proxy",
12851
+ version: "2.12.0",
12852
+ conditions: {
12853
+ toxiproxy: "v2.12.0",
12854
+ go: "1.23.0 or later",
12855
+ proxy: "one proxy from the configuration file, with no toxic"
12856
+ },
12857
+ sources: [
12858
+ {
12859
+ ref: `${TOXI} proxy.go:113, :183, :206, :221-222 the listener, the accept, the dial of the upstream in the loop of the accepts, and the two links`,
12860
+ rung: "implemented"
12861
+ },
12862
+ {
12863
+ ref: `${TOXI} proxy.go:182-214 the dial has no timeout of its own. While it waits, the loop accepts no other client. A failed dial closes the client`,
12864
+ rung: "implemented"
12865
+ },
12866
+ {
12867
+ ref: `${TOXI} toxic_collection.go:30-44 and toxics/noop.go:6-18 each direction starts with the noop toxic, which copies each chunk and closes its output when its input closes`,
12868
+ rung: "implemented"
12869
+ },
12870
+ {
12871
+ ref: `${TOXI} link.go:116-168 a link copies with io.Copy and no deadline. At an end of file or an error of its source, it closes its input. Its writer then calls Close on its destination: a full close, with no CloseWrite`,
12872
+ rung: "implemented"
12873
+ },
12874
+ {
12875
+ ref: `${TOXI} link.go:95-107 only the toxic reset_peer sets SO_LINGER(0), thus with no toxic the proxy sends no reset on purpose`,
12876
+ rung: "implemented"
12877
+ },
12878
+ {
12879
+ ref: `${TOXI} cmd/server/server.go:53-60, :101-109 and api.go:75-88 SIGINT and SIGTERM shut down the HTTP API, and the process exits. The proxies and their links do not close first`,
12880
+ rung: "implemented"
12881
+ },
12882
+ ...GO_KEEPALIVE
12883
+ ],
12884
+ states: {
12885
+ "[none]": {
12886
+ initial: true,
12887
+ pseudo: true,
12888
+ note: "Before the accept of the client"
12889
+ },
12890
+ dialing: { note: "The accepted client, while the proxy dials the upstream in its loop of accepts" },
12891
+ linked: { note: "Both links copy: the client to the upstream, and the upstream to the client" },
12892
+ ended: {
12893
+ final: true,
12894
+ note: "Both sockets closed"
12895
+ }
12896
+ },
12897
+ events: EVENTS,
12898
+ knobs: GO_KNOBS,
12899
+ timers: {},
12900
+ transitions: [
12901
+ {
12902
+ id: "tl.accept",
12903
+ from: "[none]",
12904
+ to: "dialing",
12905
+ on: "local.accept",
12906
+ source: "proxy.go:183-206"
12907
+ },
12908
+ {
12909
+ id: "tl.dialed",
12910
+ from: "dialing",
12911
+ to: "linked",
12912
+ on: "local.dialed",
12913
+ source: "proxy.go:206, :221-222"
12914
+ },
12915
+ {
12916
+ id: "tl.dial-failed",
12917
+ from: "dialing",
12918
+ to: "ended",
12919
+ on: "local.dial-failed",
12920
+ emits: ["tx.client-fin"],
12921
+ note: "The client is closed. Its unread preface makes that close a reset",
12922
+ source: "proxy.go:206-214"
12923
+ },
12924
+ {
12925
+ id: "tl.upstream-end",
12926
+ from: "linked",
12927
+ to: "ended",
12928
+ on: ["peer.upstream-fin", "peer.upstream-rst"],
12929
+ emits: ["tx.client-fin", "tx.upstream-fin"],
12930
+ note: "The link from the upstream ends. Its writer closes the client after the bytes it holds. The read of the other link then fails, and it closes the upstream: no half-close",
12931
+ source: "link.go:122-133, :152-163, toxics/noop.go:11-14"
12932
+ },
12933
+ {
12934
+ id: "tl.client-end",
12935
+ from: "linked",
12936
+ to: "ended",
12937
+ on: ["peer.client-fin", "peer.client-rst"],
12938
+ emits: ["tx.upstream-fin", "tx.client-fin"],
12939
+ note: "The same close from the side of the client: the upstream gets a full close",
12940
+ source: "link.go:122-133, :152-163"
12941
+ },
12942
+ {
12943
+ id: "tl.stop",
12944
+ from: ["dialing", "linked"],
12945
+ to: "ended",
12946
+ on: "app.stop",
12947
+ emits: ["tx.client-fin", "tx.upstream-fin"],
12948
+ note: "The process exits after the shutdown of its HTTP API, and the kernel closes each socket: a FIN, or a reset when bytes are unread",
12949
+ source: "cmd/server/server.go:101-109, api.go:75-88"
12950
+ }
12951
+ ],
12952
+ over: overOf(["linked"])
12953
+ });
12954
+ /**
12955
+ * This document is one proxied connection of docker-proxy, the userland proxy of Docker Engine 29.1.5. It
12956
+ * copies TCP with two goroutines and knows no protocol above it. It has no timer. Each socket gets the
12957
+ * TCP keepalive of Go. An end of file of one side passes as a half-close. A reset of one side becomes a
12958
+ * FIN toward the other side. A stop of the process, which Docker sends at a stop or a restart of the
12959
+ * container, closes each connection fully.
12960
+ */
12961
+ const DOCKER_PROXY_LINK = machineSchema.parse({
12962
+ format: "mark1russell7.machine/1",
12963
+ id: "docker-proxy-link",
12964
+ title: "docker-proxy of Docker Engine 29.1.5: one proxied TCP connection, its two copies and its close",
12965
+ layer: "proxy",
12966
+ version: "29.1.5",
12967
+ conditions: {
12968
+ docker: "Engine 29.1.5",
12969
+ go: "1.25.6",
12970
+ proxy: "one TCP port binding, as dockerd starts it for a published port"
12971
+ },
12972
+ sources: [
12973
+ {
12974
+ ref: `${MOBY} cmd/docker-proxy/tcp_proxy_linux.go:27-77 the whole TCP path: the accept, net.DialTCP to the container, and two io.Copy goroutines. No deadline and no timer`,
12975
+ rung: "implemented"
12976
+ },
12977
+ {
12978
+ ref: `${MOBY} cmd/docker-proxy/tcp_proxy_linux.go:36-41 at the end of one copy, CloseRead of its source and CloseWrite of its destination: a FIN passes as a half-close, and a reset of the source becomes a FIN`,
12979
+ rung: "implemented"
12980
+ },
12981
+ {
12982
+ ref: `${MOBY} cmd/docker-proxy/tcp_proxy_linux.go:28-33 a failed dial closes the client at once`,
12983
+ rung: "implemented"
12984
+ },
12985
+ {
12986
+ ref: `${MOBY} cmd/docker-proxy/main_linux.go:188-197 SIGINT and SIGTERM close the listener, and the process exits`,
12987
+ rung: "implemented"
12988
+ },
12989
+ {
12990
+ ref: `${MOBY} daemon/libnetwork/portmapper/proxy_linux.go:133-143 dockerd stops a proxy with SIGINT when it removes its port binding: at a stop or a restart of the container`,
12991
+ rung: "implemented"
12992
+ },
12993
+ {
12994
+ ref: `${MOBY} daemon/command/config_unix.go:39 the userland proxy is on at the defaults, for the traffic to a published port on the loopback of the host`,
12995
+ rung: "implemented"
12996
+ },
12997
+ ...GO_KEEPALIVE
12998
+ ],
12999
+ states: {
13000
+ "[none]": {
13001
+ initial: true,
13002
+ pseudo: true,
13003
+ note: "Before the accept of the client"
13004
+ },
13005
+ dialing: { note: "The accepted client, while its goroutine dials the container" },
13006
+ linked: { note: "Both copies run" },
13007
+ "half-closed": { note: "One copy ended at an end of file or a reset. The other copy goes on" },
13008
+ ended: {
13009
+ final: true,
13010
+ note: "Both sockets closed"
13011
+ }
13012
+ },
13013
+ events: EVENTS,
13014
+ knobs: GO_KNOBS,
13015
+ timers: {},
13016
+ transitions: [
13017
+ {
13018
+ id: "dp.accept",
13019
+ from: "[none]",
13020
+ to: "dialing",
13021
+ on: "local.accept",
13022
+ source: "tcp_proxy_linux.go:63-73"
13023
+ },
13024
+ {
13025
+ id: "dp.dialed",
13026
+ from: "dialing",
13027
+ to: "linked",
13028
+ on: "local.dialed",
13029
+ source: "tcp_proxy_linux.go:28-35"
13030
+ },
13031
+ {
13032
+ id: "dp.dial-failed",
13033
+ from: "dialing",
13034
+ to: "ended",
13035
+ on: "local.dial-failed",
13036
+ emits: ["tx.client-fin"],
13037
+ source: "tcp_proxy_linux.go:28-33"
13038
+ },
13039
+ {
13040
+ id: "dp.upstream-end",
13041
+ from: "linked",
13042
+ to: "half-closed",
13043
+ on: ["peer.upstream-fin", "peer.upstream-rst"],
13044
+ emits: ["tx.client-fin"],
13045
+ note: "The copy from the upstream ends, and CloseWrite sends a FIN to the client. A reset of the upstream also gives the client a FIN, not a reset",
13046
+ source: "tcp_proxy_linux.go:36-41"
13047
+ },
13048
+ {
13049
+ id: "dp.client-end",
13050
+ from: "linked",
13051
+ to: "half-closed",
13052
+ on: ["peer.client-fin", "peer.client-rst"],
13053
+ emits: ["tx.upstream-fin"],
13054
+ source: "tcp_proxy_linux.go:36-41"
13055
+ },
13056
+ {
13057
+ id: "dp.both-ended",
13058
+ from: "half-closed",
13059
+ to: "ended",
13060
+ on: [
13061
+ "peer.client-fin",
13062
+ "peer.client-rst",
13063
+ "peer.upstream-fin",
13064
+ "peer.upstream-rst"
13065
+ ],
13066
+ note: "The other copy ends, and both sockets close",
13067
+ source: "tcp_proxy_linux.go:53-58"
13068
+ },
13069
+ {
13070
+ id: "dp.stop",
13071
+ from: [
13072
+ "dialing",
13073
+ "linked",
13074
+ "half-closed"
13075
+ ],
13076
+ to: "ended",
13077
+ on: "app.stop",
13078
+ emits: ["tx.client-fin", "tx.upstream-fin"],
13079
+ note: "The process exits at once, and the kernel closes each socket fully: a FIN, or a reset when bytes are unread",
13080
+ source: "main_linux.go:188-197"
13081
+ }
13082
+ ],
13083
+ over: overOf(["linked", "half-closed"])
13084
+ });
13085
+ //#endregion
12274
13086
  //#region src/rabbit/amqplib.ts
12275
13087
  const AT$1 = "amqplib 2.2.0 lib";
12276
13088
  /**
@@ -14339,9 +15151,12 @@ const MACHINES = byId([
14339
15151
  RA_MEMBER,
14340
15152
  GRPC_JS,
14341
15153
  GRPC_GO_SERVER,
14342
- ETCD_SERVER
15154
+ ETCD_SERVER,
15155
+ TOXIPROXY_LINK,
15156
+ DOCKER_PROXY_LINK,
15157
+ ENVOY_HTTP2
14343
15158
  ]);
14344
15159
  //#endregion
14345
- export { AMQPLIB, ATEN_DETECTOR, 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, 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, UNDICI_CLIENT, UNDICI_TICK_MS, goLateSeconds, goTimerLateness, nodeEarlySeconds, nodeLateSeconds, nodeTimerLateness, undiciFastEarly, undiciFastLateness };
15160
+ export { AMQPLIB, ATEN_DETECTOR, 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, 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, UNDICI_CLIENT, UNDICI_TICK_MS, goLateSeconds, goTimerLateness, nodeEarlySeconds, nodeLateSeconds, nodeTimerLateness, undiciFastEarly, undiciFastLateness };
14346
15161
 
14347
15162
  //# sourceMappingURL=index.js.map