Skip to content

[Agent Profile] Refresh and validate the tool migration and SDK rollout in #453 #758

Closed

Description

@simonrosenberg

#453 is useful but is not merge-ready on current main (c60de1f53). Keep this separate from a mechanical rebase: the migration and rollout contract need validation.

Concrete blockers found in the Oct 13 agent-profile audit:

  1. Revision collision: fix(app-server): honour a profile's tool selection on cloud; tools is the only tool control #453 adds 175_unset_empty_agent_profile_tools.py with revision="175", down_revision="174". Main already has 175_add_sandbox_lifecycle_columns.py, followed by 176–186. Merging both creates a duplicate Alembic revision. Allocate a new revision against the current single head, rename its tests/imports, and run the full migration graph; do not edit the released 175 migration.
  2. Dependency mismatch: main still pins openhands-sdk, tools and agent-server 1.50.1; the mypy environment separately pins 1.39.1. fix(app-server): honour a profile's tool selection on cloud; tools is the only tool control #453 imports launch_tool_specs, removes switch fields and relies on the >=1.51 migration semantics. Its present failed lint/test results are consistent with that documented unmet dependency. Bump all three runtime distributions and hook dependencies together to a released compatible version, then verify built sandbox images use the same contract.
  3. Rollout/data preservation: fix(app-server): honour a profile's tool selection on cloud; tools is the only tool control #453 protects unknown/newer profile entries on future writes, but old pods still drop newer profiles. Its own description requires no mixed-version pods and no rollback to an older image. This is a deployment prerequisite, not solved by renumbering a file. Choose and document a maintenance/rollout strategy or a separate compatibility rollout before converting stored envelopes.
  4. The migration logs and skips undecryptable or malformed rows. Successful alembic upgrade therefore does not mean all profile rows are normalized. Add an audit/report with counts and ids (no values), define remediation and the condition that allows tool enforcement to turn on.
  5. Keep legacy tools: [] (pre-v3, formerly ignored on Cloud) distinct from intentionally empty current profiles. Check missing/null/bool/noninteger/future schema versions and preserve future entries unchanged. Do not infer legacy solely from current field values after a new pod has already rewritten a row.

Validation required on an isolated real PostgreSQL database:

  • Fresh install and upgrade from the deployed stable schema to the new single head.
  • Encrypted org profile envelopes and legacy org/member/user settings, including malformed and newer entries.
  • Old settings with sub-agents on / switch_llm off retain the same effective tool behavior.
  • New tools: [] remains bare; selected tools are exact; null defaults match preview and actual sandbox launch.
  • A no-op settings/profile save preserves opaque/newer entries, ids, active pointers and revisions.
  • A concurrent old/new writer or the chosen rollout precondition is exercised, with an explicit rollback policy.
  • DEFAULT/PLAN/ACP, task/workflow delegates, and resumed pre-upgrade conversations are checked against the released SDK contract.

Revision 141 (#12) already normalized the three settings columns; it does not replace the profile-envelope migration. #368 supplies the separate context-preservation fix. The remaining launch-unification work belongs in software-agent-sdk#5398 / enterprise#51 and #59. This issue records the larger migration work instead of adding a speculative new implementation PR.

Activity

  1. added
    oss-ohe-parity
    on Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    oss-ohe-parity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions