From 97e80ef32650ff44d593e64b2305c9ffd8178afb Mon Sep 17 00:00:00 2001 From: paulo Date: Sun, 28 Jun 2026 14:57:57 -0300 Subject: [PATCH 1/3] test(redteam): add /api/slow probe for theo-cloud#107 (edge writeTimeout) --- server/routes/slow.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 server/routes/slow.ts diff --git a/server/routes/slow.ts b/server/routes/slow.ts new file mode 100644 index 0000000..3918677 --- /dev/null +++ b/server/routes/slow.ts @@ -0,0 +1,16 @@ +import { defineRoute } from 'theokit/server' + +/** + * RED TEAM probe for theo-cloud#107 (edge writeTimeout=60s on client apps). + * Holds the response open for 70s (no intermediate writes), then replies. + * If the Traefik edge writeTimeout=60s is in effect, the connection is cut + * at ~60s before this responds. If the app's edge tolerates long-lived + * responses, curl receives {ok:true,sleptMs:70000} after ~70s. + */ +export const GET = defineRoute({ + handler: async () => { + const sleptMs = 70000 + await new Promise((resolve) => setTimeout(resolve, sleptMs)) + return { ok: true, sleptMs, note: 'redteam-107-probe' } + }, +}) From 013e5ca017a1f01b04fa3850f40d1f7392266674 Mon Sep 17 00:00:00 2001 From: paulo Date: Sun, 28 Jun 2026 17:49:58 -0300 Subject: [PATCH 2/3] test(redteam): add real SSE endpoint /api/sse for theo-cloud#107 --- server/routes/sse.ts | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 server/routes/sse.ts diff --git a/server/routes/sse.ts b/server/routes/sse.ts new file mode 100644 index 0000000..15a8fc1 --- /dev/null +++ b/server/routes/sse.ts @@ -0,0 +1,33 @@ +import { defineRoute } from 'theokit/server' + +/** + * RED TEAM probe for theo-cloud#107 (edge writeTimeout vs SSE). + * A REAL Server-Sent Events stream: sends the text/event-stream header + + * an initial comment immediately, then stays idle for 70s (gap > 60s, no + * keep-alive) before the first data event. + * + * If the edge is SSE-aware (exempts text/event-stream from writeTimeout), + * curl stays connected past 60s and receives `data: {"tick":1}` at ~70s. + * If the edge still cuts at ~60s, #107 is NOT fixed for real SSE either. + */ +export const GET = defineRoute({ + handler: () => { + const enc = new TextEncoder() + const stream = new ReadableStream({ + start(controller) { + controller.enqueue(enc.encode(': sse-connected (redteam-107)\n\n')) + setTimeout(() => { + controller.enqueue(enc.encode('data: {"tick":1,"atSeconds":70}\n\n')) + controller.close() + }, 70000) + }, + }) + return new Response(stream, { + headers: { + 'content-type': 'text/event-stream', + 'cache-control': 'no-cache', + connection: 'keep-alive', + }, + }) + }, +}) From 22fe91ce526aa32eee46333c339082c2e3d3abd4 Mon Sep 17 00:00:00 2001 From: paulohenriquevn Date: Thu, 6 Aug 2026 15:48:13 -0300 Subject: [PATCH 3/3] chore: remove obsolete temporary files --- t-active-release-1781655385.txt | 1 - t-bash-trigger-1781650792.txt | 1 - t-cleanroom-argocd-token-1782173991.txt | 1 - t-cleanroom-final-1782175264.txt | 1 - t-cleanroom-retry-1782173129.txt | 1 - t-dash-shim-1781651231.txt | 1 - t-force-trigger-1781650298.txt | 1 - t-fresh-deploy-1781653429.txt | 1 - t-npm-start-1781654211.txt | 1 - t-start-extract-1781652369.txt | 1 - t-start-fix-1781652060.txt | 1 - t-subsh-fix-1781651619.txt | 1 - t-trigger-build-1781649273.txt | 1 - t-trigger-slim-1781650091.txt | 1 - t61-marker-1781648318.txt | 1 - t61-marker-1782170116.txt | 1 - 16 files changed, 16 deletions(-) delete mode 100644 t-active-release-1781655385.txt delete mode 100644 t-bash-trigger-1781650792.txt delete mode 100644 t-cleanroom-argocd-token-1782173991.txt delete mode 100644 t-cleanroom-final-1782175264.txt delete mode 100644 t-cleanroom-retry-1782173129.txt delete mode 100644 t-dash-shim-1781651231.txt delete mode 100644 t-force-trigger-1781650298.txt delete mode 100644 t-fresh-deploy-1781653429.txt delete mode 100644 t-npm-start-1781654211.txt delete mode 100644 t-start-extract-1781652369.txt delete mode 100644 t-start-fix-1781652060.txt delete mode 100644 t-subsh-fix-1781651619.txt delete mode 100644 t-trigger-build-1781649273.txt delete mode 100644 t-trigger-slim-1781650091.txt delete mode 100644 t61-marker-1781648318.txt delete mode 100644 t61-marker-1782170116.txt diff --git a/t-active-release-1781655385.txt b/t-active-release-1781655385.txt deleted file mode 100644 index 6f60056..0000000 --- a/t-active-release-1781655385.txt +++ /dev/null @@ -1 +0,0 @@ -1781655385 \ No newline at end of file diff --git a/t-bash-trigger-1781650792.txt b/t-bash-trigger-1781650792.txt deleted file mode 100644 index b8d7bb3..0000000 --- a/t-bash-trigger-1781650792.txt +++ /dev/null @@ -1 +0,0 @@ -bash 1781650792 \ No newline at end of file diff --git a/t-cleanroom-argocd-token-1782173991.txt b/t-cleanroom-argocd-token-1782173991.txt deleted file mode 100644 index 5946ca6..0000000 --- a/t-cleanroom-argocd-token-1782173991.txt +++ /dev/null @@ -1 +0,0 @@ -Tue Jun 23 12:19:51 AM UTC 2026 \ No newline at end of file diff --git a/t-cleanroom-final-1782175264.txt b/t-cleanroom-final-1782175264.txt deleted file mode 100644 index 4be68a0..0000000 --- a/t-cleanroom-final-1782175264.txt +++ /dev/null @@ -1 +0,0 @@ -Tue Jun 23 12:41:04 AM UTC 2026 \ No newline at end of file diff --git a/t-cleanroom-retry-1782173129.txt b/t-cleanroom-retry-1782173129.txt deleted file mode 100644 index f73d065..0000000 --- a/t-cleanroom-retry-1782173129.txt +++ /dev/null @@ -1 +0,0 @@ -cleanroom retry Tue Jun 23 12:05:29 AM UTC 2026 \ No newline at end of file diff --git a/t-dash-shim-1781651231.txt b/t-dash-shim-1781651231.txt deleted file mode 100644 index f1aa669..0000000 --- a/t-dash-shim-1781651231.txt +++ /dev/null @@ -1 +0,0 @@ -dash 1781651231 \ No newline at end of file diff --git a/t-force-trigger-1781650298.txt b/t-force-trigger-1781650298.txt deleted file mode 100644 index 1717be7..0000000 --- a/t-force-trigger-1781650298.txt +++ /dev/null @@ -1 +0,0 @@ -force 1781650298 \ No newline at end of file diff --git a/t-fresh-deploy-1781653429.txt b/t-fresh-deploy-1781653429.txt deleted file mode 100644 index 9d970d7..0000000 --- a/t-fresh-deploy-1781653429.txt +++ /dev/null @@ -1 +0,0 @@ -1781653429 \ No newline at end of file diff --git a/t-npm-start-1781654211.txt b/t-npm-start-1781654211.txt deleted file mode 100644 index def1157..0000000 --- a/t-npm-start-1781654211.txt +++ /dev/null @@ -1 +0,0 @@ -1781654211 \ No newline at end of file diff --git a/t-start-extract-1781652369.txt b/t-start-extract-1781652369.txt deleted file mode 100644 index 958c77d..0000000 --- a/t-start-extract-1781652369.txt +++ /dev/null @@ -1 +0,0 @@ -1781652369 \ No newline at end of file diff --git a/t-start-fix-1781652060.txt b/t-start-fix-1781652060.txt deleted file mode 100644 index 1fed462..0000000 --- a/t-start-fix-1781652060.txt +++ /dev/null @@ -1 +0,0 @@ -1781652060 \ No newline at end of file diff --git a/t-subsh-fix-1781651619.txt b/t-subsh-fix-1781651619.txt deleted file mode 100644 index 78c473f..0000000 --- a/t-subsh-fix-1781651619.txt +++ /dev/null @@ -1 +0,0 @@ -1781651619 \ No newline at end of file diff --git a/t-trigger-build-1781649273.txt b/t-trigger-build-1781649273.txt deleted file mode 100644 index ee7a0d0..0000000 --- a/t-trigger-build-1781649273.txt +++ /dev/null @@ -1 +0,0 @@ -Build retest 223433 \ No newline at end of file diff --git a/t-trigger-slim-1781650091.txt b/t-trigger-slim-1781650091.txt deleted file mode 100644 index 1e08297..0000000 --- a/t-trigger-slim-1781650091.txt +++ /dev/null @@ -1 +0,0 @@ -slim retest 224811 \ No newline at end of file diff --git a/t61-marker-1781648318.txt b/t61-marker-1781648318.txt deleted file mode 100644 index 9d4e521..0000000 --- a/t61-marker-1781648318.txt +++ /dev/null @@ -1 +0,0 @@ -T6.1 dev-public-production-deploy test 2026-06-16T22:18:38Z diff --git a/t61-marker-1782170116.txt b/t61-marker-1782170116.txt deleted file mode 100644 index af05ec1..0000000 --- a/t61-marker-1782170116.txt +++ /dev/null @@ -1 +0,0 @@ -T6.1 dev-public-production-deploy test 2026-06-22T23:15:16Z