fix: make daily task log header-only

This commit is contained in:
Wyndham ARR
2026-08-11 17:23:33 +08:00
parent c947230471
commit f2c1265a1c
16 changed files with 251 additions and 34 deletions

View File

@@ -19,6 +19,17 @@ preserves its no-formula contract. Both publishers upload new workbook and `resu
immutable OSS adapter, while download routing retains controlled-local compatibility for historical records and keeps
`.web-jobs` queue state local.
## Daily Interaction Correction On 2026-08-11
- The local source now treats Daily Report rows as informational table rows rather than hidden log controls. It removes
row click and Enter/Space activation, `role=button`, `tabindex`, selected-row decoration and pointer styling. The
explicit needs-review button still focuses the manual-price panel, report downloads remain links, and only the
top-right `任务日志` link opens the trace dialog.
- JavaScript syntax, all 81 `test_arr_web*.py` regressions and an isolated browser interaction check pass. The browser
proved an ordinary `0805.XML` row leaves the dialog closed, the `待人工处理` control focuses a populated review panel,
and the header utility opens the dialog; there were no console errors. This source change has not been pushed or
deployed to `8.138.234.141:8765`, so the reported production behavior remains until a controlled release.
## Implemented Locally On 2026-08-11
- Implemented Booking parser 2.1.0 exact-header compatibility for the user-confirmed July legacy and August bilingual
@@ -31,6 +42,34 @@ immutable OSS adapter, while download routing retains controlled-local compatibi
draft, Booking batch, Finance fact or runtime process was changed. Deployment and a controlled post-restart
read-only replay remain pending; QBD pending items are existing room-type review work, not a header failure.
## Diagnosed On 2026-08-11
- The reported company-channel Booking Excel parse failure occurs before object storage and draft persistence; a
read-only database snapshot shows no new draft/artifact/batch and accepted batch 7 `july-test.xlsx` remains current.
Exact parser replay isolates two cases: generated Daily/channel report workbooks are correctly rejected as the wrong
input type, while current Lian Tai/QBD raw workbooks expose a parser compatibility defect because bilingual
`Tour Code / 主团号` and hotel-detail headers do not equal the narrow exact alias allowlist. Replacing only those two
headers in memory makes both raw workbooks parse, with original files and all business state unchanged. At diagnosis,
the controlled alias expansion plus regression fixtures remained unimplemented. The user has now explicitly confirmed that both
supplied formats must be supported. An exact three-alias process-memory probe recognizes only the intended sheet in
each file: Lian Tai yields 67 rows/100 items/16 pending, while QBD 2026-08-06 yields 104 rows/218 items/212 pending;
Daily/channel output workbooks remain rejected. This parser-only plan needs no migration or upload-page redesign, but
the existing one-file/full-replacement activation model still cannot append two separately uploaded files.
- The exact desktop `0806.XML` deterministically fails processor 4.0.0 before any row or price processing with
`XML_PARSE_ERROR` at line 1872, column 0. A `TRACE_TEXT` value contains one CESU-8 surrogate pair representing
`U+1F389` even though the document declares UTF-8; the file is structurally closed and not truncated. This error is
outside the pure-`PRICE_UNMATCHED` review boundary, so a formal failure with no manual-price panel is correct. The
public deployment health endpoint remains 200. The source must be re-exported as valid UTF-8 and uploaded as a new
task; no source, runtime, database, Finance, object-store or event state was changed during diagnosis.
## Artifact Conversion On 2026-08-11
- The user-supplied `8.6 修正.XML` was an XLSX package mislabeled with an XML extension. Its 181-row first sheet
contains the flattened Opera fields needed by the ARR parser. A separate UTF-8 `RES_DETAIL` XML was reconstructed
from those rows and passed strict XML/UTF-8 checks plus processor 4.0.0: 115 retained rows, 37 rate-code exclusions,
29 duplicates and zero price-unmatched/review rows. The original workbook and malformed XML remain unchanged; no
upload, Finance, database, object-store or event state was changed.
## Runtime Recovery On 2026-08-06
- Restored the local ARR login page after a reported opening failure. No Web process was listening and the retained
@@ -315,8 +354,9 @@ immutable OSS adapter, while download routing retains controlled-local compatibi
- Updated the daily XML upload surface so submitting ARR.XML stays on the daily page instead of opening the task-log
dialog automatically. The upload card now shows a compact stage-based estimate for upload, fixed processing,
validation and database commit, finalizing at 100% on success and retaining an inline error state on failure. The
header task-log button and daily-history row actions still open the existing trace dialog on demand. JavaScript
syntax and 15 focused Web/static/trace tests pass; no API or processing behavior changed.
header task-log button remains the sole on-demand trace entry; the later 2026-08-11 interaction correction removed
daily-history row log activation. JavaScript syntax and the original 15 focused Web/static/trace tests passed; no API
or processing behavior changed.
- Simplified the desktop monthly page into a single six-column download table. The redundant standard-monthly heading,
`VERSION HISTORY`/version-record copy, visible monthly `版本` column and C/O-period footer note are removed; the
navigation label is now `月报`; the list is identified by a compact `月报处理` heading. The visible `更新至` cell reads the explicit `max_arrival_date` API field, which is
@@ -401,10 +441,10 @@ immutable OSS adapter, while download routing retains controlled-local compatibi
- The desktop and H5 headers use the plain `ARR Report` identity with no decorative icon. The daily content heading is
`Daily Report`; the duplicated daily/monthly explanatory copy has been removed without changing automatic publishing.
- The desktop header utility formerly labeled `手机看板` is now `任务日志` and opens the existing black task console in
a native modal. The console no longer occupies the daily-processing layout; upload completion and daily-history row
activation open the selected job directly. `/h5` remains available by direct URL. Both history and trace SQL are
explicitly limited to `pipeline_type = 'opera_daily'`, so this is a one-daily-job processing trace rather than a
global server, monthly-run or company-report log.
a native modal. The console no longer occupies the daily-processing layout, and the 2026-08-11 interaction correction
makes this header utility its only opener; upload completion and Daily rows do not open it. `/h5` remains available
by direct URL. Both history and trace SQL are explicitly limited to `pipeline_type = 'opera_daily'`, so this is a
one-daily-job processing trace rather than a global server, monthly-run or company-report log.
- Refined the daily desktop surface after visual review. `ARR Report` remains the dominant workspace title while
`Daily Report` is smaller; `任务日志` is a compact outlined button at the adjacent status-label size; the upload
station is centered and responsive; decorative `01 / UPLOAD` and `本月留痕` labels are gone; and `开始处理` is a

View File

@@ -5,7 +5,12 @@
| Date | Task | Outcome | Docs Updated |
|---|---|---|---|
| 2026-08-11 | Implement Lian Tai/QBD bilingual Booking-header compatibility | Bumped the bounded parser to 2.1.0, converted readable approved header labels into the existing exact normalized allowlist, preserved legacy aliases and fail-closed ambiguity, and added Chinese/English/Thai header-error mapping. Synthetic parser/coordinator tests, all four supplied workbook replays and wrong-report negatives pass; no API, migration, upload, draft, source activation or runtime deployment occurred | README, architecture/data-flow/business rules, current state, [header-parse evidence](../50-evidence/topics/2026-08-11-company-channel-booking-header-parse-failure.md), evidence index, stale deployment item |
| 2026-08-06 | Repair manual-review navigation/progress and add English/Thai | Merged the status chip and progress into one review action that focuses the operation panel while row clicks still own logs; removed the frozen-case sentence; set upload status to `日报生成中` before finalization; localized the complete review UI and review API errors. Live browser QA covered zh/en/th and dialog copy without submitting a business action. Full suite: 393 passed, 3 intentional skips | Current state, success criteria, module map, [UI evidence](../50-evidence/topics/2026-08-06-daily-review-ui-navigation-i18n.md), scoped planning record |
| 2026-08-11 | Make the top-right control the sole Daily task-log entry | Removed concrete-row click/Enter/Space log activation plus the row's button semantics, pointer, focus and selected styling. Explicit download and manual-review controls remain; isolated browser QA proved ordinary row → no dialog, review control → focused operation panel, header `任务日志` → dialog. JavaScript syntax and all 81 Web tests pass. The source is local and production deployment is still pending | Success criteria, current state, [interaction evidence](../50-evidence/topics/2026-08-11-daily-row-task-log-entry-boundary.md), evidence index, stale deployment item, scoped planning record |
| 2026-08-11 | Plan Lian Tai/QBD bilingual Booking-header compatibility | Verified the exact supplied header cells and rendered header-only ranges. Current parser 2.0.0 rejects both; an in-memory exact three-alias expansion parses only the intended sheets (Lian Tai 67/100/16 pending; QBD 104/218/212 pending) while two report-output negatives remain rejected. Recommended parser 2.1.0, synthetic parser/coordinator regressions, neutral error copy and docs; no migration/UI redesign. One-file/full-replacement activation remains a separate operational boundary. No code, workbook, database or runtime changed | Current state, [header-parse evidence](../50-evidence/topics/2026-08-11-company-channel-booking-header-parse-failure.md), evidence index, stale item, scoped planning record |
| 2026-08-11 | Convert user-supplied `8.6 修正.XML` into an uploadable XML | Identified the input as an XLSX package mislabeled `.XML`; reconstructed a UTF-8 `RES_DETAIL` XML from its 181 flattened rows and validated it with `xmllint`, strict UTF-8 decoding and processor 4.0.0. Result: 115 retained rows, 37 exclusions, 29 duplicates, zero price-unmatched/review rows. Original workbook and malformed XML were left unchanged; no business/database write occurred | Current state, [conversion evidence](../50-evidence/topics/2026-08-11-0806-workbook-to-res-detail-xml.md), evidence index |
| 2026-08-11 | Diagnose “公司渠道明细” Excel parse failure | Read-only database evidence proves the request stopped before draft/artifact/source persistence and left accepted batch 7 current. Exact production-parser replay shows generated report workbooks are correctly rejected, while current Lian Tai/QBD raw workbooks fail because their bilingual Tour Code and hotel-detail headers do not equal the exact parser aliases; changing only both headers in memory makes both parse. No code, workbook, database or runtime state changed | Current state, [header-parse evidence](../50-evidence/topics/2026-08-11-company-channel-booking-header-parse-failure.md), evidence index, stale item |
| 2026-08-11 | Diagnose failed `0806.XML` | Public health remained 200, while an isolated processor-4.0.0 replay of the exact desktop file failed before parsing any row. Line 1872 inside `TRACE_TEXT` contains one CESU-8 surrogate pair for `U+1F389` although the file declares UTF-8, producing `XML_PARSE_ERROR`; therefore the run correctly cannot enter price review. No source, upload, runtime or business state changed | Current state, [invalid-UTF-8 evidence](../50-evidence/topics/2026-08-11-0806-xml-invalid-utf8.md), evidence index |
| 2026-08-06 | Repair manual-review navigation/progress and add English/Thai | Merged the status chip and progress into one review action that focuses the operation panel; at that time ordinary row clicks still owned logs, which the 2026-08-11 entry-boundary correction supersedes. Removed the frozen-case sentence, set upload status to `日报生成中` before finalization and localized the complete review UI/API errors. Live browser QA covered zh/en/th without a business mutation. Full suite: 393 passed, 3 intentional skips | Current state, success criteria, module map, [UI evidence](../50-evidence/topics/2026-08-06-daily-review-ui-navigation-i18n.md), scoped planning record |
| 2026-08-06 | Use integer review prices and repair `请求未完成` finalization | Changed review display/PATCH input to non-negative integer text while retaining canonical `.00` storage and replay. Bound the visible failure to runs 66/67, repaired a 21-placeholder/20-value Finance INSERT and the missing `manual_override_json` artifact kind through additive migration 018, then proved the full PostgreSQL finalization path in an outer rollback. Web PID 26286 is healthy; latest run 67 remains explicitly retryable with frozen `200/0` and no Finance/outbox mutation. Full suite: 387 passed, 3 intentional skips | ADR/domain/architecture/current state, migration/deployment ledgers, [repair evidence](../50-evidence/topics/2026-08-06-integer-review-finalize-repair.md), scoped planning record |
| 2026-08-06 | Deploy migration 017 and restore live `0805.XML` manual review | Reconciled already-live 016 semantics, corrected a legacy run-constraint drift found by rollback probe, formally applied 017 with unchanged business counts, closed runs 6163 as infrastructure failures, then fixed a 16-value/15-placeholder delivery INSERT exposed by the first acceptance upload. Restarted Web and proved run 65 opens the exact two-key review panel at revision 0 with no prices, daily XLSX, Finance version or daily-commit/monthly event. Historical version 28 remains rejected | Migration ledger, current state, [live rollout evidence](../50-evidence/topics/2026-08-06-live-daily-price-review-rollout.md), SHA-protected runtime checkpoints, scoped planning record |
| 2026-08-06 | Diagnose fresh `0805.XML` v4 upload not entering review | Proved the exact file correctly yields independently valid v4 `review_required` with two keys, but live `booking_test` lacks migration 017 tables/states. Three new runs remain `running` after source registration because review commit and best-effort closure both depend on the missing table; no delivery, Finance or outbox fact exists. Live 016 effects are present despite the checked-in ledger saying pending. No database/runtime/business mutation was performed; 017 deployment and explicit shell cleanup require operator authorization | Current state, [live mismatch evidence](../50-evidence/topics/2026-08-06-live-0805-review-migration-mismatch.md), evidence index, stale item, scoped planning record |