Remove Record usage in agent MCP e2e test
This commit is contained in:
@@ -567,7 +567,8 @@ Build a new Codex MCP provider side‑by‑side with the existing Codex SDK prov
|
||||
- If any criteria fail, add follow-up fix tasks
|
||||
- **Done (2025-12-25 10:44)**: WHAT: captured refactor/test/typecheck audit in `REPORT-refactor-validation-test-audit.md:1` and stored full test output in `test-output.txt:1`; updated task status and follow-up tasks in `plan.md:538`. RESULT: found remaining `Record<string, unknown>` usage across agent files, 1 failing test + 1 skipped test before suite halted with MCP JSONRPC error, and 5 typecheck errors in `codex-mcp-agent.ts`. EVIDENCE: `rg -n "as \\{|as Record|Record<string, unknown>" packages/server/src/server/agent/`, `rg -n "\\?\\?" packages/server/src/server/agent/providers/codex-mcp-agent.ts`, `npm run test --workspace=@paseo/server 2>&1 | tee test-output.txt`, `grep -E "skip|Skip|SKIP|todo|TODO" test-output.txt`, `npm run typecheck --workspace=@paseo/server`.
|
||||
|
||||
- [ ] **Fix**: Remove `Record<string, unknown>`/`as` usage in `packages/server/src/server/agent/agent-mcp.e2e.test.ts` at lines 13, 14, 18, 62, 71.
|
||||
- [x] **Fix**: Remove `Record<string, unknown>`/`as` usage in `packages/server/src/server/agent/agent-mcp.e2e.test.ts` at lines 13, 14, 18, 62, 71.
|
||||
- **Done (2025-12-25 10:47)**: WHAT: replaced `Record<string, unknown>` uses with `StructuredContent` and a type guard in `packages/server/src/server/agent/agent-mcp.e2e.test.ts:13`, `packages/server/src/server/agent/agent-mcp.e2e.test.ts:19`, `packages/server/src/server/agent/agent-mcp.e2e.test.ts:21`, `packages/server/src/server/agent/agent-mcp.e2e.test.ts:69`, `packages/server/src/server/agent/agent-mcp.e2e.test.ts:78`. RESULT: `Record<string, unknown>`/cast usage removed from the specified lines while preserving structured payload handling. EVIDENCE: `rg -n "Record<string, unknown>" packages/server/src/server/agent/agent-mcp.e2e.test.ts` (no matches).
|
||||
|
||||
- [ ] **Fix**: Remove `Record<string, unknown>`/`as` usage in core agent files:
|
||||
- `packages/server/src/server/agent/model-catalog.ts:180`
|
||||
|
||||
Reference in New Issue
Block a user