Repository navigation
fix(agent-profiles): align Enterprise launches with the SDK - #763
Conversation
|
|
|
✅ PR Artifacts Cleaned Up The |
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
…legacy tools Consolidate profile context, tools and secret enforcement; resolve once and fail closed, preserve opaque profile entries, and finalize ordinary settings in the sandbox. Align released SDK and image pins, guard old runtimes, and validate the encrypted profile migration against PostgreSQL. Co-authored-by: openhands <openhands@all-hands.dev>
… classification Record production router/store/builder calls against PostgreSQL and the released Agent Server, including a real Sonnet/MCP turn. Keep internal resolver failures as 5xx while malformed MCP input remains a recoverable 422. Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
b3aabb7 to
1e25bd8
Compare
|
Validation completed on The automated QA run independently reports PASS in its final logs. It compared real SDK 1.50.1 and 1.54.0 conversation launches, checked profile tools/persona/suffix/secret scope, PLAN with empty tools, runtime version gating, opaque-entry preservation, and the settings UI. Its token could not publish the review ( This replaces #364, #368 and #453, which are being closed as superseded. The issue trackers remain open until this PR merges. Human testing/approval and the documented deployment cutover remain outstanding; no production or staging deployment was performed. Exact delegate MCP inheritance and Canvas default-path/catalog changes remain in their upstream trackers. |
…aunches # Conflicts: # tests/unit/app_server/test_live_status_app_conversation_service.py
…7 and 188 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Deployed Replicated/Keycloak/Canvas acceptance passed on R02 with an isolated database copy upgraded from revision 192 to 199 and verified SDK 1.58.1 runtimes. Legacy defaults, explicit coding tools without browser, and intentionally empty selected tools passed; a real terminal conversation finished and persisted across reload. All test resources were removed and R02 restored/released. This used temporary PR image overrides, not a KOTS release promotion. Automated visual review found no unexpected UI errors in the recording. Report · MP4 · GIF (private validation evidence). The final cleanup-only head is unchanged. ak684 approval is recorded; the merge attempt identified six missing required checks. Closing/reopening triggered CI on that exact head. Merge remains pending CI, with no policy bypass. |
|
Main advanced during final CI: #753 (personal Agent Profiles), #1007 (settings feature flags), and #754 (Agent Context page) are now merged at The combined migration graph also contains duplicate revision 198: the newly merged personal-profile column and the existing auth-provider named-secret backfill. Local reconciliation preserves the existing auth migration, sequences the personal-profile column at 199 and the unmerged tool-compatibility migration at 200, and combines personal lookup with strict launch failure handling. Validation is in progress, including personal-profile authorization/isolation tests. No new commit has been pushed or merged. The R02 GIF and report above remain evidence for the explicitly recorded previous candidate; they do not claim validation of this refreshed combination. R02 is restored and unreserved. |
all-hands-bot
left a comment
There was a problem hiding this comment.
This review was posted by an AI agent (OpenHands).
Scope: This change belongs in this repository. It covers Enterprise Agent Profile resolution and launch, built on the SDK 1.58.1 that main pins.
Current state: The head is e040495, a merge of current main (5b27551, which now includes #753 personal profiles, #1007 and #754). All 25 check runs on this head have completed: 24 passed and cleanup-on-approval was skipped. There are no open inline threads. My three earlier threads are outdated and were addressed at 92a00d9. The linked issues #51, #59, #344, #758 and #759 are open and labelled only oss-ohe-parity.
Earlier findings: Everything I raised on 3d4121e (duplicate migration revision, the sandbox cli_mode prompt, and switch_llm with the child launcher) is still resolved on this head. Nothing from earlier is open.
What changed with this merge (checked):
- Migration graph. Since #753,
mainhas two migrations with revision198(198_backfill_auth_provider_named_secretand198_add_member_agent_profiles), and its Python test shards are failing. This PR keeps the auth backfill at 198 unchanged. It renumbers the unreleased member-profile column migration to199revising198, and puts the tool-compatibility migration at200. Alembic now reports a single head,['200']. Becausemaincould not runupgrade headwith two heads, I see no deployed database that has the old member-column revision recorded. Note that merging this PR is also what repairs the migration graph onmain. - Personal and org strict resolution. A launch now looks up the profile id in the member's personal collection first, then the org's. An entry that cannot be read returns 422, and a missing id returns 404, with no fallback to broader settings. Deleting a personal profile clears the member's pointer (
server/routes/agent_profiles.py~L568), so strict resolution does not leave users stuck on a dangling pointer. Lookup is scoped to the requesting member's own collection, so a launch override cannot reach another member's personal profile. Personal profiles use the same org LLM store and secret scoping. - Migration 200 rewrites only org profile entries at schema version 1 or 2. That is correct here: personal profiles are new and are written at the current SDK schema version.
Tests: I ran the focused suites locally on PostgreSQL: agent profiles (including the new personal CRUD, isolation, launch/secret-scope and invalid-profile cases), profile upgrade, migrations 198 and 200, saas_settings_store, tool catalog, the live-status conversation service, user context, settings API and conversation router. All 594 passed.
I found no material code issues. As the PR itself notes, deployed acceptance of this refreshed combination with personal profiles is still pending. The R02 run covered 92a00d9. That is release follow-up, not a code defect.
✅ APPROVED
…gent Profile editor (OHE-3754) (#1012) GET /api/tools/catalog serves the SDK tool registry's catalog (a copy of the endpoint proposed in #763). The editor's sub-agents and LLM-switching switches move under a Tools section with two modes: "Standard set" keeps today's behaviour, "Choose tools" lists the catalog and saves an explicit tool list, which the profile-backed automation templates require. The picker is seeded from the standard set, pinned entries keep their params, a pinned tool the catalog does not list is shown and flagged once the catalog has loaded, and at least one tool is required.
ak684
left a comment
There was a problem hiding this comment.
Approved after automated validation of current head e040495. The refreshed combination with personal profiles passed 8,399 backend tests, eleven HTTP/runtime cases (including real Azure DeepSeek), migration driver checks, frontend checks and current CI. Fresh R02 acceptance passed four real conversations: legacy defaults, explicit empty tools, organization coding and API-created personal coding. Runtime SDK1.58.1, selected tools and reload persistence were verified. Recording reviewed across its full duration; minor pre-existing raw profile-ID sidebar tags remain. R02 restored, temporary resources removed, reservation released. This was agent-operated automated validation, not a claim of additional human testing. No production promotion performed.
…le editor (OHE-3749) (#1009) * feat(settings): add system prompt, condenser and verification to the Agent Profile editor (OHE-3748) System prompt in three modes (OpenHands default, default plus instructions as system_message_suffix, custom persona), and the condenser and verification sections of the agent-settings schema rendered per profile, excluding the global-only verification keys. Hidden fields and cleared values are left out of the stored section so server defaults apply; a section is never written back unseeded. * feat(settings): add skills with organization scope to the Agent Profile editor (OHE-3749) A Skills section listing the server's global and user skills plus the skills of every marketplace the member inherits or registered, with an Organization badge on organization-marketplace skills. All skills are on by default; unchecked ones are saved as the profile's disabled_skills deny-list. * feat(settings): add a tools picker and tool catalog endpoint to the Agent Profile editor (OHE-3754) (#1012) GET /api/tools/catalog serves the SDK tool registry's catalog (a copy of the endpoint proposed in #763). The editor's sub-agents and LLM-switching switches move under a Tools section with two modes: "Standard set" keeps today's behaviour, "Choose tools" lists the catalog and saves an explicit tool list, which the profile-backed automation templates require. The picker is seeded from the standard set, pinned entries keep their params, a pinned tool the catalog does not list is shown and flagged once the catalog has loaded, and at least one tool is required.
|
Fresh R02 acceptance passed for the personal-profile reconciliation at Main advanced again with #1017/#1021/#1016/#1026. Pushed |
ak684
left a comment
There was a problem hiding this comment.
Approved after validating final merge refresh1561cef7aa91be965b118ef4afc78de196c04286 against main c6e3251. Resolution preserves both the OpenHands Cloud BYOK classifier and strict profile launch behavior;731 affected PostgreSQL-backed tests,122 frontend tests,11 HTTP/runtime cases including real Azure personal-profile completion, frontend lint/build and all-file Python pre-commit/mypy pass. Full8399-test and four-conversation R02 acceptance evidence is on parent e040495; this merge changes neither the profile migration nor tool-selection implementation. Reviewed recording: https://github.com/ak684/oh/blob/03044df278def292195308a10bd63235a2411d87/runs/enterprise-pr763-personal-r02-20261027/REPORT.md . R02 restored and released. Agent-operated automated validation; no additional human-testing claim. Merge remains subject to required CI.
all-hands-bot
left a comment
There was a problem hiding this comment.
This review was posted by an AI agent (OpenHands).
Scope: This change belongs in this repository. It covers Enterprise Agent Profile resolution and launch, built on the SDK 1.58.1 that main pins.
Current state: The head is 1561cef, a merge of e040495 (which I approved earlier) with current main (c6e3251: #1017, #1021, #1016 and #1026). All 30 check runs on this head have completed: 28 passed and 2 were skipped (check-pr-artifacts, cleanup-on-approval). There are no open inline threads, and nothing has been raised since my last review. ak684 approved this exact head. ak684 merged the PR at 2026-10-27T12:13:47Z with this head unchanged, which closed the linked issues #51, #59, #344, #758 and #759 (labelled only oss-ohe-parity). This review applies to the merged head.
Earlier findings: All three findings from my first review (the duplicate migration revision, the sandbox cli_mode prompt, and switch_llm with the child launcher) are still resolved. Nothing is open.
What changed since e040495: I compared this PR's diff against main before and after the merge. The only real change is in the storage/saas_settings_store.py imports, where #1017's is_openhands_proxy_base_url / server.constants imports now sit alongside the PR's strict-resolution imports. #1017's OpenHands Cloud BYOK branch in managed_llm_key_config_from_model is kept unchanged. The profile launch code, tool selection and migrations are otherwise identical to e040495. main still has the two revision-198 migrations. This PR keeps the auth backfill at 198 and the member-profile column at 199, so Alembic reports a single head, ['200'].
Tests: I ran the focused suites locally on PostgreSQL: agent profiles (personal and org), org profiles, profile upgrade, migrations 198 and 200, saas_settings_store, tool catalog, the live-status conversation service, user context, settings API and conversation router. All 647 passed.
I found no material issues. The R02 deployed recording covers e040495. The later merge with main touches only imports in the profile code, and the PR lists affected-test and HTTP/runtime evidence for this head.
✅ APPROVED
…launches-resolve-secret_refs Resolve the conflicts with #763 (align Enterprise launches with the SDK): - storage/saas_settings_store.py: take main's fail-closed profile resolver, which already returns the launched profile's secret_refs; keep locate_agent_profile only to record which collection the launched profile came from (active_agent_profile_scope) next to main's secret_refs in load(). - openhands/app_server/settings/settings_models.py: keep active_agent_profile_scope beside main's active_agent_profile_secret_refs. The launch paths keep taking their custom secrets from _launch_custom_secrets (org-shared secrets for an org profile with an explicit list) before main's _apply_profile_secret_scope enforces the profile's allow-list.
…E-3755) (#1013) * feat(settings): add system prompt, condenser and verification to the Agent Profile editor (OHE-3748) System prompt in three modes (OpenHands default, default plus instructions as system_message_suffix, custom persona), and the condenser and verification sections of the agent-settings schema rendered per profile, excluding the global-only verification keys. Hidden fields and cleared values are left out of the stored section so server defaults apply; a section is never written back unseeded. * feat(settings): add skills with organization scope to the Agent Profile editor (OHE-3749) A Skills section listing the server's global and user skills plus the skills of every marketplace the member inherits or registered, with an Organization badge on organization-marketplace skills. All skills are on by default; unchecked ones are saved as the profile's disabled_skills deny-list. * feat(settings): let org admins manage organization Agent Profiles (OHE-3755) Behind the new enable_org_agent_profiles flag (ENABLE_ORG_AGENT_PROFILES), admins and owners (frontend permission manage_org_agent_profiles) get an "Add organization profile" button and Edit/Delete on the organization's profiles; legacy ACP org profiles can only be deleted. Other members keep the read-only section. The editor takes a profileScope. For an org profile it hides the agent kind and the MCP section (saving mcp_server_refs: []), always lists the organization's shared secrets explicitly, loads instance and inherited marketplace skills only, and warns when a legacy org profile still has null refs. Writes use the edited row's scope. * feat(settings): add a tools picker and tool catalog endpoint to the Agent Profile editor (OHE-3754) (#1012) GET /api/tools/catalog serves the SDK tool registry's catalog (a copy of the endpoint proposed in #763). The editor's sub-agents and LLM-switching switches move under a Tools section with two modes: "Standard set" keeps today's behaviour, "Choose tools" lists the catalog and saves an explicit tool list, which the profile-backed automation templates require. The picker is seeded from the standard set, pinned entries keep their params, a pinned tool the catalog does not list is shown and flagged once the catalog has loaded, and at least one tool is required.
…feature flag (OHE-3747) (#755) * feat(settings): add feature flags for the Agent Context and Agent Profiles pages (OHE-3744) Two env-backed web-client feature flags, both default off: - enable_agent_context_page (ENABLE_AGENT_CONTEXT_PAGE) shows the dedicated Agent Context settings page. - enable_agent_profiles_page (ENABLE_AGENT_PROFILES_PAGE) replaces the personal Agent page with Agent Profiles, and implies the Agent Context page since the Agent page hosted the memory toggle. isSettingsPageHidden hides /settings/agent-context and /settings/agents unless the matching flag is on, so the nav item and the route redirect share one rule. No visible change while both flags are off. * feat(settings): add the personal Agent Context page behind a feature flag (OHE-3745) Moves the "Enable Persistent Memory" toggle out of Settings > Agent into its own Personal Settings item, /settings/agent-context (SaaS only), shown when enable_agent_context_page (or enable_agent_profiles_page) is on. The page saves enable_memory_context through the existing settings endpoint. With the flag on, the Agent page no longer renders the inline section; with it off, the Agent page is unchanged. The item is OpenHands-only (disabledByAcp), as the inline section was. * feat(settings): add the Agent Profiles page replacing Agent behind a feature flag (OHE-3747) With enable_agent_profiles_page on (SaaS), Personal Settings shows "Agent Profiles" (/settings/agents) instead of "Agent", and /settings/agent redirects there. The page follows the Secrets layout: the member's own profiles (add, edit, rename, delete, set as default, every write with scope=personal) and an "Organization agent profiles" section listing the org's shared ones read-only (set as default only), hidden when empty. The editor covers name, agent (OpenHands, or ACP when enable_acp), LLM profile, sub-agents and "let the agent switch LLM profiles" (as tools entries, since the SDK retired the boolean switches), parallel tool calls, MCP servers, secrets (personal and organization-shared, with an Organization badge) and ACP preset, command, model and credentials. The ACP guard is off while the profiles page is on, since the agent kind then comes from the active profile. With the flag off, the Agent page and nav are unchanged. * feat(settings): add system prompt, condenser and verification to the Agent Profile editor (OHE-3748) (#1008) System prompt in three modes (OpenHands default, default plus instructions as system_message_suffix, custom persona), and the condenser and verification sections of the agent-settings schema rendered per profile, excluding the global-only verification keys. Hidden fields and cleared values are left out of the stored section so server defaults apply; a section is never written back unseeded. * feat(settings): add skills with organization scope to the Agent Profile editor (OHE-3749) (#1009) * feat(settings): add system prompt, condenser and verification to the Agent Profile editor (OHE-3748) System prompt in three modes (OpenHands default, default plus instructions as system_message_suffix, custom persona), and the condenser and verification sections of the agent-settings schema rendered per profile, excluding the global-only verification keys. Hidden fields and cleared values are left out of the stored section so server defaults apply; a section is never written back unseeded. * feat(settings): add skills with organization scope to the Agent Profile editor (OHE-3749) A Skills section listing the server's global and user skills plus the skills of every marketplace the member inherits or registered, with an Organization badge on organization-marketplace skills. All skills are on by default; unchecked ones are saved as the profile's disabled_skills deny-list. * feat(settings): add a tools picker and tool catalog endpoint to the Agent Profile editor (OHE-3754) (#1012) GET /api/tools/catalog serves the SDK tool registry's catalog (a copy of the endpoint proposed in #763). The editor's sub-agents and LLM-switching switches move under a Tools section with two modes: "Standard set" keeps today's behaviour, "Choose tools" lists the catalog and saves an explicit tool list, which the profile-backed automation templates require. The picker is seeded from the standard set, pinned entries keep their params, a pinned tool the catalog does not list is shown and flagged once the catalog has loaded, and at least one tool is required. * feat(settings): let org admins manage organization Agent Profiles (OHE-3755) (#1013) * feat(settings): add system prompt, condenser and verification to the Agent Profile editor (OHE-3748) System prompt in three modes (OpenHands default, default plus instructions as system_message_suffix, custom persona), and the condenser and verification sections of the agent-settings schema rendered per profile, excluding the global-only verification keys. Hidden fields and cleared values are left out of the stored section so server defaults apply; a section is never written back unseeded. * feat(settings): add skills with organization scope to the Agent Profile editor (OHE-3749) A Skills section listing the server's global and user skills plus the skills of every marketplace the member inherits or registered, with an Organization badge on organization-marketplace skills. All skills are on by default; unchecked ones are saved as the profile's disabled_skills deny-list. * feat(settings): let org admins manage organization Agent Profiles (OHE-3755) Behind the new enable_org_agent_profiles flag (ENABLE_ORG_AGENT_PROFILES), admins and owners (frontend permission manage_org_agent_profiles) get an "Add organization profile" button and Edit/Delete on the organization's profiles; legacy ACP org profiles can only be deleted. Other members keep the read-only section. The editor takes a profileScope. For an org profile it hides the agent kind and the MCP section (saving mcp_server_refs: []), always lists the organization's shared secrets explicitly, loads instance and inherited marketplace skills only, and warns when a legacy org profile still has null refs. Writes use the edited row's scope. * feat(settings): add a tools picker and tool catalog endpoint to the Agent Profile editor (OHE-3754) (#1012) GET /api/tools/catalog serves the SDK tool registry's catalog (a copy of the endpoint proposed in #763). The editor's sub-agents and LLM-switching switches move under a Tools section with two modes: "Standard set" keeps today's behaviour, "Choose tools" lists the catalog and saves an explicit tool list, which the profile-backed automation templates require. The picker is seeded from the standard set, pinned entries keep their params, a pinned tool the catalog does not list is shown and flagged once the catalog has loaded, and at least one tool is required. * test(settings): keep flag-gated pages out of the expected user menu items (OHE-3456) The user context menu hides the Agent Context and Agent Profiles entries until enable_agent_context_page and enable_agent_profiles_page are on, and the mocked config in these tests leaves both off. Exclude those paths the way the tests already exclude the other hidden routes. * test(settings): restore the user menu test's original formatting The previous commit let prettier rewrap the whole file; keep only the flag-gated path exclusion it was meant to add.
…storage-api-and Resolves the conflicts with the merged Agent Profiles work (#753, #754, #755, #763, #1007, #1010, #1011) by keeping both sides: both feature flags and their nav-hiding rules, both LLM-profile delete guards and rename cascades in org_profiles, and the Model Router launch hydration after main's SDK-based Agent Profile resolution in saas_settings_store. The user-menu test keeps the isSettingsPageHidden filter, which covers main's hard-coded agent-page set as well as the Model Router page. Semantic follow-ups: re-add the resolve_profile_llm import main dropped from saas_settings_store (the router hydration still uses it), and renumber the Model Router migration from 199 to 201 chaining off main's 200 (main now holds 199 and 200), and move the alembic head pinned by main's agent-profile upgrade test from 200 to 201 accordingly.
|
🚀 Released in 1.81.0. |
… the SDK floor (OHE-3838) (#1083) Since #763 every new conversation start calls the sandbox's /server_info and fails when its agent-server reports openhands-sdk below 1.54.0. On OHE a sandbox cannot change image in place, so after upgrading to 0.92.0 no pre-existing sandbox could host a new conversation: explicit sandbox_id (automations, API, SDK), /new in an old conversation, Plan sub-conversations and grouping into a running old sandbox all ended in the upgrade error. Customers below 0.82 have every sandbox on 1.50.1. An agent-server that old honors everything an ordinary launch sends (checked field by field against the 1.50.1 models and tool registry; the default tool list still resolves because switch_llm is sent through include_default_tools). The two things it cannot run are a profile persona, which it drops silently, and the ACP agent_settings transport, which it rejects on schema version. Keep the fast failure for those two cases, with the message naming the reason, and let every other launch proceed with a warning in the log. Update the upgrade guide accordingly, and cover the start path with a test that runs the real check against a 1.50.1 /server_info instead of the shared stub.
HUMAN:
AGENT:
Why
Enterprise could resolve a restricted Agent Profile, then replace its selected tools/context with defaults or fall back to broader settings after a resolution error. This keeps the resolved profile authoritative at launch and preserves legacy profile data during upgrades.
Summary
[]stays empty;nullgets defaults. The optional child launcher does not expand explicit tool lists. Retain Azure DevOps credential-helper output masking.Issue Number
Fixes #51
Fixes #59
Fixes #344
Fixes #758
Fixes #759
Supersedes #364, #368 and #453.
Current candidate
Commit
1561cef7aa91be965b118ef4afc78de196c04286includes mainc6e3251e6(#1017, #1021, #1016 and #1026) on top of the R02-testede040495candidate. The final overlap retains both OpenHands Cloud BYOK classification and strict profile resolution. It passed 731 affected PostgreSQL-backed tests, eleven HTTP/runtime cases including a real Azure personal-profile completion, 122 frontend tests, frontend lint/build, and Python pre-commit/mypy. Final-refresh validation evidence. All final-head GitHub CI checks passed before merge.The earlier reconciliation retained #753's personal-profile APIs/ownership and applied strict launch resolution to personal and organization profiles. Existing auth backfill198 is preserved, personal-profile column199, tool compatibility200. The full suite below ran on
e040495; final-head affected validation is listed above.How to Test
See review-fix details and regression evidence, ten HTTP/runtime cases, migration driver results, and earlier validation. The before/after tool-selection probe and original author's historical report are retained.
Video/Screenshots
R02 acceptance passed on
e040495after the personal-profile reconciliation: four working conversations covered an API-created personal profile, organization coding profile without browser, legacy default tools, and explicitly empty selected tools. Runtime SDK1.58.1, actual tool lists and persisted results after reload were verified. The isolated database copy upgraded192→200. R02 was restored, temporary resources removed and its reservation released. This used temporary PR-image overrides, not a KOTS release promotion.The 67-second recording shows actual personal-profile execution followed by tool-list inspection and persisted results. Reviewed through consecutive frames covering the entire export and separate GIF/full-size screenshot checks. One cosmetic issue remains: sidebar tags show raw profile IDs/revisions rather than friendly names. The final main refresh did not change the profile tools/migration logic; the recording is specifically for
e040495.Report · MP4 · GIF. Private
ak684/ohevidence; access required.Type
Notes
Follow the upgrade guide: back up the database and encryption configuration, freeze profile/settings writes, stop old writers, audit, migrate and complete the cutover before unfreezing. Alembic downgrade is not a data rollback. Update external runtime-image pins too.
The current HTTP validation uses a local bearer identity, real PostgreSQL and a released SDK server. The personal-profile combination passed deployed acceptance as recorded above; the final main refresh has additional HTTP/runtime and affected-test coverage. Authenticated ACP CLI inference remains untested. The small Azure MCP run does not establish sustained coding-agent capacity at 20,000 TPM.
SDK 1.58.1 settings cannot carry the sandbox prompt flag, so native launches build from resolved settings and use supported raw-agent transport; the sandbox still finalizes runtime context. Explicit profile tool selections remain authoritative. SDK delegate MCP inheritance (OpenHands/software-agent-sdk#5743) and Canvas default-path/catalog work (OpenHands/OpenHands#17991 and #17237) remain separate.
Enterprise server image for this PR: