Files
wyndham-ARR/.project-docs/50-evidence/topics/2026-08-03-company-report-openpyxl-builder.md
2026-08-03 20:59:59 +08:00

1.7 KiB

Company-Report Openpyxl Builder

Date: 2026-08-03

Finding

The CentOS test-server Docker build failed at npm --prefix company_reports/xlsx install because @oai/artifact-tool@2.8.33 is not available from the public npm registry. This is a packaging/runtime dependency failure, not a database, migration or Docker memory issue.

Change

  • company_reports.publishing.ArtifactToolBuilder now builds official company-channel workbooks with Python/openpyxl.
  • The builder writes the three expected sheets, preserves the existing headers/styles, escapes text that could be interpreted as formulas, reopens the saved workbook and validates sheet names, dimensions, headers, row values and zero formula cells.
  • Blank cells read back from Excel as None are normalized to the business-empty string during validation.
  • company_reports/xlsx/package.json no longer declares the private @oai/artifact-tool dependency.
  • compose.yaml enables --enable-company-reports for Web. IP/HTTP test overrides should keep that flag but omit --secure-cookies.

Verification

  • Watched the new builder test fail against the old Node/private-runtime implementation with BuildError('the XLSX builder runtime is unavailable').
  • Focused verification passed: python -m unittest tests.test_company_reports_publishing tests.test_company_reports_integration tests.test_company_reports_acceptance tests.test_company_reports_service tests.test_deployment_entrypoints with 19 tests passing.

Remaining Boundaries

The monthly worker still uses its separate Node/artifact-tool workbook builder. This change makes company-channel detail Excel generation deployable in the Web image; it does not package or supervise the monthly worker.