fix: refresh public dashboard and BI telemetry
This commit is contained in:
@@ -27,6 +27,24 @@ archive/result pair remains authoritative even if a retry rebuilds different XLS
|
||||
queued downstream message explicitly says Finance database commit is complete while the outbox waits for its
|
||||
consumer. Persisted `local-...` delivery keys and existing trace fields remain unchanged. Trace/Web tests (27) plus
|
||||
Python/JavaScript syntax and diff checks pass; no live task or business data was mutated.
|
||||
- Performed a read-only live diagnosis after a user reported that Daily Report uploaded but monthly did not update.
|
||||
Daily run 39 is accepted and Finance version 14 is active with 111 retained rows for 2026-08-01; its
|
||||
`arr.daily_version_committed` outbox event was initially pending with zero attempts. The dedicated worker was then
|
||||
started in detached Screen, consumed the backlog through event 20, and published active August V01 (`更新至
|
||||
2026-08-01`, 111 rows); July V05 (`更新至 2026-07-27`, 987 rows) also became active while older July V04 was
|
||||
superseded. The registered XLSX/result pair exists and the Web health endpoint remains ready. The worker is running
|
||||
for this session, but reboot-persistent supervision is still open; no re-upload or source-code change was made.
|
||||
- Performed a second read-only BI freshness diagnosis after August publication advanced. Active August V02 is now
|
||||
`更新至 2026-08-02` with 268 rows, and a fresh repeatable-read analytics query returns the same watermark and
|
||||
`updated_at=2026-08-03 14:21:29 +08`. An already-open BI page can still show 8.1 because `app.js` loads analytics
|
||||
only at boot, first BI entry or month change; the monthly page's four-second poll does not refresh BI. This is a
|
||||
frontend freshness bug, not a monthly worker/database publication failure. No code or business data changed.
|
||||
- Implemented BI freshness detection for desktop and public H5. While visible, each surface checks its lightweight
|
||||
month metadata endpoint every five seconds and reloads full analytics only when the selected month's `updated_at`
|
||||
changes or the selected month changes. Polling pauses while hidden, resumes with an immediate check, preserves the
|
||||
last good snapshot during transient failures, and keeps the existing four-second monthly-history polling separate.
|
||||
Static BI/Web tests pass 5/5 and 19/19; both JavaScript syntax checks and `git diff --check` pass. No API, report or
|
||||
business data behavior changed.
|
||||
- Fixed company-report duplicate publication. A retry now validates the existing archive/result pair against the
|
||||
deterministic reservation and builder `semantic_sha256`, verifies the archive hash against the result JSON, and
|
||||
reuses the first successful artifact metadata instead of comparing the new XLSX binary SHA. Partial, corrupt or
|
||||
@@ -42,6 +60,49 @@ archive/result pair remains authoritative even if a retry rebuilds different XLS
|
||||
auto-generate a report. Historical jobs without source metadata remain readable and show that the source was not
|
||||
recorded. Full discovery passes 360 tests with 10 optional skips; no live upload, activation, report generation or
|
||||
service restart was performed because the available browser session was unauthenticated.
|
||||
- A read-only live follow-up found accepted Booking Excel batch 7 active with 72 rows and no review draft. The latest
|
||||
August `01-10` jobs contain `source: null` and all five company results fail at `publish` with
|
||||
`COMPANY_REPORT_PUBLISH_FAILED` after building row counts. The port-8766 Web process predates both source-traceability
|
||||
and current duplicate-publication handling, so a controlled Web restart followed by one authorized rerun is required;
|
||||
no restart or backfill was performed.
|
||||
- Clarified company-report source and publication status copy for operators. The job panel now says `本次任务使用的
|
||||
Excel`; missing metadata says `未记录,无法确认使用了哪份 Excel` and explains that the filename/batch were not saved.
|
||||
`COMPANY_REPORT_PUBLISH_FAILED` now says the data reached publication but the official Excel was not saved, and
|
||||
explicitly distinguishes that error from successful reuse of a complete identical version. Focused Web/company and
|
||||
publisher tests plus JavaScript syntax checks pass. Existing `source: null` jobs remain untraceable and no live
|
||||
restart, report rerun or business-data mutation was performed.
|
||||
- Removed the redundant Booking Excel provenance card from company-report job details and the provenance column from
|
||||
generation history. The upload/review current-source panel and server-side job `source` metadata remain intact for
|
||||
operation and audit. Web/company regression passes 29 tests, JavaScript syntax and runtime-reference checks pass,
|
||||
and no report or business data changed.
|
||||
- After the operator-reported 8766 restart and another `2026-08/01-10` attempt, job
|
||||
`253ce23dc7544d34a6e0fb9405ac4d9a` again built all five row sets (`54/18/7/1/15`) but failed at `publish`; the prior
|
||||
`c5358fa293184f5f9bad85178afada22` succeeded with the same counts and complete artifacts. Read-only process evidence
|
||||
still shows PID `11176` started on 2026-08-02 12:20, before the current duplicate-publication source change, so the
|
||||
effective 8766 listener was not replaced. Publish copy was simplified to direct restart-and-retry instructions; no
|
||||
report, database or output mutation was performed by this recheck.
|
||||
- The operator's latest `2026-08/01-10` retry, job `087dceca79e64bebb719ad06e7813465`, finished at 15:29 +08 with the
|
||||
same five row counts and the same publish-only failures. At 15:37 +08, TCP 8766 was still owned by PID 11176 under
|
||||
the 2026-08-02 Screen session; the launcher preflight is ready, but the listener still predates the current publisher
|
||||
and job-source modules. The earlier successful five archive/result pairs and current downloads all remain
|
||||
SHA-256-consistent, and six focused publisher tests pass. No restart, rerun, file repair or business-data write was
|
||||
performed; exact listener replacement remains the required operational fix.
|
||||
- With explicit operator confirmation, the exact stale PID 11176 was stopped and replaced by PID 54127 at 15:46:29
|
||||
+08 through the existing launcher. One authorized job `05cc547d62854df281b0c9cac60e6f6d` then succeeded at 15:48:37
|
||||
+08 for all five companies with row counts `54/18/7/1/15`; the new job recorded active Booking batch 7 source
|
||||
metadata, reused the same version numbers/artifact descriptors as `c5358fa...`, and all five authenticated HTTP
|
||||
downloads returned 200 with matching archive/current/result hashes. The prior files were not overwritten, the
|
||||
temporary session was logged out, and no Booking/Finance source or fact mutation occurred.
|
||||
- Confirmed the source contracts for repeated Booking/report workflows: byte-identical activated Excel uploads reuse the
|
||||
activated source; same rows with different XLSX bytes create a new reviewable source; unchanged report snapshots
|
||||
reuse their complete publication pair; changed Finance or Booking version pins create a new report version; and an
|
||||
activated subset changes Booking detail coverage without deleting the Finance fact rows. Focused source/publisher/
|
||||
integration checks pass 14 tests with two optional ArtifactTool skips. The controlled 8766 replacement and one live
|
||||
5/5 rerun now pass; reboot-persistent supervision remains a separate deployment gap.
|
||||
- Confirmed a separate operator-visibility gap: the publisher reuses the archive/result pair internally, but neither
|
||||
`PublicationOutcome`, `CompanyRunResult` nor the public company-job projection exposes a reuse disposition or prior file
|
||||
identity. A successful retry therefore looks like a normal new successful job with a download link; no code change was
|
||||
made in this read-only check.
|
||||
|
||||
## Completed On 2026-08-02
|
||||
|
||||
@@ -287,8 +348,9 @@ archive/result pair remains authoritative even if a retry rebuilds different XLS
|
||||
07-20=100, 07-21=119, 07-22=88 and 07-23=109; the user's total was right but the 07-20/07-22 labels were reversed.
|
||||
- No database repair was performed during diagnosis. The fixture should be retired from the current projection without
|
||||
deleting immutable history, followed by a clean July republication and live API verification.
|
||||
- An already-open Channel BI view does not refresh after upload or subsequent tab entry, so it can remain at the old
|
||||
308 value even though the API is 417. This frontend freshness gap is separate from the one-row fixture contamination.
|
||||
- Channel BI now checks the selected month's `updated_at` every five seconds while visible, so an already-open view
|
||||
reloads its aggregate data after a new Finance version is published. The historical 308/417 observation above is
|
||||
retained as evidence of the earlier stale-view behavior, separate from the one-row fixture contamination.
|
||||
- The BI `公司数` card actually counts worksheet channels; LianTai GROUP/FIT are separate, so six channel keys can still
|
||||
correspond to five top-level companies.
|
||||
|
||||
@@ -372,9 +434,9 @@ archive/result pair remains authoritative even if a retry rebuilds different XLS
|
||||
- The prior 8766 outage and credential gate are resolved. The current Web process is a detached local Screen session,
|
||||
not a reboot-persistent service; `/Users/chillishark/.local/bin/arr2-web-8766 --check` validates its private route and
|
||||
Keychain inputs without printing them before a controlled restart.
|
||||
- Live authentication/readiness is accepted, but no business mutation was authorized for this activation. One no-PII
|
||||
upload should still confirm migration-013 filename provenance after restart, and one controlled company-report job
|
||||
should confirm processor 1.2.0 produces all five downloads.
|
||||
- Live authentication/readiness and one controlled 5/5 company-report job with all five downloads are accepted. One
|
||||
no-PII XML upload should still confirm migration-013 filename provenance after restart; the Web/worker sessions remain
|
||||
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 intentionally does not claim
|
||||
|
||||
@@ -4,6 +4,21 @@
|
||||
|
||||
| Date | Task | Outcome | Docs Updated |
|
||||
|---|---|---|---|
|
||||
| 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 |
|
||||
| 2026-08-03 | Check whether company-report retries show reused-file identity | Confirmed the publisher can reuse an existing archive/result pair, but the outcome, job API and frontend expose only success/version/download; users cannot see that the file was reused or which prior artifact supplied it. No code or business-data change was made | Current state, retry-semantics evidence/index |
|
||||
| 2026-08-03 | Confirm repeated Booking and company-report rerun semantics | Verified by source inspection and focused tests: byte-identical activated Excel reuses the source; same rows with different XLSX bytes require a new review/activation; unchanged report snapshots reuse complete publication pairs; a subset source can be activated and rerun, leaving Finance rows present while missing Booking room details remain blank. Live acceptance remains pending the stale 8766 process replacement | Current state, retry-semantics evidence/index, stale item |
|
||||
| 2026-08-03 | Recheck 2026-08 company-report publication after reported 8766 restart | The newest `01-10` job again built all five row sets (54/18/7/1/15) but failed at `publish`; a read-only process check shows the effective listener is still PID 11176 from 2026-08-02, before the current publisher fix. Simplified the confusing duplicate-reuse error copy to direct restart-and-retry instructions; 29 Web/company tests and JavaScript checks pass, with no report or business-data write | Current state, runtime/status-copy evidence, stale item, scoped planning record |
|
||||
| 2026-08-03 | Remove redundant company-report Excel provenance module | Removed the source card from job details and the source column from generation history; retained the upload/review current-source panel and server-side source metadata. The history table and empty state now use seven columns. Web/company tests (29), JavaScript syntax checks and runtime-reference scan pass; no report or business-data write occurred | Current state, status-copy evidence/index, scoped planning record |
|
||||
| 2026-08-03 | Clarify company-report source and publish-failure copy | The job detail/history now identifies the Excel as `本次任务使用的 Excel` / `任务使用的 Excel`; missing source metadata says the Excel cannot be confirmed and explains why. Publish failures now explain that data reached publication but the official Excel was not saved, and are not presented as a normal duplicate skip; a complete identical publication remains a success reuse. Focused Web/company/publisher tests and JavaScript syntax checks pass; no live report or business-data write occurred | Current state, status-copy evidence/index, scoped planning record |
|
||||
| 2026-08-03 | Add five-second Channel BI freshness detection | Desktop and public H5 now poll lightweight month metadata every five seconds while visible, compare the selected month's `updated_at`, and reload full analytics only after a version change. Hidden tabs pause polling, visible tabs check immediately, and transient background errors retain the last good snapshot. BI visual tests pass 5/5, Web tests pass 19/19, both JavaScript syntax checks and diff checks pass; no report or business data changed | Current state/history, Channel BI freshness evidence/index, stale item |
|
||||
| 2026-08-03 | Diagnose BI remaining at 8.1 after August monthly publication | Read-only database and analytics checks confirm active August V02 is `更新至 2026-08-02` with 268 rows, while a fresh BI query returns the same watermark. The existing page only loads analytics at boot, first BI entry or month change, so an already-open view can remain at 8.1. Confirmed a frontend freshness bug; no code or business data changed | Current state/history, BI freshness evidence/index, existing stale lifecycle item |
|
||||
| 2026-08-03 | Recover automatic monthly publication | User-authorized detached `monthly_reports.worker` start consumed pending outbox events 15–20 in order. July V05 (`as_of_date=2026-07-27`, 987 rows) and active August V01 (`as_of_date=2026-08-01`, 111 rows) are registered with workbook/result artifacts; all six checked daily-commit events are `published`, the XLSX passes ZIP integrity, and Web health remains ready. Re-upload and source-code changes were not needed; reboot-persistent supervision remains open | Current state, daily-to-monthly evidence topic/index, stale supervision item, scoped planning record |
|
||||
| 2026-08-03 | Review monthly worker logging and monitoring | Confirmed Screen/stdout and Web/stderr are not durable monitoring, `/healthz` excludes worker liveness, and the existing outbox/task trace lacks heartbeat and monthly-specific end-to-end wording. Prepared a privacy-minimized structured-log, heartbeat, status and supervisor/alert recommendation; no code or runtime change was made | Monthly worker observability evidence/index, stale item, scoped planning record |
|
||||
| 2026-08-03 | Diagnose company-report source label after subset Excel activation | Read-only checks found accepted current Booking Excel batch 6 with 73 rows and no open draft; latest August jobs were created after activation but saved `source: null` because the live Web process predates the source-traceability code. The label is a metadata/runtime mismatch, not proof that the report used the old source; no restart or backfill was performed | Current state/evidence topic/index, stale item, scoped planning record |
|
||||
| 2026-08-03 | Diagnose subset-source 2026-08 `01-10` publication failures | Batch 7 is accepted/current with 72 rows and no review draft. The latest job built all five company row sets but failed all at `publish` with `COMPANY_REPORT_PUBLISH_FAILED`; the live 8766 process predates both source metadata and current duplicate-publication fixes. No restart or rerun was performed | Current state/evidence topic/index, stale item, scoped planning record |
|
||||
| 2026-08-03 | Evaluate Daily task trace for company-report publication failure | Confirmed the supplied Daily trace only covers successful Finance commit and outbox publication; it lacks company-report job linkage and publish-stage detail, shows unknown execution metadata and prints an unmasked full source hash. Recommended separate trace scopes, runtime identity and hash masking; no code/runtime change was made | Daily/company trace evidence/index, stale item, scoped planning record |
|
||||
| 2026-08-03 | Diagnose Daily Report uploaded but monthly report not updated | Read-only database/runtime inspection confirms Daily run 39 committed successfully as Finance version 14 with 111 retained rows for 2026-08-01, but outbox event 20 remains pending with zero attempts because no independent `monthly_reports.worker` process is running. Monthly history still ends at July V04; no August version exists. No restart, rerun, upload or database write was performed | Current state, daily-to-monthly diagnosis evidence/index, scoped planning record |
|
||||
| 2026-08-03 | Make the mobile H5 dashboard publicly readable | Added public H5 shell/assets and purpose-built sanitized aggregate month/analytics endpoints; desktop, generic APIs, legacy H5 APIs, detailed health, jobs/traces, downloads and writes remain protected. Anonymous H5 loading plus authenticated compatibility is covered by 71 Web tests and syntax checks; no live restart or deployment occurred | Current state/history, architecture, business rules, ADR-005, H5 public-access evidence/index, scoped planning record |
|
||||
| 2026-08-03 | Clarify ARR trace semantics for internet deployment | Added additive execution-scope, processor-mode and remote-dispatch fields; replaced misleading “本地处理” copy and clarified that a pending downstream event follows a completed Finance commit. Existing delivery IDs/trace fields remain compatible; 27 trace/Web tests plus Python/JavaScript syntax and diff checks pass, with no live mutation | Current state/history, ARR trace-semantics evidence/index, scoped planning record |
|
||||
| 2026-08-03 | Add Booking Excel to company-report traceability | New company-report jobs store the server-captured active source summary; the page shows the current source, job detail/history show the source Excel, and identical active uploads become an informational refresh instead of a generic extraction error. Old jobs remain compatible without source metadata. Focused Web/company tests and the 360-test suite pass with 10 optional skips; no live mutation or restart was performed | Current state, source-to-report traceability evidence/index, scoped planning record |
|
||||
|
||||
Reference in New Issue
Block a user