feat(android): 照合ログを端末内に記録し、設定画面から JSONL で共有・保存・消去する (#122) - #124
Merged
Merged
Conversation
… share it from Settings Room v4 adds the scan_log table (latest 5,000 events). The scan coordinator records accepted QR/Code 128 values, match / mismatch / duplicate verdicts, every rejection with its reason (including source-mismatch drops and camera candidates), and session start / end, with the raw payloads. Settings gains a 照合ログ card at the bottom that shares or saves the log as JSON Lines (shared schema v1) and clears it after confirmation. BLE diagnostics and InvalidScan stay payload-free; the release gate allow-lists the new exporter. Closes #122
…led write crash Events are queued through one unlimited channel drained by a single coroutine, so the log keeps the coordinator's order (the emulator run interleaved the per-event launches), and a write that fails because the database is already closed is dropped instead of crashing the process.
4 tasks
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 #122 (parent #120).
変更
core/modelScanLogEvent(+ScanLogSource/ScanLogStep/ScanLogEventKind/ScanLogReasonの語彙)。core/dataRoom v4:scan_log(autoincrement id、atindex)、ScanLogDao(insert / trimToLatest / count Flow / all / clear)、MIGRATION_3_4(CodeMatchDatabaseとCodeMatchDatabaseFactoryの両方に登録)、schemas/…/4.json、ScanLogRepository(挿入後 5,000 件に切り詰め)。feature/scanScanLogRecorder+ScanSessionCoordinatorのフック: 入力ソース不一致rejected/source_mismatch、カメラ 1 フレーム目barcode_candidate、reduce 直後にrejected(InvalidScanReason7 種を snake_case)/qr_accepted/barcode_accepted+match/mismatch/duplicate、結果表示中の握りつぶしrejected/result_pending、session_end(旧状態から)。session_startはScanViewModel.beginSessionで記録。InvalidScanと BLE 診断はペイロード非含有のまま。core/exportScanLogJsonExporter(iOS/Android: 照合ログ(判定・不受理・セッション)を端末内に記録し、設定画面から JSONL で共有する #120 のスキーマ: ヘッダ行 + 1 イベント 1 行、outputStream().useでcache/codematch-export/へ)。verify-release-hardening.shのFile(許可リストに追加(それ以外の変更なし)。LanguageCardの下にScanLogCard(件数、共有 / 保存 / 消去、消去はAlertDialog)。共有は FileProvidertext/plain、保存は SAF、消去は VM → repository。strings ja/en 15 キー。テスト
lintDebug testDebugUnitTest: 457 tests, 0 failures。:app:assembleRelease成功。verify-release-hardening.sh全項目通過(ローカル)。:core:data:connectedDebugAndroidTest32 件、:feature:settings:connectedDebugAndroidTest22 件 緑。AppFlowInstrumentationTestの新規 1 本は CI エミュレーターで実行。🤖 Generated with Claude Code