Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

docs(agents): list every pre-gate-sync package; cap stress sockets on darwin only

Alfredo Lopez5c40ec6963ac
diff --git a/AGENTS.md b/AGENTS.md
index a3daca24c..1f886cd13 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -115,7 +115,7 @@ marker to the current worktree, rebuilds only the known affected image
selectors, and restarts only their deployments. A fresh profile, an explicit
forced sync, or an unmapped runtime path must fall back to the established
complete image build. A service-only update may use the targeted path when the
-profile is already healthy; record it as a *targeted sync* and prove the
+profile is already healthy; record it as a _targeted sync_ and prove the
affected deployment is Ready plus its user-facing health endpoint. Do not
report that as a full reconcile or as T2.
@@ -224,10 +224,13 @@ also exit zero; a green reporter cannot hide a teardown, worker, OOM, signal,
or partial-selection failure. Run the local Node/package/Docker preflight
before expensive T0 work. That preflight (`packages=2`) only checks host
`vitest`+`pg` in `control-api` and `gfs-controller`. `pre-gate-sync` later
-runs host `npm test` in each changed package (`external-rest-api`,
+runs host `npm test` in each changed package (`packages/workflow-runtime-core`,
+`packages/network-policy-core`, `control-api`, `external-rest-api`,
`rpc-proxy`, `mcp-host`, `host-context-controller`, `workflow-recipes`,
-`control-ui`, `desktop-app`, and the `packages/*` listed in the
-minikube-t0-t1-t2 skill). `sh: vitest: command not found` /
+`packages/workflow-sdk`, `workflow-approval-request-reader`, `control-ui`,
+and `desktop-app`; `gfs-controller` is not on that list, and the
+minikube-t0-t1-t2 skill `reference.md` carries the same list).
+`sh: vitest: command not found` /
`minikube-pre-gate-sync` Error 127 after planner PASS and Ready deployments
is a missing host `npm ci` in that directory — not GFS and not a license
for a new profile. Install every remaining pre-gate package, then re-enter
diff --git a/control-api/package-lock.json b/control-api/package-lock.json
index 817e575a9..9c880649c 100644
--- a/control-api/package-lock.json
+++ b/control-api/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-api",
- "version": "0.1.680",
+ "version": "0.1.681",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-api",
- "version": "0.1.680",
+ "version": "0.1.681",
"dependencies": {
"@clerum/display-field": "file:../packages/display-field",
"@clerum/grok-provider-attempt-contract": "file:../packages/grok-provider-attempt-contract",
diff --git a/control-api/package.json b/control-api/package.json
index ab5a7cfd6..2e64e8220 100644
--- a/control-api/package.json
+++ b/control-api/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-api",
- "version": "0.1.680",
+ "version": "0.1.681",
"description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets",
"main": "dist/main.js",
"engines": {
diff --git a/control-api/test/routes.externalGfsRateLimitStress.realPostgres.integration.test.ts b/control-api/test/routes.externalGfsRateLimitStress.realPostgres.integration.test.ts
index 255c1dc26..efdf4325b 100644
--- a/control-api/test/routes.externalGfsRateLimitStress.realPostgres.integration.test.ts
+++ b/control-api/test/routes.externalGfsRateLimitStress.realPostgres.integration.test.ts
@@ -84,8 +84,14 @@ const DESKTOP_READS_2026_09_18 = (
) as { offsetsMs: number[] }
).offsetsMs
-/** Open client sockets per scenario; under the 128-entry macOS listen backlog. */
-const MAX_CLIENT_SOCKETS = 64
+/**
+ * Client socket cap per scenario. macOS only: its listen backlog is limited by
+ * kern.ipc.somaxconn (128), so 481 simultaneous connects reset the overflow with
+ * ECONNRESET before any request reaches the limiter, and the cap stays under that
+ * backlog. Elsewhere (Linux CI) the agent is uncapped, so every scenario keeps its
+ * full request concurrency in flight.
+ */
+const MAX_CLIENT_SOCKETS = process.platform === 'darwin' ? 64 : Infinity
/** Every read class at `read`: for scenarios that exercise one read class. */
function uniformBudgets(read: number, operation: number, ip: number): Budgets {
@@ -277,10 +283,9 @@ describeRealPostgres('external GFS rate limits under concurrent load (real Postg
const server = http.createServer(app)
await new Promise<void>(resolve => server.listen(0, '127.0.0.1', resolve))
const { port } = server.address() as AddressInfo
- // The listen backlog is capped by the OS (kern.ipc.somaxconn is 128 on macOS), so
- // 481 simultaneous connects reset the overflow with ECONNRESET before any request
- // reaches the limiter. Bound the open sockets below that cap; the agent queues the
- // rest and the server still handles a full socket pool of requests concurrently.
+ // On macOS the agent is capped (see MAX_CLIENT_SOCKETS): it queues the requests
+ // beyond the cap, so up to 64 are in flight at once instead of all of them. On other
+ // platforms maxSockets is Infinity, the Node default, and every request is in flight.
const agent = new http.Agent({ keepAlive: true, maxSockets: MAX_CLIENT_SOCKETS })
if (openServer) throw new Error('a scenario server is already open')
openServer = {
@@ -763,7 +768,7 @@ describeRealPostgres('external GFS rate limits under concurrent load (real Postg
})
}, 120_000)
- it('E1: 481 concurrent reads by one actor at the production budget: 480 allowed, one Postgres 429, no 503', async () => {
+ it('E1: 481 reads issued together by one actor at the production budget: 480 allowed, one Postgres 429, no 503', async () => {
const budgets = PRODUCTION_BUDGETS
const { send } = await startScenario(budgets)
const userId = await seedUser()