refactor(docker): split requirements by role, slim enterprise bundle by default

Split requirements.txt into role-specific files:
  - requirements-backend.txt — FastAPI API runtime
  - requirements-agent.txt — Gradio/LangGraph agent (no embeddings)
  - requirements-embeddings.txt — opt-in sentence-transformers

Default enterprise bundle (./build.sh bundle) builds slim agent without
sentence-transformers/torch (~500 MB saved). Embeddings opt-in via
./build.sh bundle:embeddings <tag>. Embedding router degrades gracefully
when package is absent (ImportError catch in _embedding_router.py).

Updated Dockerfiles:
  - backend.Dockerfile → requirements-backend.txt
  - Dockerfile.agent → requirements-agent.txt + WITH_EMBEDDINGS build arg
  - all-in-one.Dockerfile → requirements-backend.txt

Added embeddings variant to build.sh with full manifest/digest output.
Hardened .dockerignore (cache, report, model, archive patterns).

Other branch work: align git route mocks with async services, remove
legacy agent test files superseded by contract tests.
This commit is contained in:
2026-07-06 10:06:07 +03:00
parent 641e6fcf0f
commit dcee86c260
20 changed files with 575 additions and 501 deletions

View File

@@ -47,11 +47,11 @@ describe('AssistantChatPanel integration contract', () => {
const source = fs.readFileSync(COMPONENT_PATH, 'utf-8');
expect(source).toContain('<!-- #region AssistantChatPanel');
expect(source).toContain('@UX_STATE: LoadingHistory');
expect(source).toContain('@UX_STATE: Sending');
expect(source).toContain('@UX_STATE: Error');
expect(source).toContain('@UX_FEEDBACK: Started operation surfaces task_id');
expect(source).toContain('@UX_RECOVERY: User can retry command');
expect(source).toContain('@UX_STATE LoadingHistory');
expect(source).toContain('@UX_STATE Sending');
expect(source).toContain('@UX_STATE Error');
expect(source).toContain('@UX_FEEDBACK Started operation surfaces task_id');
expect(source).toContain('@UX_RECOVERY User can retry command');
expect(source).toContain('<!-- #endregion AssistantChatPanel -->');
});

View File

@@ -34,8 +34,8 @@ describe('BulkReplaceModal Component', () => {
expect(source).toContain('@UX_STATE applying');
expect(source).toContain('@UX_STATE applied');
expect(source).toContain('@UX_STATE apply_error');
expect(source).toContain('bulkFindReplace');
expect(source).toContain('bulkReplacePreview');
expect(source).toContain("bulk_replace");
expect(source).toContain("bulk_replace?.preview_count");
});
it('accepts show, runId, targetLanguages, onClose, onApplied props', () => {