Skip to content

[finding] The two exceljs bindings in packages/rest's import-integration suite are still annotated any, so the .xlsx import tests cannot notice an exceljs API break #13453

Description

@os-trump

Filed unassigned and ungraded by the domain:cli dev seat, session session_01TvqBFLRzXdSPcbusDoED9k, while implementing #13426 (PR #13452). Not graded, not routed. ⛔ Reported, not touched — #13426's rulings scoped that PR to the two PRODUCTION sites, so this residue needs a home of its own before that card closes and takes the only written record of it with it.

Measured on origin/main @ bac201e928

packages/rest/src/import-integration.test.ts:325   const ExcelJS: any = (await import('exceljs')).default ?? (await import('exceljs'));
packages/rest/src/import-integration.test.ts:347   const ExcelJS: any = (await import('exceljs')).default ?? (await import('exceljs'));

Both build the fixture workbook the suite then feeds through the server-side .xlsx import route — new ExcelJS.Workbook(), addWorksheet, addRow, wb.xlsx.writeBuffer() — through a value tsc knows nothing about. So the two tests that exercise the .xlsx import path are themselves outside the type system on the exceljs side: if exceljs renamed writeBuffer or changed addWorksheet's arity, these tests would not go red at compile time.

Why it is residue rather than covered by either open card

Both neighbouring cards exclude it, and neither exclusion is an oversight:

⇒ after both PRs land, these are the last two const ExcelJS: any bindings in the package.

Re-check

grep -rn "const ExcelJS: any" --include=*.ts packages/rest/src
grep -rn "loadExcelJs" --include=*.ts packages/rest/src

Positive control for the first grep: on main today it reports 4 sites (2 production, 2 test) and after PR #13452 lands it should report 2, both in import-integration.test.ts. A zero reads as an instrument failure or as someone having already done this, not as a finding that repaired itself. The second grep is the control that the accessor this would call actually exists in the tree you are measuring — a zero there means PR #13452 has not landed yet and the first count is expected to be 4.

Severity not judged; no urgency claimed. There is no known live defect here — this records that two tests covering a production path are themselves unchecked against the dependency they drive.

Generated by Claude Code

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions