Repository navigation
Conversation
Every curl invocation in the demo scripts ran with no connect or total timeout, so a service that accepts TCP but never answers (wedged listener, firewall drop, stalled stream) froze the demo indefinitely — the very first-run experience ODS presents to new users. Add CURL_PROBE_FLAGS (--connect-timeout 3 --max-time 10, matching the ods-preflight.sh health-check convention) to all health probes and CURL_GEN_FLAGS (--connect-timeout 5 --max-time 300) to the completion calls, including the streaming demo so a stalled stream still exits. Regression test stubs curl to hang on any invocation lacking --max-time and drives both scripts end-to-end; red on base, green here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why this matters
ods/scripts/first-boot-demo.shandods/scripts/showcase.share the first-run showcase a new ODS user sees. Every one of theircurlcalls ran with no connection or total timeout — 7 sites in first-boot-demo, 4 in showcase. A service that accepts TCP but never answers (wedged listener, firewall DROP rule, stalled SSE stream, misconfigured port forward) makescurlwait indefinitely, freezing the demo with no error and no way forward short of Ctrl+C. The neighboringods-preflight.shandhealth-check.shalready bound every probe; the demo scripts were the remaining unbounded operational surface.What changed
Two flag arrays, defined once per script next to the URL config:
first-boot-demo.sh:check_service()+ Whisper/Piper/n8n probes useCURL_PROBE_FLAGS; the chat, code-assistant, and streaming completions useCURL_GEN_FLAGS. The streaming call keeps-sNand its pipe —--max-timebounds a stalled stream rather than changing its semantics.showcase.sh:check_service()usesCURL_PROBE_FLAGS; all three chat-completions calls useCURL_GEN_FLAGS.No endpoint, parsing, UX, or success-reporting changes — timeout bounding only.
Regression test
ods/tests/test-demo-curl-bounds.shstubscurlonPATH: the stub logs its argv and sleeps 30 s when--max-timeis absent, simulating a wedged peer. Both scripts are then driven end-to-end under a 20 s outer timeout (first-boot-demo.sh --quick;showcase.shvia a scripted menu session covering the chat, RAG, and code-assistant POSTs), followed by a static sweep asserting everycurlcall site references a bounds array.upstream/public-beta(4d725ee95): both scripts stall on their first unbounded call (exit 124); the sweep reports 7 + 4 unbounded sites.1 passed, 7 failed.8 passed, 0 failed— 8 recorded calls in first-boot-demo, all 3 completion paths in showcase, all bounded.Validation
bash -nboth scripts: cleanshellcheck -S erroron both scripts + the test: cleangit diff --check: cleanOverlap check
Searched open/closed PRs for
demo curl timeout,showcase,first-boot. Neighbors verified disjoint:SCRIPT_DIRclobber.None bound the existing call sites.
Notes
--max-time 300generation ceiling is intentionally generous (CPU inference on large models); it bounds hangs, not slow responses.