Skip to content

fix(crewai): preserve Studio data across container replacement - #4960

Closed
tang-vu wants to merge 1 commit into
Osmantic:public-betafrom
tang-vu:fix/beta-crewai-persistent-working-directory-20260914
Closed

tang-vu wants to merge 1 commit into
Osmantic:public-betafrom
tang-vu:fix/beta-crewai-persistent-working-directory-20260914

Conversation

@tang-vu

@tang-vu tang-vu commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Ready for independent review (2026-09-15). Candidate 2d432e6708aa4f08c19888d4e175280ed4fd9d96 has a successful GitHub check rollup and no base-branch conflict at this review snapshot. This supersedes earlier draft-status wording only. All validation gaps, migration requirements, live gates and independent human review requirements below remain in force; this is not a merge-ready approval.

Summary

Link the pinned CrewAI Studio database into ODS's existing /app data mount while retaining /CrewAI-Studio as the working directory for application code and relative image assets. Include an overwrite-protected SQLite migration procedure for existing containers.

Why this matters

The actual shipped image hardcodes DB_NAME = 'crewai.db' relative to /CrewAI-Studio; mounting /app alone preserves no Studio database. Agents, tasks, crews and tool configuration are lost on container replacement. Moving the entire working directory would also break img/crewai_logo.png, so the startup command redirects only SQLite. It accepts its existing expected link on restart and refuses to replace an unmounted regular database file silently.

Overlap check

Searched all open/closed upstream CrewAI PRs and the changed Compose path in the 3,000-PR file index. #636/#658 fix healthchecks; #643 changes Compose naming; #554/#675 concern manifests. None wires the Studio database into the mounted data directory. The pinned image was inspected directly because its 2024 application differs materially from current upstream source.

Validation

  • Compose/startup boundary regression fails on the base, then verifies link creation, restart idempotence, preserved working directory/argv, and refusal to overwrite an existing regular database. Wired into make test.
  • Exact candidate 2d432e67, shipped image digest sha256:5438b8fbedc5bf98481de10e8fa9be13672c88a2bc9981f30b3747e99eec1e4e, Linux/amd64 Docker on WSL: created committed WAL data in an old container and executed the README backup code.
  • After replacement, Streamlit's actual HTTP health endpoint responded. The pinned Studio's real db_utils.load_entities/save_entity functions read the old record and round-tripped a new record across create, restart and recreation; the relative logo remained present. All fixture containers/volumes were removed.
  • Scoped pre-commit and diff checks pass. Full gate reproduces the baseline root-WSL no-sudo fixture failure.

Migration, rollback, and remaining gate

Keep Studio idle from backup through recreation, back up the host data directory, and verify saved objects before resuming writes. The README distinguishes already-lost ephemeral data and files written by agent tools outside the mount. Keep the link command when rolling back unrelated changes.

All Docker platforms consume the same definition; live coverage is Linux/amd64. No model-provider request, crew execution, or browser migration was tested. Still requires independent human review and an existing-installation browser migration check before merge. Final integration will preserve this independent Makefile call alongside the other extension regressions.

Final candidate 2d432e6708aa4f08c19888d4e175280ed4fd9d96: 32 successful CI checks, 4 conditionally skipped; no pending or failed checks.

Batch integration receipt

This is one of 30 independently branched public-beta PRs. The published synthetic integration head is 61f4c6fccc81bea697f4941683fefb5089ba77f4, built from baseline d49ad4bbc760be319de7f4c9b9a93b1f18fe3922 in this reproducible order:

#4946 → #4948 → #4951 → #4954 → #4972 → #4960 → #4961 → #4957 → #4964 → #4967 → #4968 → #4971 → #4975 → #4976 → #4984 → #4982 → #4990 → #4988 → #4989 → #4997 → #5003 → #5006 → #5007 → #5009 → #5012 → #5011 → #5013 → #5014 → #5020 → #5021

Reconciliation preserved all 146 files owned by a single PR byte-for-byte against their exact candidate heads. The eight shared paths preserve both CLI STT/TTS commands and help, every added Makefile test, both environment schema additions and all Extensions UI behavior. LanguageTool and Kroki both remain headless API entries. Canonical regeneration yields 76 catalog entries and 47 library manifests; all README rows are retained. Shared-file changes need these additive resolutions when merged independently.

Combined validation: 2,852 API tests passed / 1 skipped; 1,082 UI tests passed; 47 manifests passed; all 12 added Makefile commands passed; 12 catalog boundary tests passed / 12 opt-in runtime tests skipped in this combined run. Individual exact-image results remain documented above. UI lint/build, scoped secret hooks, diff checks, four platform smoke tests and installer simulation passed. Compose plans for NVIDIA/AMD/Apple each contain 20 services and no duplicate published bindings across the core plus 12 new recipes; this is static plan evidence, not simultaneous startup or GPU inference.

The first unrestricted UI run timed out in two tests under concurrent load; the complete rerun used --maxWorkers=2 with unchanged assertions and timeouts and passed. ESLint reports zero errors and 603 warnings, including the existing JSX usage-detection pattern. Full local make gate still fails the no-sudo Docker baseline covered by #3158. BATS records 416 passed / 5 failed on this root/WSL host (platform detection, root preflight and a 15 GiB versus 20 GiB free-space expectation). Neither full local gate nor BATS is described as green.

This integration receipt supplements each PR's own regression and does not waive its independent review, live hardware/browser/upgrade gates or rollback requirements. The PRs remain drafts; none was merged upstream.

This was referenced Sep 14, 2026
@tang-vu
tang-vu marked this pull request as ready for review September 15, 2026 01:33
@Lightheartdevs

Copy link
Copy Markdown
Collaborator

Thanks for this contribution. public-beta was promoted into main on 2026-09-24 and no longer receives changes, so we're closing pull requests that target it. This isn't a judgment on the change itself. If it's still needed, please rebase onto main and open a focused PR. See #7253 for details and the contribution policy.

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