fix: repair Docker build — TS errors and missing docs in image

- Remove unused `httpx` import from bench.ts (package does not exist)
- Add explicit `IRouter` type on `router` in agent-outputs.ts and bench.ts
  to resolve TS2742 portable-type errors
- Remove `docs` from .dockerignore so Dockerfile.admin can copy it into
  the runner image (DOCS_ROOT=/app/docs is read at runtime by the admin)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-04 10:52:27 +00:00
parent 05f748159b
commit 41302d9f36
3 changed files with 4 additions and 7 deletions

View File

@@ -12,7 +12,6 @@
**/.env
**/.env.local
**/*.log
docs
infra/docker/data
**/__tests__
**/*.test.ts

View File

@@ -1,4 +1,4 @@
import { Router } from 'express';
import { Router, type Request, type Response, type IRouter } from 'express';
import { nanoid } from 'nanoid';
import { db } from '../db/index.js';
import { agentOutputs, tipFeedback, tipViews } from '../db/schema.js';
@@ -7,9 +7,8 @@ import { config } from '../config.js';
import { getProfile, type Profile } from '../profile/builder.js';
import { todoistSource } from '../signals/todoist.js';
import { SignalAggregator } from '../signals/aggregator.js';
import type { Request, Response } from 'express';
const router = Router();
const router: IRouter = Router();
// Separate aggregator instance — avoids circular dep with recommender.ts.
const _agentAggregator = new SignalAggregator().register(todoistSource);

View File

@@ -8,11 +8,10 @@
* GET /api/bench/leaderboard/:experiment — leaderboard by (model, prompt)
*/
import { Router, Request, Response } from "express";
import httpx from "httpx";
import { Router, type Request, type Response, type IRouter } from "express";
import * as process from "process";
const router = Router();
const router: IRouter = Router();
const MLFLOW_URL = process.env.MLFLOW_URL || "http://mlflow:5000";
const MLFLOW_USER = process.env.MLFLOW_TRACKING_USERNAME || "admin";