Skip to content

canary - #6978

Merged
TinyKitten merged 3 commits into
canaryfrom
dev
Sep 14, 2026
Merged

canary#6978
TinyKitten merged 3 commits into
canaryfrom
dev

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Sep 14, 2026

Copy link
Copy Markdown
Member

概要

dev の内容を canary へ反映するリリース PR。

変更の種類

  • バグ修正
  • 新機能
  • リファクタリング
  • ドキュメント
  • CI/CD
  • その他

変更内容

逆走判定の誤検知修正 (#6976)

useWrongDirectionDetector の累積距離を「正の増加の合計」から「最接近点からの正味距離」(currentDistance - nearestDistance)へ変更し、静止中の GPS ノイズだけで逆走通知が出うる問題 (#6967) を解消した。増加側だけが累積に反映され減少側は WRONG_DIRECTION_NOISE_TOLERANCE(10m)以内が無視される非対称性が原因で、8m 幅で往復するだけでも 76 サンプルで WRONG_DIRECTION_MIN_DISTANCE(300m)に到達していた。

単調に遠ざかる区間では新旧の値が一致するため、実走行時の逆走検知タイミングは変わらない。#5934 が導入した連続カウンタ側のヒステリシスも残置しており、回帰テスト 2 件で担保している。

iOS ビルド失敗の修正 (#6980)

前回の canary iOS ビルド(Build iOS Canary #4609)は Swift のコンパイルエラーで失敗していた。

ios/Modules/VitsTTS/VitsTTSModule.swift:358:11: error: overlapping accesses to 'inputs',
but modification requires exclusive access; consider copying to a local variable

inputs.withUnsafeMutableBufferPointer { inValues in ... } のクロージャ内で元の配列 inputsinputs.count でアクセスしていたことによる排他アクセス違反。同値であるバッファ長 inValues.count を参照するよう 1 行変更した。#6977 で入った VITS 実装の新規コードに起因する。

バージョン更新 (#6979)

canary リリース向けに versionCode を 100000761 → 100000763 へ更新(app.config.ts / android/app/build.gradle / android/wearable/build.gradle.kts / ios/TrainLCD.xcodeproj/project.pbxproj)。

テスト

  • npm run lint が通ること
  • npm test が通ること
  • npm run typecheck が通ること

origin/dev (f889a9d) をローカルで検証した結果:

  • npm run lint → Checked 764 files, No fixes applied
  • npm test → 286 suites / 3122 tests すべて pass
  • npm run typecheck → エラーなし

iOS のコンパイルエラー修正(#6980)は Swift のみの変更で上記 3 つの検査対象外のため、最終的な検証はこの PR の Build iOS Canary が通ることをもって行う。

関連Issue

スクリーンショット(任意)

UI 変更なし: 差分は逆走判定の内部しきい値の計算方法(src/hooks/useWrongDirectionDetector.ts)、iOS のコンパイルエラー修正(ios/Modules/VitsTTS/VitsTTSModule.swift)、バージョン番号の更新のみで、画面のレイアウト・文言は一切変わりません。

🤖 Generated with Claude Code

https://claude.ai/code/session_01XkxbQgQg3poF5G2njXhgYu

https://claude.ai/code/session_01VsdEpyHiRn5gzpRbQeGL7Q

`cumulativeIncreaseRef` は正の増加だけを足し込む一方、
`WRONG_DIRECTION_NOISE_TOLERANCE` (10m) 以内の減少は無視して累積を維持していた。
この非対称性により、静止していてもGPSの揺れだけで累積が単調に伸び、
`WRONG_DIRECTION_MIN_DISTANCE` (300m) に到達しうる (#6967)。

累積を「最接近点 (`nearestDistanceRef`) からの正味距離」で測るよう変更する。
無視した小さな減少も起点の更新を通じて距離へ反映されるため、静止中の揺れでは
正味距離が伸びない。連続カウンタ側のヒステリシス (#5934 の意図) はそのまま残す。


Claude-Session: https://claude.ai/code/session_01W43wAgGXf7Sank3yirTJD2

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@TinyKitten TinyKitten self-assigned this Sep 14, 2026
@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: 3e6fefb3-9e5f-4c9f-9061-b3cc4fc466b4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the ios label Sep 14, 2026
Co-authored-by: TinyKitten <32848922+TinyKitten@users.noreply.github.com>
@TinyKitten
TinyKitten merged commit e8aaa0f into canary Sep 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant