Files
kefu/deploy/token-ui-restore-20260924/RELEASE.md
T
2026-09-28 10:02:50 +08:00

2.6 KiB

Token statistics frontend restoration — 2026-09-24

The active frontend entry referenced bootstrap-CkN5mQCZ.js / call-stats-CGyNU9Ox.js, which had no Token usage component. The backend endpoints and usage ledger were present and active. The release source at C:/wechat_rpa/admin-web lacked the Token changes present at C:/kefu/admin-web; old unused Token chunks in production dist concealed the omission if checking file presence alone.

Restored call-stats.vue, ModelUsageStats.vue, request/format helpers and existing tests in the publishing source; merged only call-stat request cancellation and model usage API declarations into its newer console.ts. Preserved newer archive, model catalog, release upload code. Added scripts/verify-token-build.mjs to both frontend trees and their production build commands. The guard follows index.html dependencies and requires the active call statistics page to import Token usage; it rejected the actual broken production artifact and accepted the rebuilt release. All 27 route names retained.

Validation: 12 targeted frontend tests pass; vue-tsc passes; production build succeeds; 235 static files in candidate image match manifest. New index, entry JS, bootstrap, call statistics, Token component and API client assets return HTTP 200 with matching hashes through nginx. Both LAN and public domain return the new index. Authenticated postdeployment usage summary and log endpoints return 200; temporary verification sessions were revoked. No logged-in browser visual check was performed.

Verified 7-day summary: 1,595 actual upstream requests, 593 with returned usage, 1,002 without returned usage; input 1,997,408, output 118,717, total recorded 2,116,125 tokens. This is recorded usage, not an estimate for requests without upstream usage. Ledger rows are retained.

Only API was recreated; gateway and knowledge worker container IDs were unchanged. No backend Python files or database schema were replaced. Image: zyt/wecom-admin:token-ui-20260924 (also current), sha256:0861974700f025732a699ee255577db0bd42227ea588f0dedc7e12e552510475. Base/rollback image: zyt/wecom-admin:before-token-ui-20260924, sha256:fb12ac71cd6a9d112db46ca9f24b6b83016846c00e45356bc0281eece12f37b4.

Server release directory: /home/ps/token-ui-restore-20260924. Source backup: source-before; previous runtime frontend: dist-before.tar.gz. Rollback: python3 /home/ps/token-ui-restore-20260924/03-rollback.py. Keeps live database, refuses rollback over a later deployment. Evidence: verification.json, entry-verification.json, api-verification.json, manifest.json.

Page: http://im.zhenyangtang.cn:8369/#/model/stats . Refresh an already-open page to load the new entry.