forked from All-Hands-AI/OpenHands
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Added bolt samples #15
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
6289457
Stubbing out experimental script for bolt-945
Domiii f983030
benchmark script setup works correctly
Domiii a1548ae
bolt setup scripts
Domiii 6561571
prompt update
Domiii 2cb6476
Remove legacy mode
Domiii 891c612
logging noise
Domiii 4a1f9ac
Simplified submit-hypothesis
Domiii b49d827
added PRO-946
Domiii ed68b34
small bolt + prompt updates
Domiii 5249558
fix REPLAY_ env vars
Domiii 75c75bf
bolt runner fix + 951 project setup
Domiii c55dfcc
run_bolt
Domiii 24b1a03
WIP: zooming in on the bug
Domiii 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 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 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 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 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 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 |
---|---|---|
|
@@ -28,15 +28,6 @@ def command_annotate_execution_points( | |
thought: str, is_workspace_repo: bool | ||
) -> ReplayInternalCmdRunAction: | ||
command_input: dict[str, Any] = dict() | ||
if is_workspace_repo: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NOTE: Remove legacy mode. |
||
# NOTE: In the resolver workflow, the workdir path is equal to the repo path: | ||
# 1. We should not append the repo name to the path. | ||
# 2. The resolver also already hard-reset the repo, so forceDelete is not necessary. | ||
command_input['isWorkspaceRepoPath'] = True | ||
command_input['forceDelete'] = False | ||
else: | ||
command_input['isWorkspaceRepoPath'] = False | ||
command_input['forceDelete'] = True | ||
command_input['prompt'] = thought | ||
|
||
action = ReplayInternalCmdRunAction( | ||
|
This file contains 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 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 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,3 @@ | ||
The deviations from the median for the total network data transferred are rendered incorrectly. They render as 0.0% when they should be something else. | ||
|
||
Bug recording: https://app.replay.io/recording/replay-of-localhost8040--3e0a8f68-14e6-4809-bc72-dea0e0374c77?&point=25312447185420620431941338721681417 |
Binary file not shown.
This file contains 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,8 @@ | ||
The following bug has been discovered in a web app inside a browser. | ||
NOTE: Networking errors might be caused by CORS problems. Their fix usually requires server middleware. | ||
|
||
This web app should render the results of a single prompt provided to two different models. | ||
The UI renders: `anthropic API error: Connection error` | ||
Fix it. | ||
|
||
Bug recording: https://app.replay.io/recording/replay-of-localhost8040--f9dd7902-5188-45d2-9d2a-aa4d2e674592?point=29531188383192074852669071103623174&time=13949.366224168605&viewMode=dev |
Binary file not shown.
This file contains 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,3 @@ | ||
The React app renders a blank screen. | ||
|
||
Bug recording: https://app.replay.io/recording/replay-of-localhost8040--43a890bc-6f37-47e0-ba47-4d04827e4e44 |
Binary file not shown.
This file contains 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,89 @@ | ||
# Copyright 2020-2025 Record Replay Inc. | ||
set -e | ||
|
||
if [[ -z "$1" ]]; then | ||
echo "Usage: $0 <instance-id>" | ||
exit 1 | ||
fi | ||
INSTANCE_ID=$1 | ||
PROMPT_NAME="$2" | ||
|
||
THIS_DIR="$(dirname "$0")" | ||
OH_ROOT="$THIS_DIR/.." | ||
OH_ROOT="$(node -e 'console.log(require("path").resolve(process.argv[1]))' $OH_ROOT)" | ||
if [[ -z "$TMP_DIR" ]]; then | ||
TMP_DIR="/tmp" | ||
fi | ||
TARGET_FOLDER="$TMP_DIR/bolt/$INSTANCE_ID" | ||
WORKSPACE_ROOT="$TARGET_FOLDER/workspace" | ||
INSTANCE_DIR="$THIS_DIR/$INSTANCE_ID" | ||
|
||
if [[ ! -d "$INSTANCE_DIR" ]]; then | ||
echo -e "Instance directory \"$INSTANCE_DIR\" not found.\n" | ||
echo -e "Available instance folders:\n" | ||
# List all sub folders | ||
ls -1 -d $THIS_DIR/*/ | ||
echo -e "\n" | ||
exit 1 | ||
fi | ||
|
||
|
||
# Load prompt. | ||
if [[ -z "$PROMPT_NAME" ]]; then | ||
PROMPT_NAME="prompt" | ||
fi | ||
PROMPT_FILE="$INSTANCE_DIR/$PROMPT_NAME.md" | ||
if [[ ! -f "$PROMPT_FILE" ]]; then | ||
echo "Prompt file \"$PROMPT_FILE\" not found." | ||
exit 1 | ||
fi | ||
PROMPT=$(cat $PROMPT_FILE) | ||
if [[ -z "$PROMPT" ]]; then | ||
echo "Prompt file found but was empty." | ||
exit 1 | ||
fi | ||
|
||
# (Re-load) source files. | ||
SOURCE_ZIP_FILE="$INSTANCE_DIR/source_code.zip" | ||
rm -rf $WORKSPACE_ROOT | ||
mkdir -p $WORKSPACE_ROOT | ||
if [[ -f "$SOURCE_ZIP_FILE" ]]; then | ||
unzip -q $SOURCE_ZIP_FILE -d $WORKSPACE_ROOT | ||
# If it only contains a single folder called "project", move it up. | ||
if [ -d "$WORKSPACE_ROOT/project" ] && [ $(ls -A "$WORKSPACE_ROOT" | wc -l) -eq 1 ]; then | ||
mv "$WORKSPACE_ROOT/project"/* "$WORKSPACE_ROOT" | ||
rm -rf "$WORKSPACE_ROOT/project" | ||
fi | ||
pushd $WORKSPACE_ROOT > /dev/null | ||
git init > /dev/null | ||
git add -A > /dev/null | ||
git commit -am "initial commit" > /dev/null | ||
popd > /dev/null | ||
echo "Workspace has been set up and git initialized." | ||
else | ||
echo "Running analysis WITHOUT source code..." | ||
fi | ||
|
||
# Config overrides + sanity checks. | ||
export DEBUG=1 | ||
export REPLAY_DEV_MODE=1 | ||
export REPLAY_ENABLE_TOOL_CACHE=1 | ||
export WORKSPACE_BASE="$WORKSPACE_ROOT" | ||
export LLM_MODEL="anthropic/claude-3-5-sonnet-20241022" | ||
if [[ -z "$LLM_API_KEY" ]]; then | ||
if [[ -z "$ANTHROPIC_API_KEY" ]]; then | ||
echo "LLM_API_KEY or ANTHROPIC_API_KEY environment variable must be set." | ||
exit 1 | ||
fi | ||
export LLM_API_KEY=$ANTHROPIC_API_KEY | ||
fi | ||
|
||
# Logging. | ||
LOG_FILE="$TARGET_FOLDER/default.log" | ||
echo "WORKSPACE_ROOT: \"$WORKSPACE_ROOT\"" | ||
echo "Logging to \"$LOG_FILE\"..." | ||
|
||
# GO. | ||
cd $OH_ROOT | ||
poetry run python -m openhands.core.main -t "$PROMPT" \ | ||
> "$LOG_FILE" 2>&1 |
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.
NOTE: Avoid waiting for user input forever. Providing a fake user response is the standard solution though.