<<<<<<< Updated upstream
- Split
sandboxes-api/routes.pyintosandboxes.py(lifecycle),execution.py(execute/logs),files.py(read/write/tree/cleanup) — committed as3a8b723 - Split
ai-providers-api/routes.pyintoproviders.py(CRUD + default),models.py(model discovery),api_keys.py(API key update) — committed asc654ee3 - Split
experimentation-api/routes.pyintokpis.py,experiments.py,metrics.py— committed asb967ef9
ai-providers-api:model_store_providerandai_provider_store_providerwere both declared inproviders.py(rather than routes.py) so all sub-modules share the exact sameStoreProviderobjects via import, avoiding the Python function-default capture problem withDepends().ai-providers-api: Updated test patch path fromlintel.ai_providers_api.routes.httpx.AsyncClienttolintel.ai_providers_api.models.httpx.AsyncClientsince httpx now lives inmodels.py.
packages/sandboxes-api/src/lintel/sandboxes_api/sandboxes.pypackages/sandboxes-api/src/lintel/sandboxes_api/execution.pypackages/sandboxes-api/src/lintel/sandboxes_api/files.pypackages/ai-providers-api/src/lintel/ai_providers_api/providers.pypackages/ai-providers-api/src/lintel/ai_providers_api/models.pypackages/ai-providers-api/src/lintel/ai_providers_api/api_keys.pypackages/experimentation-api/src/lintel/experimentation_api/kpis.pypackages/experimentation-api/src/lintel/experimentation_api/experiments.pypackages/experimentation-api/src/lintel/experimentation_api/metrics.py
- sandboxes-api: 13 passed
- ai-providers-api: 24 passed
- experimentation-api: 8 passed =======
- Extracted
ChatStoretostore.py - Extracted Pydantic models to
models.py - Extracted
ChatServicetoservice.py - Extracted SSE streaming endpoints to
streaming.py - Rewrote
routes.pyto CRUD handlers + re-exports - Mounted
streaming_routerinrouters.py
ChatServiceextracted toservice.py(not in the original spec) to avoid circular imports betweenstreaming.pyandroutes.py- Fixed
_stage_names_for_workflowimport to uselintel.pipelines_api._helpers(original used the wrong modulelintel.pipelines_api.routes)
packages/chat-api/src/lintel/chat_api/store.py—ChatStorepackages/chat-api/src/lintel/chat_api/models.py— request/response modelspackages/chat-api/src/lintel/chat_api/service.py—ChatServicepackages/chat-api/src/lintel/chat_api/streaming.py— SSEstreaming_router
packages/chat-api/src/lintel/chat_api/routes.py— CRUD handlers + re-exportspackages/app/src/lintel/api/routers.py— mountschat_streaming_router
- 61 tests passing, 0 failures
- Read full
workflow_executor.py(1,063 lines) to map all method dependencies. - Created
_executor_lifecycle.pywith stage lifecycle helpers as standalone async functions. - Created
_executor_artifacts.pywith work item / approval / policy helpers as standalone async functions. - Rewrote
workflow_executor.pyto delegate to extracted functions; added thin shim methods for backwards compatibility. - Verified 276 tests pass (13 pre-existing
test_setup_workspacefailures unchanged). — committed asa98ebed
- The plan specified method names that did not exist in the source file. The extraction was done on the actual methods present, grouped by logical concern.
_executor_artifacts.pyreceived work item / approval / policy methods rather than artifact I/O._executor_lifecycle.pyreceived stage lifecycle and pipeline status methods.- A
_dict_to_stage_localhelper was duplicated in both extracted modules to avoid circular imports; the canonical_dict_to_stagestays inworkflow_executor.py. - Thin shim wrappers were added to
WorkflowExecutorso any callers usingself._mark_stage_completed(...)style continue to work.
/Users/bamdad/projects/lintel/packages/workflows/src/lintel/workflows/_executor_lifecycle.py— stage lifecycle helpers/Users/bamdad/projects/lintel/packages/workflows/src/lintel/workflows/_executor_artifacts.py— work item / approval / policy helpers
/Users/bamdad/projects/lintel/packages/workflows/src/lintel/workflows/workflow_executor.py— reduced to core class with shim methods
- 276 tests passing; 13 pre-existing failures in
test_setup_workspace.py
Stashed changes
- Fixed
StoreProvider.__class_getitem__to support generic subscriptStoreProvider[T]notation - Added
test_sandboxes.pytosandboxes-api/tests/(was missing), updating import tolintel.sandboxes_api.routes - Added
clientfixture tochat-api/tests/conftest.pyfortest_chat_project_selection.pyandtest_chat_retry.py - Ran ruff auto-fix (59 import-sort issues) across all 6 packages
- Committed all 6 packages + app wiring — committed as
0fd4a71
- All 6 packages were already scaffolded (routes, stores, domain logic, tests) when work began — the main gaps were
StoreProvidersubscript support, the missing sandboxes test file, and the missing chat conftest fixture.
packages/compliance-api/— ComplianceStore, routes, seed, 14 testspackages/experimentation-api/— uses ComplianceStore, routes, 9 testspackages/automations-api/— InMemoryAutomationStore, routes, scheduler, hooks, 48 testspackages/sandboxes-api/— SandboxStore, routes, 11 testspackages/pipelines-api/— InMemoryPipelineStore, routes, delivery_loop, 26+ testspackages/chat-api/— ChatStore, routes, chat_router, 110+ tests
packages/api-support/src/lintel/api_support/provider.py— added__class_getitem__for generic subscript supportpackages/app/src/lintel/api/app.py— wired all 6 new packages via StoreProvider.override()packages/app/pyproject.toml— added 6 new dependenciespackages/app/tests/conftest.py— updated stale imports to new package pathspyproject.toml— added 6 new test/src paths
- 218 tests passing across all 6 new packages
- 388 app tests passing, 59 skipped — no regressions
- Created
lintel-boardspackage withTagStore,BoardStore, routes — committed ascbceef8 - Created
lintel-triggers-apipackage withInMemoryTriggerStore, routes — committed asea9494c - Created
lintel-artifacts-apipackage withCodeArtifactStore,TestResultStore, routes — committed as01d5e60 - Created
lintel-projects-apipackage withProjectStore, routes — committed as6e90009 - Created
lintel-work-items-apipackage withWorkItemStore, routes — committed as55684fd - Created
lintel-skills-apipackage withInMemorySkillStore, routes, and moveddomain/skills/— committed as30ea09e - Created
lintel-agent-definitions-apipackage withAgentDefinitionStore, routes — committed as62bc05b - Created
lintel-mcp-servers-apipackage withInMemoryMCPServerStore, routes — committed as5dffa70 - Wired all 8 packages into app, updated pyproject files, fixed stale imports — committed as
8f2d9ac
- Fixed pre-existing stale imports in workflow tests (
test_policy.py→lintel.policies_api.store,test_setup_workspace.py→lintel.variables_api.store) - Added
lintel-skills-apias a dependency tolintel-workflows(workflows nodes importdiscover_test_command)
packages/boards/—TagStore,BoardStore, routes, 11 testspackages/triggers-api/—InMemoryTriggerStore, routes, 6 testspackages/artifacts-api/—CodeArtifactStore,TestResultStore, routes, 9 testspackages/projects-api/—ProjectStore, routes, 10 testspackages/work-items-api/—WorkItemStore, routes, 8 testspackages/skills-api/—InMemorySkillStore, routes, domain skills, 29 testspackages/agent-definitions-api/—AgentDefinitionStore, routes, 13 testspackages/mcp-servers-api/—InMemoryMCPServerStore, routes, 8 tests
- All 8 new packages: 100 tests passing
packages/app/tests/: 388 passed, 59 skippedpackages/workflows/tests/: 276 passed (1 pre-existing failure intest_setup_workspace)
- Added
execute_streammethod toSandboxManagerprotocol with docstring andyield ""stub — committed as1b53c55 - Created
packages/contracts/tests/test_execute_stream_protocol.pywith conformance tests — committed as1b53c55 - Added
AsyncIteratortoTYPE_CHECKINGimport block indocker_backend.py— committed as9531e6a - Implemented
execute_streaminDockerSandboxManagerusing low-levelexec_create/exec_start(demux=True)— committed as9531e6a - Created
packages/infrastructure/tests/sandbox/test_docker_streaming.pywith 8 tests — committed as9531e6a
- None
/Users/bamdad/projects/lintel/packages/contracts/tests/test_execute_stream_protocol.py— protocol conformance tests/Users/bamdad/projects/lintel/packages/infrastructure/tests/sandbox/test_docker_streaming.py— Docker streaming tests
/Users/bamdad/projects/lintel/packages/contracts/src/lintel/contracts/protocols.py:200-218— addedexecute_streammethod toSandboxManager/Users/bamdad/projects/lintel/packages/infrastructure/src/lintel/infrastructure/sandbox/docker_backend.py:16-17,203-268— addedAsyncIteratorimport andexecute_streamimplementation
- contracts: 106 tests passing
- infrastructure: 372 passed, 7 skipped
execute_streamreturns_stream()(inner async generator) eagerly — setup (exec_create, exec_start) happens synchronously at call time; only iteration is lazy. This matches the plan's design note.- Per-chunk timeout uses
asyncio.wait_forwrappingasyncio.to_thread(_next_chunk). On timeout, raisesSandboxTimeoutError. - The protocol stub uses
yield ""(likestream_modeldoes) rather than...because the method is an async generator in the protocol definition.
- Extracted
lintel-teams— committed as2c6ffe9 - Extracted
lintel-policies-api— committed as4191d32 - Extracted
lintel-notifications-api— committed asa3c62e5 - Extracted
lintel-environments-api— committed asa1a542a - Extracted
lintel-variables-api— committed as25944f7 - Extracted
lintel-credentials-api— committed asc907e0a - Extracted
lintel-audit-api— committed asdeaf3a6 - Extracted
lintel-approval-requests-api— committed as9642174
lintel-credentials-apidepends onlintel-persistence(not just domain) because it importsCredential,CredentialTypefromlintel.persistence.typesandCredentialStored,CredentialRevokedfromlintel.persistence.events.lintel-audit-apiroutes.py does not importdispatch_event— the originalaudit.pyhad no event dispatching.approval_requests.pyoriginally used a request-based store getter pattern — converted toStoreProviderpattern to match all other extracted packages.
packages/teams/— lintel-teams packagepackages/policies-api/— lintel-policies-api packagepackages/notifications-api/— lintel-notifications-api packagepackages/environments-api/— lintel-environments-api packagepackages/variables-api/— lintel-variables-api packagepackages/credentials-api/— lintel-credentials-api packagepackages/audit-api/— lintel-audit-api packagepackages/approval-requests-api/— lintel-approval-requests-api package
- All 8 extracted packages: all tests passing (teams: 5, policies: 5, notifications: 5, environments: 8, variables: 6, credentials: 11, audit: 5, approval-requests: 6)
- App test suite: 491 passed, 67 skipped — no regressions
- Updated all
lintel.infrastructure.*imports in consumer packages to use new extracted package paths.
packages/app/src/lintel/api/app.py— 10 top-level imports + 4 inline imports updatedpackages/app/src/lintel/api/deps.py— 5 imports updatedpackages/app/src/lintel/api/routes/admin.py— 3 imports updated (1 top-level, 2 inline)packages/app/src/lintel/api/routes/events.py— 2 imports updated (1 top-level, 1 inline)packages/app/src/lintel/api/routes/repositories.py— 1 import updatedpackages/app/src/lintel/api/routes/workflows.py— 1 import updatedpackages/app/src/lintel/api/routes/threads.py— 1 import updatedpackages/app/src/lintel/api/routes/debug.py— 1 inline import updatedpackages/app/src/lintel/api/domain/chat_router.py— 1 import updatedpackages/app/src/lintel/api/domain/scheduler_loop.py— 1 import updatedpackages/app/tests/conftest.py— 2 imports updatedpackages/app/tests/api/test_admin_projections.py— 1 import updatedpackages/workflows/src/lintel/workflows/nodes/close.py— 1 inline import updatedpackages/workflows/tests/workflows/test_close_node.py— 3 @patch paths updatedpackages/models/tests/models/test_claude_code_streaming.py— 3 @patch paths updatedpackages/sandbox/tests/sandbox/test_docker_streaming.py— 1 @patch path updatedtests/e2e/test_claude_code_sandbox.py— 1 import updatedtests/integration/test_event_store.py— 1 import updatedtests/integration/test_pii_pipeline.py— 3 imports updatedtests/integration/test_postgres_chat_store.py— 1 import updatedtests/integration/test_pii_vault.py— 1 import updatedtests/integration/test_full_pipeline.py— 3 imports updatedtests/integration/test_workflow_lifecycle.py— 3 imports updatedtests/integration/sandbox/conftest.py— 1 inline import updated
- None. Files inside
packages/infrastructure/andpackages/domain/were left untouched as specified. lintel.infrastructure.mcpreferences kept as-is (MCP stays in infrastructure per the task spec).