Skip to content

fix(starpuff): backlog 收斂車——五張 W1 follow-up(#896–#900) - #901

Merged
s123104 merged 7 commits into
mainfrom
fix/starpuff-w1-followups
Jul 27, 2026
Merged

fix(starpuff): backlog 收斂車——五張 W1 follow-up(#896–#900)#901
s123104 merged 7 commits into
mainfrom
fix/starpuff-w1-followups

Conversation

@s123104

@s123104 s123104 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

摘要

收斂五張剛立案的 follow-up:判定箱首幀同步、跨幀測試覆蓋、銷毀護欄測試、票券蝠 telegraph 反應窗、scripts 型別債與閘門。

Closes #896
Closes #897
Closes #898
Closes #899
Closes #900

各卡修法與驗收證據

#896 fitHurtbox 換裝首幀未同步 updateBounds(bug/p3)

  • 修法fitHurtbox() 末尾呼叫 body.updateBounds()——Phaser Body.setSize() 以上次 updateBounds 快取的 _sx 換算世界尺寸,換裝當幀 scale 已變而快取未更,暫態誤差(實測 ember 54/tide 88.17,基準 36)約一個物理步後才自動修正。
  • 測試:fake body 升級為 _sx/_sy 快取語意替身(舊替身以「sourceWidth × 即時 scaleX」直算,鎖不住快取縫);新增「換裝當幀 body 世界寬」斷言(直讀 body.width 快取語意欄位,涵蓋生成/ember 768/解除回 512/tide 1254 四情境)。
  • Mutation 實證:移除 updateBounds() → 新案必紅(其餘 16 案綠,證明守門力來自新案)。

#897 prism/gravity 缺跨幀 hurtbox 穩定回歸(p3)

  • 修法player.test.ts 補 prism(glowy ×3)/gravity(boomy ×3)各一條 expectStableAcrossFrame 跨幀案(1254 源),四形態全覆蓋。
  • Mutation 實證:移除 wearTexturevscale.rebase → ember/tide/prism/gravity 四案皆紅。

#898 fake sprite scene:{} 測不到 restoreBase 護欄(p3)

  • 修法:新增「sprite.scene 清空後 PRE/POST 幀鉤不覆寫 scale」案,模擬 Phaser destroy() 清 scene 語意;含活體對照組(scene 存在時毒值被覆寫回基準,證明警戒的覆寫路徑真實存在)。
  • Mutation 實證:移除 visualScale.ts 的活體檢查(if (!entry.sprite.scene) continue)→ 該案必紅。

#899 票券蝠 telegraph 與俯掠同幀(bug/p2)

  • 修法finaleEnemies.ts fly 尾段物理行為調整(FSM 常數零改動)——updateTicketa() 在 fly 尾段 TICKETA_WARN_MS(700ms)直接以 body.setVelocity(0, ...) 懸停並閃爍預警,shift 才開始位移(沿 scanna aim 定點鎖定語彙)。FSM 常數零改動:fly 2400/shift 600/shiftSpeed 260 不變(兩席審查均核對確認),換軌頻率與威脅位形不變。取值 700 對齊 spora windup(scanna 800/zappy 500 之間),離散幀量測下界仍 ≥ AUDIT_THRESHOLDS.telegraphMinMs(600)。
  • 量測(level-audit --probe ticketa,L21 各 10 換軌事件)
指標 baseline(main) fixed(本 PR)
預警窗 hoverMsAvg(min) 58ms(0) 783ms(739)
俯掠穿越 travelMsAvg 374ms 371ms(一致)
到玩家帶 toPlayerBandMsAvg 308ms 308ms(一致)
換軌週期 cyclePeriodMsAvg 3017ms 3012ms(一致,理論 3000)
meetsThreshold(600ms) false true
  • 分級迴避率——兩個訊號模型並陳(250/350/500ms 反應延遲,最壞站位):
模型 語意 baseline fixed
dodgeRateSignalAtWarn 玩家讀取預警(懸停閃爍亮起即開始反應) 0%–20%(兩次獨立量測;n=5 單事件粒度 20%,屬取樣噪聲) 100%/100%/100%
dodgeRateSignalAtMove 玩家忽略預警(俯掠位移開始才反應) 0%/0%/0% 0%/0%/0%(不變)

兩模型語意差異:SignalAtWarn 量測「預警的可用性」——修復把可讀訊號提前 700ms,讀訊號的玩家從躲不掉變全躲得掉;SignalAtMove 量測「威脅的保留度」——308ms(到玩家帶)< 250ms(反應)+ 218ms(走位),不理會預警的玩家修後照樣躲不掉,證明票券蝠的威脅位形完整保留、未被削弱成無害敵人。未來平衡決策應以 SignalAtMove 與關卡層級 deaths 為準,不可只看 SignalAtWarn 誤讀為「此敵人已無威脅」。

  • 關卡層級對照(Grok 審查席獨立實測,L21 mid bot ×3):clearRate 1→1、clearSecAvg 76.7→83.3s、deathsPerRun 2.67→4.67(不降反升,反證未被削弱)、axes.total 9→9 不變。註:n=3 噪音大,僅作方向性佐證。
  • 難度不侵蝕證明(T2 模式):位移動力學三指標前後一致——俯掠速度、穿越時間、換軌頻率零改變,僅預警提前亮起;SignalAtMove 全 0 與 deaths 未降共同證明威脅保留。
  • 測試:新增 finaleEnemies.test.ts 六案(含反應窗機械量測:逐 16ms 幀序量「telegraph 首亮至俯掠開始」≥600ms)。Mutation 實證:移除預警分支 → 2 案必紅。
  • 回歸:探針為受控 spawn 單體量測,其他 finale 敵人程式路徑零改動;enemyFsm.test.ts 既有案全綠。

#900 scripts/tsconfig.json 未進 typecheck 閘門(debt/p3)

  • 修法(雙管齊下,驗收要求兩者都有效)
    1. 零錯誤:為六個被測試 import 的 .js/.mjs 模組補 .d.ts/.d.mts 宣告(verify-002-log、lighthouse-drift、monitor-schedule-drift、verify-production-resources、fetch-moneybox-rates、fetch-taiwan-bank-rates)+ @types/xml2js,31 個 TS7006/TS7016 全數消除(型別從宣告流動,非逐處補參數註記)。
    2. 閘門.husky/pre-pushci.yml 各增補顯式 tsc --noEmit -p scripts/tsconfig.json 步驟(root 依 pnpm workspace 語意被 pnpm -r typecheck 排除,缺顯式閘必再漂移)。
  • 驗證npx tsc --noEmit -p scripts/tsconfig.json 零錯誤;pnpm test:root 126 案全綠;本 PR push 時 pre-push 新閘已實跑通過。

七項驗證

  1. pnpm --filter @app/starpuff test1048 案全綠(基準 1038 + 新增 10;既有案零改動)
  2. pnpm typecheck:全綠
  3. pnpm lint:0 error(9 warnings 為 ratewise 既有 react-refresh 項,非本車引入)
  4. npx tsc --noEmit -p scripts/tsconfig.json:零錯誤
  5. fix(starpuff): fitHurtbox 換裝首幀未同步 updateBounds,hurtbox 暫態誤差(#886 follow-up) #896 mutation:移除 updateBounds() → 新斷言必紅 ✓(test(starpuff): prism/gravity 缺跨幀 hurtbox 穩定回歸(#886 follow-up) #897/test(starpuff): fake sprite scene:{} 無法測已銷毀 sprite 的 restoreBase 護欄(#886 follow-up) #898 mutation 同樣實證)
  6. fix(starpuff): 終局票券蝠 telegraph 與俯掠同幀,shift 首幀即位移(#886 follow-up) #899 level-audit 前後對比:見上表(.claude/product-intel/level-audits/probe-ticketa-l21-{fixed,baseline}.json
  7. changeset:單一 patch(票券蝠預警為使用者可感知的可讀性修復;其餘四項為測試/治理)

002

檔頭聚合值:+5(reward 5、penalty 0、neutral 0)|累計總分:+324(main 基準 319);node scripts/verify-002-log.mjs --base-ref origin/main exit 0。

白名單遵循

只動白名單內檔案;未觸碰 GameScene.ts 與拆分車檔案。新增 finaleEnemies.test.ts#899 驗收 3「相關單測」的孿生測試檔)與 6 個 scripts/*.d.(m)ts 宣告檔。無延後項目。

Made with Cursor

haotool and others added 7 commits July 27, 2026 06:40
- 空 commit 宣告單一寫手開工,範圍為五張 follow-up 卡收斂

測試:無(空 commit 活性錨)

Co-authored-by: Cursor <cursoragent@cursor.com>
- fitHurtbox 末尾呼叫 body.updateBounds():Phaser Body.setSize 以上次快取 _sx 換算
  世界尺寸,換裝當幀不同步則 hurtbox 暫態誤差(ember 54/tide 88.17,基準 36)
- fake body 升級為 Phaser _sx/_sy 快取語意替身,新增「換裝當幀 body 世界寬」斷言;
  mutation 實證:移除 updateBounds 該案必紅、其餘 16 案綠
- prism/gravity 補 expectStableAcrossFrame 跨幀案(1254 源);mutation 實證:移除
  vscale.rebase 四形態案皆紅(#897)
- 新增 sprite.scene 清空後幀鉤不覆寫 scale 案;mutation 實證:移除 visualScale
  活體檢查必紅(#898)

測試:pnpm --filter @app/starpuff test -- --run src/game/systems/player.test.ts(17 案全綠)

Co-authored-by: Cursor <cursoragent@cursor.com>
- 為六個被測試 import 的 .js/.mjs 模組補 .d.ts/.d.mts 宣告(verify-002-log、
  lighthouse-drift、monitor-schedule-drift、verify-production-resources、
  fetch-moneybox-rates、fetch-taiwan-bank-rates),31 個 TS7006/TS7016 全數消除
- 新增 @types/xml2js devDependency 補 sitemap 測試的 xml2js 型別
- pre-push 與 ci.yml 各增補 tsc --noEmit -p scripts/tsconfig.json 步驟:
  pnpm -r typecheck 依 workspace 語意排除 root,缺顯式閘門必再漂移
- 移除 verify-002-log.test.ts 的 String() 正規化與過時註解(宣告檔已補)

測試:npx tsc --noEmit -p scripts/tsconfig.json 零錯誤;pnpm test:root 126 案全綠

Co-authored-by: Cursor <cursoragent@cursor.com>
- 原 telegraph 閃爍與俯掠位移同一物理幀啟動,玩家反應窗為 0;修法為 fly 尾段
  TICKETA_WARN_MS(700ms)懸停+閃爍,shift 才開始位移(沿 scanna aim 定點語彙)
- 反應窗對齊 telegraph SSOT:700ms 與 spora windup 同級(scanna 800/zappy 500),
  離散幀量測下界仍 ≥ AUDIT_THRESHOLDS.telegraphMinMs(600)
- 俯掠動力學零改變:FSM 常數不動(fly 2400/shift 600/shiftSpeed 260),換軌
  頻率與威脅位形不變,難度不侵蝕
- 新增 finaleEnemies.test.ts 六案:反應窗機械量測(首亮至位移 ≥600ms)、尾段懸停、
  中段無誤報、shift 首幀俯掠、週期回歸;mutation 實證:移除預警分支 2 案必紅

測試:pnpm --filter @app/starpuff test -- --run src/game/systems/finaleEnemies.test.ts(6 案全綠)

Co-authored-by: Cursor <cursoragent@cursor.com>
- audit-probes 新增 runTicketaTelegraphProbe:受控 spawn+20ms 座標取樣,重建
  「懸停預警 → 俯掠穿越」事件序;懸停窗(telegraph 可觀測訊號)、俯掠動力學
  (穿越時間/到玩家帶時間/換軌週期)與分級反應迴避解析模型(PLAYER.moveSpeed)
- level-audit 掛 --probe ticketa(門檻引 AUDIT_THRESHOLDS.telegraphMinMs SSOT)
- 實測對比(L21 各 10 事件):預警窗 baseline 58ms(min 0)→ fixed 783ms(min 739);
  位移動力學一致(穿越 374↔371ms、到玩家帶 308↔308ms、週期 3017↔3012ms)證明
  難度不侵蝕;最壞站位分級迴避率 250/350/500ms 全部 0% → 100%

測試:node scripts/level-audit.mjs 21 --probe ticketa ×2(fixed/baseline 對照跑通)

Co-authored-by: Cursor <cursoragent@cursor.com>
- 票券蝠換軌預警(使用者可感知平衡調整)+判定箱首幀同步與測試治理合併為單一 patch

測試:無(changeset 檔案)

Co-authored-by: Cursor <cursoragent@cursor.com>
- 五條 reward:票券蝠預警窗、fitHurtbox 首幀同步、跨幀覆蓋、銷毀護欄測試、scripts 型別閘門
- 檔頭聚合值 +5(reward 5、penalty 0、neutral 0),累計 319 → 324

測試:node scripts/verify-002-log.mjs(pre-commit 第 6 步守門通過)

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
npm/@types/xml2js 0.4.14 🟢 6.5
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 8Found 25/30 approved changesets -- score normalized to 8
Packaging⚠️ -1packaging workflow not detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Security-Policy🟢 10security policy file detected
License🟢 9license file detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Signed-Releases⚠️ -1no releases found
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies🟢 8dependency not pinned by hash detected -- score normalized to 8
Fuzzing⚠️ 0project is not fuzzed

Scanned Files

  • pnpm-lock.yaml

@github-actions

Copy link
Copy Markdown
Contributor

✅ SEO 審計通過!所有 2026 標準驗證項目都符合要求。

  • ✅ Sitemap 2026 標準
  • ✅ Breadcrumb Schema
  • ✅ JSON-LD 結構化數據
  • ✅ 內部連結結構

@s123104
s123104 merged commit 57550da into main Jul 27, 2026
17 checks passed
@s123104
s123104 deleted the fix/starpuff-w1-followups branch July 27, 2026 00:39
s123104 pushed a commit that referenced this pull request Jul 27, 2026
- 002 聚合檔頭 +3(reward 3)累計 325→328
- #904 紅線改釘 WARN、#903 宣告漂移守門、#905 實驗 revert
- #903 條目措辭精確化:mutation 為同類 tsc 盲區示範,
  非 #901 深層欄位改名逐字重現(審查回饋修正)
- changeset:@app/starpuff patch(無玩家可見行為變更)

測試:verify-002-log 於 pre-commit 驗證(staged);
commit 後另跑 --base-ref origin/main 佐證

Co-authored-by: Cursor <cursoragent@cursor.com>
s123104 pushed a commit that referenced this pull request Jul 27, 2026
- 002 聚合檔頭 +3(reward 3)累計 325→328
- #904 紅線改釘 WARN、#903 宣告漂移守門、#905 實驗 revert
- #903 條目措辭精確化:mutation 為同類 tsc 盲區示範,
  非 #901 深層欄位改名逐字重現(審查回饋修正)
- changeset:@app/starpuff patch(無玩家可見行為變更)

測試:verify-002-log 於 pre-commit 驗證(staged);
commit 後另跑 --base-ref origin/main 佐證

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment