feat: move report artifacts to OSS storage

This commit is contained in:
Wyndham ARR
2026-08-04 12:37:26 +08:00
parent 727643f1f2
commit a2b86cdf10
45 changed files with 1288 additions and 1417 deletions

View File

@@ -13,10 +13,20 @@ blocked. A not-yet-ended period keeps its fixed C/O cutoff and must be rerun aft
workbook needs those facts. Duplicate publication of the same semantic snapshot is idempotent: the first validated
archive/result pair remains authoritative even if a retry rebuilds different XLSX bytes.
Company-channel XLSX generation is now Web-container deployable without the private `@oai/artifact-tool` npm package:
`company_reports.publishing.ArtifactToolBuilder` builds and reopens workbooks with Python/openpyxl, validates sheet
names/headers/row counts/no-formulas, and treats blank Excel cells as business-empty strings. Node/artifact-tool remains
only a monthly-worker packaging concern.
Monthly and company-channel XLSX generation is now Web/container deployable with Python/openpyxl only. The monthly
builder preserves sheet/header/row/formula/semantic validation, including `=R[row]*C[row]*G[row]`; the company builder
preserves its no-formula contract. Both publishers upload new workbook and `result.json` objects through the existing
immutable OSS adapter, while download routing retains controlled-local compatibility for historical records and keeps
`.web-jobs` queue state local.
## Completed On 2026-08-04
- Repaired deployment availability for monthly and company report artifacts. Removed the monthly Node/private-package
runtime path and the stale Node builders/package manifests, added Python/openpyxl monthly validation, and added
shared OSS publication/read routing with hash/size/MIME rechecks. Migration 016 allows OSS monthly artifact
identities while preserving historical local rows. Local fake-object-store, builder, publisher, download-router and
migration tests pass; the development machine has no Docker, so CentOS image/Compose acceptance is explicitly handed
to the operator. No live report or business data was changed.
## Completed On 2026-08-03
@@ -450,14 +460,12 @@ only a monthly-worker packaging concern.
detached and are not reboot-persistent.
- The latest operator-selected Web credentials were rotated on 2026-07-31, but the password still matches the username.
Rotate it again to a distinct high-entropy value in Keychain, followed by one controlled Web restart.
- The workstation runs Web and worker as separate processes. The checked-in Compose image now supports company-channel
XLSX generation through Python/openpyxl in Web, but intentionally does not claim to run the monthly worker because it
does not package the workstation-only monthly artifact-tool module; a production image/process manager must supply
Node/artifact-tool and the shared output volume before enabling that monthly service.
- A formally controlled no-PII server acceptance run remains appropriate after that deployment packaging is complete.
- The workstation runs Web and worker as separate processes. The checked-in Compose image supports both report paths
through Python/openpyxl; the worker still needs the existing database/OSS secrets and may use `/app/outputs` only for
staging and local `.web-jobs` state. A formally controlled no-PII CentOS Docker acceptance run remains appropriate.
- ARR2.0 now has Git metadata; `main` tracks `origin/main`. Runtime credential values remain outside Git and project
files.
## Last Updated
2026-08-03
2026-08-04

View File

@@ -4,6 +4,7 @@
| Date | Task | Outcome | Docs Updated |
|---|---|---|---|
| 2026-08-04 | Remove private monthly XLSX runtime and make report artifacts deployment-safe | Replaced monthly and company report builders' production path with Python/openpyxl; preserved the exact monthly `TOTAL PRICE` formula and workbook semantic checks; published new monthly/company XLSX and `result.json` artifacts through the existing OSS adapter while retaining legacy local reads; added migration 016 for OSS monthly artifacts, removed Node builders/flags, and added OSS/local download routing tests. Targeted report/deployment tests pass; the full local suite has 307 passes, 3 skips and 8 environment-only errors (`httpx`/Aliyun test setup). Docker and live OSS were intentionally not run in this development environment | Current state, architecture, deployment runbook, migration ledger, evidence/index, stale item |
| 2026-08-03 | Make company-report XLSX generation deploy without private npm | Replaced the company-report builder's Node/private `@oai/artifact-tool` runtime dependency with Python/openpyxl workbook generation and self-validation, removed the private package dependency, enabled `--enable-company-reports` in Compose Web, and documented that only the monthly worker still needs Node/artifact-tool packaging. Focused company-report and deployment-entrypoint tests pass 19/19; no migration or live deployment was performed | Current state/history, architecture, deployment evidence/index, stale item, runbooks |
| 2026-08-03 | Execute controlled fix and live-accept 2026-08 `01-10` company report | With explicit confirmation, stopped only the stale PID 11176 and started new listener PID 54127 through the existing Keychain-backed launcher. One authorized job `05cc547d…` succeeded 5/5 with row counts `54/18/7/1/15`, captured active Booking batch-7 source metadata, reused the existing version/artifact identities, and passed five HTTP download/hash checks. Logout and temporary-file cleanup completed; no Booking/Finance source or fact mutation occurred | Current state, runtime evidence/index, stale item, commitments, scoped planning record |
| 2026-08-03 | Diagnose the latest 2026-08 `01-10` official-Excel save failure | Read-only evidence confirms newest job `087dceca...` built all five companies (`54/18/7/1/15`) and failed only at publish. Port 8766 is still PID 11176 from 2026-08-02, older than the semantic-reuse publisher fix; the earlier successful five-file archive/result/current set remains hash-consistent and intact. The launcher preflight is ready and six publisher tests pass. Repair is an exact controlled listener replacement followed by one authorized rerun; no restart, report write or business-data mutation was performed | Current state, runtime evidence/index, stale item, scoped planning record |