Test coverage: JsonSyncable multi-client file fan-out and malformed-file tolerance
メンテナーはふだん 4 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず既存の JsonSyncable テストを見つけ、src/SIL.Harmony/JsonSyncable.cs の、指定されているファイルのファンアウト、デシリアライズ、ClientIdForFile の各セクションを読みます。複数のクライアント、コンテンツのラウンドトリップ、空行または途中で切り詰められた行、解析できないクライアントファイル名を対象とする、提案されている4つのテストケースを追加し、その後、関連するテストスイートを実行してすべてのケースがパスすることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Follow-up from the test-suite review (batches merged as #92–#96). Existing JsonSyncable tests assert only file existence / line count and use a single client id, so the multi-client format behavior and error tolerance are untested.
Gaps
Per-client file fan-out — commits are grouped by ClientId into separate client_<id>.jsonl files, and GetSyncState aggregates heads across them. Every test uses one ClientId, so this is unexercised.
Malformed / blank / truncated files — empty file yields nothing, blank lines are skipped, null deserialize is skipped. A crash mid-write leaves a truncated trailing line; no test confirms it is tolerated rather than making the whole client file unreadable.
ClientIdForFile on a non-GUID filename — a stray client_*.jsonl with an unparseable id would throw from Guid.Parse inside the parallel loop; behavior is undefined by tests.
Content round-trip — no test reads a commit back and verifies ChangeEntities / HybridDateTime / Metadata survived; a field-drop regression passes today.
Suggested tests
AddRange_MultipleClients_WritesSeparateFilesAndAggregatesSyncStateAddRangeThenGetChanges_RoundTripsCommitContentReadAllCommits_SkipsBlankLinesAndTruncatedTrailingLineGetSyncState_IgnoresOrHandlesUnparseableClientFile
Why it matters
JSONL files are the on-disk sync format. Real projects have many clients (fan-out is load-bearing) and interrupted writes are expected in practice; today a serialization or truncation regression would go undetected.
- 主要言語
- C#
- スター
- 14
- フォーク
- 4
- 平均マージ
- 5日 4時間
- マージ済み PR(30日)
- 12
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
sillsdev/harmony のほかの issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 4 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 4 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
メンテナーはふだん 4 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 4 日以内に返信
-
ServerCommit no longer enforces required properties on JSON deserialization (regression rc.241 → rc.266)対応中かも @myieye が 4 日前に担当しました。 オープンbug Data bug
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
メンテナーはふだん 4 日以内に返信
sillsdev/harmony の issue をすべて見る
似ている issue
-
bug sev:L
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Systemorph/MeshWeaver#7480 ·
メンテナーはふだん 1 日以内に返信
-
bug small tooling
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
abingigo/Lightfooted#57 ·
メンテナーはふだん 1 日以内に返信
-
area: admin area: client good first issue hacktoberfest
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
[辞書] フォロ爆 (ふぉろばく)オープン辞書
難易度 1/5 1時間未満 初心者へのやさしさ 67/100
yksr-melt/Meltype#1268 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信