feat(upgrade): upgrade OpenHands from v1.4.0 to v1.6.0 - #65
Conversation
Upgrade the base OpenHands image, SDK, and runtime to v1.6.0 (341 upstream commits). Key changes: - Bump base image from 1.4.0 to 1.6.0 - Bump agent-server SDK from v1.11.5 to v1.15.0 - Bump runtime image from 1.4-nikolaik to 1.6-nikolaik - Bump openhands-tools from 1.11.5 to 1.15.0 - Remove custom S3EventService (Patch 33) β upstream v1.6.0 has native AwsEventService with identical S3 path format - Remove remote_sandbox_service.py from fork patches (absorbed upstream) - Update Patch 32 (exposed_urls) for new _build_service_url(url, name, runtime_id) signature and correct port mapping (60001 for VS Code) - Update SDK Patch 26 insertion logic for v1.15.0 (no existing model_validator in ConversationState) - Update VS Code server source image to 1.15.0-python - Fork branch: custom/v1.6.0-fargate-r1 (19 cherry-picked commits, 3 absorbed/skipped)
π Security Scan ResultsStatus: π΄ CRITICAL ISSUES - Do not merge!Summary
NPM Vulnerabilities
Security Score: N/A/10Please run |
There was a problem hiding this comment.
OpenHands v1.6.0 Upgrade Review
This PR upgrades OpenHands from v1.4.0 to v1.6.0, including SDK updates, removal of custom S3EventService (now native upstream), and alignment with new API signatures.
Critical Issue Found
- Patch 32 (patch-exposed-urls.py): Missing
urlparseimport will cause runtime failure when the fallback code path executes
Changes Summary
- Upgraded OpenHands to v1.6.0, agent SDK to v1.15.0, and openhands-tools to v1.15.0
- Removed custom S3EventService - replaced by upstream AwsEventService
- Updated VS Code port from 8001 to 60001 (upstream change)
- Updated patch logic for v1.6.0 API signatures (added
runtime_idparameter) - Enhanced SDK patches with v1.15.0 compatibility checks
Please address the critical import issue before merging.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
The Fargate orchestrator returns status='provisioning' during ECS RunTask, which wasn't in the upstream STATUS_MAPPING. This caused 'Sandbox not startable' errors. Re-add remote_sandbox_service.py to fork patches with the provisioning -> STARTING mapping.
π Security Scan ResultsStatus: π΄ CRITICAL ISSUES - Do not merge!Summary
NPM Vulnerabilities
Security Score: N/A/10Please run |
β¦tations The orchestrator was returning status='pending' for STARTING sandboxes, but upstream v1.6.0 RemoteSandboxService.STATUS_MAPPING expects 'starting'. Similarly, ERROR was mapped to 'failed' but upstream expects 'error'. This caused 'Sandbox not startable' errors because 'pending' didn't match any entry in STATUS_MAPPING, defaulting to SandboxStatus.MISSING.
π Security Scan ResultsStatus: π΄ CRITICAL ISSUES - Do not merge!Summary
NPM Vulnerabilities
Security Score: N/A/10Please run |
The orchestrator source change in the previous commit altered the Docker asset hash for the sandbox image, which is referenced in the ComputeStack snapshot.
The send_telemetry key was removed from OpenHands v1.6.0 core config, causing a warning on startup. Remove it to eliminate the warning.
π Security Scan ResultsStatus: π΄ CRITICAL ISSUES - Do not merge!Summary
NPM Vulnerabilities
Security Score: N/A/10Please run |
Handlebars 4.0.0-4.7.8 has critical vulnerabilities (GHSA-3mfm-83xf-c92r, GHSA-2w6w-674q-4c4q, GHSA-2qvq-rjwj-gvw9). Override to 4.7.9 via npm overrides to fix CI security scan failure.
π Security Scan ResultsStatus: π‘ HIGH ISSUES - Review required!Summary
NPM Vulnerabilities
Security Score: N/A/10Please run |
- Add defensive urlparse import in patch-exposed-urls.py fallback path (review finding: NameError if module-level import missing) - Upgrade npm overrides to fix all critical/high CVEs: fast-xml-parser 5.5.10, minimatch 10.2.5, picomatch 4.0.4, path-to-regexp 8.4.2, brace-expansion 5.0.5 - Remaining 4 vulnerabilities (2 moderate, 2 high) are inside aws-cdk-lib's bundled dependencies β unfixable via overrides
π Security Scan ResultsStatus: π‘ HIGH ISSUES - Review required!Summary
NPM Vulnerabilities
Security Score: N/A/10Please run |
1 similar comment
π Security Scan ResultsStatus: π‘ HIGH ISSUES - Review required!Summary
NPM Vulnerabilities
Security Score: N/A/10Please run |
|
/q review |
There was a problem hiding this comment.
Summary
This PR successfully upgrades OpenHands from v1.4.0 to v1.6.0 with 341 upstream commits. The upgrade demonstrates excellent engineering practices with proper version management, security-focused changes, and comprehensive compatibility patches.
Key Changes Validated
β Version Upgrades
- OpenHands base image: v1.4.0 β v1.6.0
- Agent Server SDK: v1.11.5 β v1.15.0
- Fork reference updated with appropriate commit pinning
β Native Upstream Adoption
- Removed custom
S3EventServicein favor of upstreamAwsEventServicein v1.6.0 - Both use identical S3 path format for backward compatibility
β Status Mapping Corrections
- Fixed sandbox status values to match upstream expectations (
'starting'instead of'pending','error'instead of'failed') - Ensures proper integration with RemoteSandboxService
β SDK Compatibility Patches
- Patches 23-27 properly handle secret masking during conversation resume
- Build-time patches correctly applied before PyInstaller bundling
- Fallback logic for SDK version variations (v1.8.x β v1.15.0)
β Security & Multi-tenancy
- User-scoped settings/secrets stores maintained
- Proper verification of critical patches at startup
- Multi-tenant conversation isolation preserved
Test Plan Coverage
The PR includes comprehensive E2E test coverage (TC-003 through TC-031) validating:
- Authentication and user isolation
- Conversation lifecycle (create, resume, archive, delete)
- Sandbox functionality and AWS access
- MCP server integrations
- Security boundaries
Status: Ready for merge after E2E tests pass. The code is well-structured, follows best practices, and maintains backward compatibility while adopting native upstream features.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
|
/q review |
There was a problem hiding this comment.
Summary
This PR successfully upgrades OpenHands from v1.4.0 to v1.6.0, incorporating 341 upstream commits with comprehensive SDK and infrastructure updates.
Key Changes Validated
- Version Upgrades: OpenHands base image, SDK (v1.11.5 β v1.15.0), and runtime properly updated
- Native AwsEventService: Correctly removes custom S3EventService in favor of upstream v1.6.0's native implementation
- SDK Patches: Build-time patches (23-27) properly handle masked secrets and Bedrock max_output_tokens
- Fork Strategy: Clean commit SHA pinning (7a481ec3) ensures reproducible builds
- API Compatibility: Status mapping correctly aligns with upstream v1.6.0 expectations (starting/error vs pending/failed)
- Configuration: Properly documents removal of deprecated send_telemetry config key
Test Coverage
The PR description references comprehensive E2E test cases (TC-003 through TC-031) covering authentication, conversation management, sandbox isolation, and multi-tenancy. Ensure all test cases pass before merge.
No blocking defects identified in the code review.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
All three Dockerfiles (app, agent-server-custom, openresty) now include a LAST_UPDATED build arg. Bumping this date forces CDK to rebuild the Docker images, pulling fresh base images with the latest security patches. Without this, CDK reuses cached images when the Dockerfile content is unchanged, even if upstream base images have been patched.
π Security Scan ResultsStatus: π‘ HIGH ISSUES - Review required!Summary
NPM Vulnerabilities
Security Score: N/A/10Please run |
β¦vice) Delete s3_event_service.py and its tests β upstream v1.6.0 has native AwsEventService with identical S3 path format. Update AGENTS.md docs to reference the upstream implementation.
π Security Scan ResultsStatus: π‘ HIGH ISSUES - Review required!Summary
NPM Vulnerabilities
Security Score: N/A/10Please run |
Upgrade OpenResty from 1.27.1.2-alpine-fat (2024) to 1.29.2.3-alpine-fat (2026-04-07) to pick up 2 major versions of security patches and bug fixes.
π Security Scan ResultsStatus: π‘ HIGH ISSUES - Review required!Summary
NPM Vulnerabilities
Security Score: N/A/10Please run |
Patch 24 (model_dump exclude_none) is no longer needed β SDK v1.15.0 already uses model_dump(mode="json") which handles None values correctly. Remaining SDK patches: 23, 25, 26 (secret handling), 27 (Bedrock).
π Security Scan ResultsStatus: π‘ HIGH ISSUES - Review required!Summary
NPM Vulnerabilities
Security Score: N/A/10Please run |
β¦selection The LLM_MODEL environment variable was hardcoded to claude-sonnet-4-6, which overrode user's model selection saved in S3 settings. The model is already configured via config.toml [llm].model as a default, and users can override it per-user via the Settings UI (persisted in S3). This fixes the regression where conversations always used the default model regardless of user's LLM settings selection.
π Security Scan ResultsStatus: π‘ HIGH ISSUES - Review required!Summary
NPM Vulnerabilities
Security Score: N/A/10Please run |
Adds a regression test that verifies: - LLM_MODEL env var is NOT hardcoded in sandbox containers - User's model selection from Settings UI is used by conversations - Model is passed via StartConversationRequest, not env var This catches the regression where hardcoded LLM_MODEL env var in compute-stack.ts overrode user's model selection.
π Security Scan ResultsStatus: π‘ HIGH ISSUES - Review required!Summary
NPM Vulnerabilities
Security Score: N/A/10Please run |
## Summary - Bump version from 1.2.0 to 1.3.0 - Update CHANGELOG.md with all changes since v1.2.0 ### Changes in this release #### Changed - **Upgrade OpenHands from v1.4.0 to v1.6.0** (#65) β 341 upstream commits, SDK v1.15.0, removed custom S3EventService in favor of upstream AwsEventService - **Replace github-workflow skill with autonomous-dev-team** (#66) β multi-agent support for Claude Code, Kiro CLI, and Codex #### Fixed - **Add retention-days to security scan artifacts** (#64) β prevent GitHub Actions storage quota exhaustion #### Security - Fixed 6 npm CVEs: handlebars, fast-xml-parser, minimatch, picomatch, path-to-regexp, brace-expansion (#65) ## Test plan - [x] Build passes (`npm run build`) - [x] All 129 unit tests pass (`npm run test:ts`) - [ ] CI checks pass
Summary
S3EventServiceβ upstream v1.6.0 has nativeAwsEventServicewith identical S3 path format (users/{user_id}/v1_conversations/{conv_id_hex}/)_build_service_urlpatch for new 3-arg signature in v1.6.0 (url, service_name, runtime_id)starting/errorinstead ofpending/failed)send_telemetryconfig key (removed in v1.6.0)custom/v1.6.0-fargate-r1(20 cherry-picked commits from v1.4.0 fork)Test plan
openhands.test.kane.mx)