fix(ratewise): GA E2E gate 回歸監測窗補強+Lighthouse smoke paths 擴充 Authority Guide - #657
Merged
s123104 merged 2 commits intoJul 6, 2026
Conversation
- 非正式 host 且內嵌 GA runtime 分支改等待完整 analytics 初始化窗口(6s+2s idle+1s buffer)再斷言零 config - 等待值鏡射 src/config/performance.ts 預設並尊重 VITE_ANALYTICS_* env 覆寫,斷言本身不放寬 - 無 GA runtime 建置維持 300ms 短取樣,避免無謂 e2e 時間成本 - 002 新增 reward 紀錄(本次 +1,累計 +171) 測試:playwright ga-defer-lcp.spec.ts offline-pwa-chromium 全 6 例通過(含正式站 host 分支實跑) Co-authored-by: Cursor <cursoragent@cursor.com>
- LIGHTHOUSE_CI_SMOKE_PATHS 新增 sell-rate-vs-mid-rate、cash-vs-spot-rate、card-rate-guide(#344) - seo-paths.config.mjs 與 src/config/seo-paths.ts 雙 SSOT 同步,canonical trailing slash - 消費點不變:.lighthouserc.cjs、lighthouse-production.mjs、lighthouse-ci.sh 均由 APP_CONFIG 取得 - SEO_MASTER_SSOT B4 敘述同步;新增 patch changeset;002 新增 reward(本次 +1,累計 +172) 測試:verify-ssot-sync 通過;seo-paths.test.ts 37 例通過;三個消費點展開清單驗證正確 Co-authored-by: Cursor <cursoragent@cursor.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
|
✅ SEO 審計通過!所有 2026 標準驗證項目都符合要求。
|
This was referenced Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #344
Summary
兩個獨立的測試/CI 守門補強,均不影響 runtime 使用者可見行為(單一 patch changeset 涵蓋)。
Commit 1:GA E2E hostname gate 回歸監測窗補強
回應 PR #629 review thread A5(discussion_r3526164835):
ga-defer-lcp.spec.ts非正式 host 分支僅等 300ms 即斷言零 GA config,短於ANALYTICS_INIT_DELAY_MS(6s)。若 hostname gate([bug] GA4 於 staging 無環境 gate 照常外送,QA 流量污染正式資料 #606)回歸,GA 會在約 6 秒後初始化,而測試已提前通過,形同未受保護。HAS_BUILT_GA_RUNTIME && !IS_PRODUCTION_HOST情境改等待完整 analytics 初始化窗口(init delay 6s+idle timeout 2s+1s buffer)後再取樣斷言零 config;等待值鏡射src/config/performance.ts預設並尊重VITE_ANALYTICS_INIT_DELAY_MS/VITE_ANALYTICS_IDLE_TIMEOUT_MSenv 覆寫(該檔依賴import.meta.env,Playwright node 端無法直接 import)。斷言本身不放寬;無 GA runtime 建置維持 300ms 短取樣,避免無謂 e2e 時間成本。PLAYWRIGHT_BASE_URL=https://app.haotool.org正式站 host 分支 config=1 通過。Commit 2:Lighthouse CI smoke paths 擴充(#344)
LIGHTHOUSE_CI_SMOKE_PATHS新增 3 篇 Authority Guide:/sell-rate-vs-mid-rate/、/cash-vs-spot-rate/、/card-rate-guide/(canonical trailing slash)。seo-paths.config.mjs與src/config/seo-paths.ts雙 SSOT 同步(verify-ssot-sync通過);不新增第二份 URL 清單。.lighthouserc.cjs、scripts/lighthouse-production.mjs、scripts/lighthouse-ci.sh均由APP_CONFIG.lighthouseSmokePaths展開,實際 dump 展開結果為 6 條 URL 正確。docs/SEO_MASTER_SSOT.mdB4 敘述同步。Test plan
ga-defer-lcp.spec.ts本地實跑(offline-pwa-chromium)6/6 通過(localhost gate 分支)seo-paths.test.ts37/37 通過;verify-ssot-sync綠燈稽核
Made with Cursor