refactor(api): compose research services with narrow collaborators (CL28)
This commit is contained in:
parent
3a63b2039e
commit
24487d35da
28 changed files with 281 additions and 94 deletions
|
|
@ -6,7 +6,7 @@ import { PostgresBacktestRunRepository } from '../../apps/stock/orchestrator/src
|
|||
import { BacktestLeaseLostError } from '../../apps/stock/orchestrator/src/backtest/run-repository';
|
||||
import { canonicalReproductionHash } from '../../apps/stock/web-api/src/services/reproduction-comparison';
|
||||
import { ResearchAgentsService } from '../../apps/stock/web-api/src/services/research-agents.service';
|
||||
import { ResearchService } from '../../apps/stock/web-api/src/services/research.service';
|
||||
import { createResearchServices } from '../../apps/stock/web-api/src/services/research-services';
|
||||
import { deferred } from '../fixtures/canonical-runner';
|
||||
import { logger } from '../fixtures/execution';
|
||||
import { nativeReplayFixture } from '../fixtures/native-replay';
|
||||
|
|
@ -201,7 +201,7 @@ describe.skipIf(!process.env.PIPELINE_TEST_DATABASE_URL || !process.env.BACKTEST
|
|||
}, 60000);
|
||||
test('four slots cannot bypass agent admission capacity or per-attempt absolute deadlines', async () => {
|
||||
const f = await fixture();
|
||||
const research = new ResearchService({ postgres: f.postgres, logger });
|
||||
const research = createResearchServices({ postgres: f.postgres, logger }).research;
|
||||
const project = await research.createProject({ title: 'Pool budget gate' }, 'operator');
|
||||
const agents = new ResearchAgentsService({ postgres: f.postgres, logger });
|
||||
const agent = await agents.create({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue