Skip to content

Add BM-004 through BM-008 backend management specs and @spec tags#728

Draft
malhotra5 wants to merge 1 commit into
mainfrom
specs/backend-management-2
Draft

Add BM-004 through BM-008 backend management specs and @spec tags#728
malhotra5 wants to merge 1 commit into
mainfrom
specs/backend-management-2

Conversation

@malhotra5
Copy link
Copy Markdown
Member

@malhotra5 malhotra5 commented May 21, 2026

  • A human has tested these changes.

Why

The backend management spec file only covered 3 behavioral specs (BM-001–BM-003). Several core backend operations (add, switch, remove) plus env-key sync and conversation memory had no formal specs or traceability tags.

Summary

  • Add 5 new specs: BM-004 (Add a backend), BM-005 (Switch active backend), BM-006 (Remove a backend), BM-007 (Default backend API key stays in sync with env), BM-008 (Per-backend conversation memory).
  • Tag all relevant implementation code and tests with @spec BM-0XX comments for grep-based traceability.

How to Test

# Verify all tags are present
grep -rn '@spec BM-' src/ __tests__/

# Run the tagged tests
npm test -- --run \
  __tests__/contexts/active-backend-context.test.tsx \
  __tests__/components/backends/backend-selector.test.tsx \
  __tests__/api/backend-registry/last-conversation-store.test.ts

All 33 tests pass. No behavioral or code changes — only spec file additions and comment annotations.

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes

BM-007 (syncDefaultLocalBackendAuth) is the only spec with no dedicated test coverage yet — it's a private helper in storage.ts that runs during readStoredBackends().

This PR was created by an AI agent (OpenHands) on behalf of the user.

@malhotra5 can click here to continue refining the PR


🐳 Docker images for this PR

GHCR package: https://github.com/OpenHands/agent-canvas/pkgs/container/agent-canvas

Component Value
Image ghcr.io/openhands/agent-canvas
Architectures amd64, arm64
Agent Server ghcr.io/openhands/agent-server:1.23.0-python
Automation openhands-automation==1.0.0a3
Commit f242f32d6ae39605d9874f09d846cbeca70678b5

Pull (multi-arch manifest)

# Multi-arch manifest — Docker automatically pulls the correct architecture
docker pull ghcr.io/openhands/agent-canvas:sha-f242f32

Run

docker run -it --rm \
  -p 8000:8000 \
  ghcr.io/openhands/agent-canvas:sha-f242f32

All tags pushed for this build

ghcr.io/openhands/agent-canvas:sha-f242f32-amd64
ghcr.io/openhands/agent-canvas:specs-backend-management-2-amd64
ghcr.io/openhands/agent-canvas:pr-728-amd64
ghcr.io/openhands/agent-canvas:sha-f242f32-arm64
ghcr.io/openhands/agent-canvas:specs-backend-management-2-arm64
ghcr.io/openhands/agent-canvas:pr-728-arm64
ghcr.io/openhands/agent-canvas:sha-f242f32
ghcr.io/openhands/agent-canvas:specs-backend-management-2
ghcr.io/openhands/agent-canvas:pr-728

About Multi-Architecture Support

  • Each tag (e.g., sha-f242f32) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., sha-f242f32-amd64) are also available if needed

BM-004: Add a backend
BM-005: Switch active backend
BM-006: Remove a backend
BM-007: Default backend API key stays in sync with env
BM-008: Per-backend conversation memory

Co-authored-by: openhands <openhands@all-hands.dev>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agent-canvas Ready Ready Preview, Comment May 21, 2026 11:40pm

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

📸 Snapshot Test Report

Warning

Snapshot comparison step crashed (timeout, OOM, or runner error) — diff results below may be incomplete or absent.
Check the CI logs for the full error output (look for the "Run snapshot comparison" step).

❌ 2 snapshots differ from the main branch baselines. Add the update-snapshots label to acknowledge intentional changes.

Category Count
🔴 Changed 2
🆕 New 0
✅ Unchanged 71
Total 73

How to resolve:

  • Unintentional diffs — the baselines on main may have moved since this branch was created. Merge the latest main into this branch and re-run CI.
  • Intentional changes — add the update-snapshots label. CI will pass and the new screenshots become the baseline when this PR merges.
🔴 Changed snapshots (2)

backends-extended

backend-after-switch

Expected (main) Actual (PR) Diff
expected actual diff

sidebar

sidebar-collapsed

Expected (main) Actual (PR) Diff
expected actual diff
✅ Unchanged snapshots (71)

archived-conversation

  • conversation-panel-with-archived-badges
  • conversation-view-archived
  • conversation-view-sandbox-error

automations

  • automations-delete-modal
  • automations-list-active-inactive
  • automations-no-automations
  • automations-search-no-results

backends-extended

  • backend-add-blank-disabled
  • backend-add-cloud-advanced-open
  • backend-add-cloud-no-key-disabled
  • backend-add-cloud-with-key-enabled
  • backend-add-form-partially-filled
  • backend-add-invalid-url-disabled
  • backend-add-local-ready
  • backend-add-name-only-disabled
  • backend-add-two-column-layout
  • backend-add-whitespace-host-disabled
  • backend-cancel-nothing-saved
  • backend-dropdown-two-backends
  • backend-edit-prefilled
  • backend-manage-after-removal
  • backend-manage-two-listed
  • backend-remove-cancelled
  • backend-remove-confirmation
  • backend-switch-overlay

backends

  • backend-add-modal
  • backend-manage-modal
  • backend-selector-open

changes-tab

  • changes-deleted-file
  • changes-diff-viewer
  • changes-empty

collapsible-thinking

  • reasoning-content-collapsed
  • reasoning-content-expanded
  • think-action-collapsed
  • think-action-expanded

mcp-page

  • mcp-custom-server-1-editor-open
  • mcp-custom-server-2-url-filled
  • mcp-custom-server-3-all-filled
  • mcp-custom-server-4-installed
  • mcp-custom-server-editor
  • mcp-empty-installed
  • mcp-search-filtered
  • mcp-slack-install-1-marketplace
  • mcp-slack-install-2-modal
  • mcp-slack-install-3-filled
  • mcp-slack-install-4-installed

onboarding

  • onboarding-step-0-choose-agent
  • onboarding-step-1-check-backend
  • onboarding-step-2-setup-llm
  • onboarding-step-3-say-hello

projects-workspace-browser

  • projects-workspace-browser

settings-page

  • add-backend-modal
  • analytics-consent-modal
  • home-screen
  • settings-app-page
  • settings-page

settings-secrets

  • secrets-add-form-filled
  • secrets-add-form
  • secrets-after-save
  • secrets-delete-confirm
  • secrets-list

settings-verification

  • condenser-settings
  • verification-settings-off
  • verification-settings-on

sidebar

  • sidebar-conversation-panel
  • sidebar-filter-menu

skills-page

  • skills-empty
  • skills-loaded
  • skills-no-match
  • skills-search-filtered
  • skills-type-filter

Generated by the Snapshot Tests workflow. This comment was created by an AI agent (OpenHands) on behalf of the repo maintainers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants