-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Implemented thread-level atomic elicitation counter for stopwatch pausing #12296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4450f70
Implemented thread-level atomic elicitation counter for stopwatch pau…
cconger 99a10f8
Mark thread/(inc|dec)rement as experimental
cconger b49fbed
Fix the resume test
cconger a5106f8
fix stopwatch for unified-exec
cconger c894baa
Fix tests
cconger cf8c6be
Remove docs
cconger a387c72
Remove MCP state as we don't use this anymore
cconger 5afea78
Add docstrings
cconger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4217,4 +4217,4 @@ | |
| } | ||
| ], | ||
| "title": "ClientRequest" | ||
| } | ||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17071,4 +17071,4 @@ | |
| }, | ||
| "title": "CodexAppServerProtocol", | ||
| "type": "object" | ||
| } | ||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15326,4 +15326,4 @@ | |
| }, | ||
| "title": "CodexAppServerProtocolV2", | ||
| "type": "object" | ||
| } | ||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,4 +33,4 @@ | |
| ], | ||
| "title": "WindowsSandboxSetupStartParams", | ||
| "type": "object" | ||
| } | ||
| } | ||
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
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
46 changes: 46 additions & 0 deletions
46
codex-rs/app-server-test-client/scripts/live_elicitation_hold.sh
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| #!/bin/sh | ||
| set -eu | ||
|
|
||
| require_env() { | ||
| eval "value=\${$1-}" | ||
| if [ -z "$value" ]; then | ||
| echo "missing required env var: $1" >&2 | ||
| exit 1 | ||
| fi | ||
| } | ||
|
|
||
| require_env APP_SERVER_URL | ||
| require_env APP_SERVER_TEST_CLIENT_BIN | ||
|
|
||
| thread_id="${CODEX_THREAD_ID:-${THREAD_ID-}}" | ||
| if [ -z "$thread_id" ]; then | ||
| echo "missing required env var: CODEX_THREAD_ID" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| hold_seconds="${ELICITATION_HOLD_SECONDS:-15}" | ||
| incremented=0 | ||
|
|
||
| cleanup() { | ||
| if [ "$incremented" -eq 1 ]; then | ||
| "$APP_SERVER_TEST_CLIENT_BIN" --url "$APP_SERVER_URL" \ | ||
| thread-decrement-elicitation "$thread_id" >/dev/null 2>&1 || true | ||
| fi | ||
| } | ||
|
|
||
| trap cleanup EXIT INT TERM HUP | ||
|
|
||
| echo "[elicitation-hold] increment thread=$thread_id" | ||
| "$APP_SERVER_TEST_CLIENT_BIN" --url "$APP_SERVER_URL" \ | ||
| thread-increment-elicitation "$thread_id" | ||
| incremented=1 | ||
|
|
||
| echo "[elicitation-hold] sleeping ${hold_seconds}s" | ||
| sleep "$hold_seconds" | ||
|
|
||
| echo "[elicitation-hold] decrement thread=$thread_id" | ||
| "$APP_SERVER_TEST_CLIENT_BIN" --url "$APP_SERVER_URL" \ | ||
| thread-decrement-elicitation "$thread_id" | ||
| incremented=0 | ||
|
|
||
| echo "[elicitation-hold] done" |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a docstring here describe what these two endpoints do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
& maybe make it clear that this only applies to unified exec as a workaround?