Skip to content

Commit 0251ffe

Browse files
committed
Merge branch 'main' into kevin
2 parents d3bca9e + 9af1329 commit 0251ffe

5 files changed

Lines changed: 12 additions & 6 deletions

File tree

.openhands/microagents/repo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ IMPORTANT: Before making any changes to the codebase, ALWAYS run `make install-p
1414

1515
Before pushing any changes, you MUST ensure that any lint errors or simple test errors have been fixed.
1616

17-
* If you've made changes to the backend, you should run `pre-commit run --all-files --config ./dev_config/python/.pre-commit-config.yaml`
17+
* If you've made changes to the backend, you should run `pre-commit run --config ./dev_config/python/.pre-commit-config.yaml` (this will run on staged files).
1818
* If you've made changes to the frontend, you should run `cd frontend && npm run lint:fix && npm run build ; cd ..`
1919

2020
The pre-commit hooks MUST pass successfully before pushing any changes to the repository. This is a mandatory requirement to maintain code quality and consistency.

openhands/controller/agent_controller.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ async def _step(self) -> None:
793793
"""Executes a single step of the parent or delegate agent. Detects stuck agents and limits on the number of iterations and the task budget."""
794794
if self.get_agent_state() != AgentState.RUNNING:
795795
self.log(
796-
'info',
796+
'debug',
797797
f'Agent not stepping because state is {self.get_agent_state()} (not RUNNING)',
798798
extra={'msg_type': 'STEP_BLOCKED_STATE'},
799799
)
@@ -803,7 +803,7 @@ async def _step(self) -> None:
803803
action_id = getattr(self._pending_action, 'id', 'unknown')
804804
action_type = type(self._pending_action).__name__
805805
self.log(
806-
'info',
806+
'debug',
807807
f'Agent not stepping because of pending action: {action_type} (id={action_id})',
808808
extra={'msg_type': 'STEP_BLOCKED_PENDING_ACTION'},
809809
)

openhands/server/listen_socket.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,12 @@ async def connect(connection_id: str, environ):
7575
raise ConnectionRefusedError('No conversation_id in query params')
7676

7777
cookies_str = environ.get('HTTP_COOKIE', '')
78+
# Get Authorization header from the environment
79+
# Headers in WSGI/ASGI are prefixed with 'HTTP_' and have dashes replaced with underscores
80+
authorization_header = environ.get('HTTP_AUTHORIZATION', None)
7881
conversation_validator = create_conversation_validator()
7982
user_id, github_user_id = await conversation_validator.validate(
80-
conversation_id, cookies_str
83+
conversation_id, cookies_str, authorization_header
8184
)
8285
if server_config.app_mode == AppMode.SAAS:
8386
if get_credits(user_id) < 1:

openhands/server/routes/manage_conversations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ async def _create_new_conversation(
101101
)
102102

103103
else:
104-
logger.warn('Settings not present, not starting conversation')
104+
logger.warning('Settings not present, not starting conversation')
105105
raise MissingSettingsError('Settings not found')
106106

107107
session_init_args['git_provider_tokens'] = git_provider_tokens

openhands/storage/conversation/conversation_validator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ class ConversationValidator:
77
"""Storage for conversation metadata. May or may not support multiple users depending on the environment."""
88

99
async def validate(
10-
self, conversation_id: str, cookies_str: str
10+
self,
11+
conversation_id: str,
12+
cookies_str: str,
13+
authorization_header: str | None = None,
1114
) -> tuple[None, None]:
1215
return None, None
1316

0 commit comments

Comments
 (0)