Timeline: draw earlier retry attempts on the thread that ran them (retryAttempts[].threadId)
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- node.js, typescript
調査の方向性
Start with src/ctrf/timeline/collect.ts, especially readTests, arrange() and placeAttempts(), then review the timeline notes in src/ctrf/timeline/report.ts. Check the timeline tests and sample at ctrf-reports/timeline/ctrf-report.json; the issue does not name specific test files. Done when attempts with recorded threadId appear on their recorded worker, missing IDs retain current placement, and the docs and sample reflect the change.
索引モデルが issue の本文から書いたものです。
説明
Summary
CTRF 0.3.0 adds an optional threadId to attempt history entries (retryAttempts[].threadId), so each earlier attempt can record the thread or worker that ran it. The Test-level threadId now explicitly describes the final attempt. See ctrf-io/ctrf#74 and ctrf-io/ctrf#86, part of the 0.3.0 release tracked in ctrf-io/ctrf#75.
The timeline report (#279) should use it to draw each earlier attempt on the thread that actually ran it, and keep today's placement only for attempts that don't record a thread.
How it works today
Earlier attempts don't record a thread, so readTests gives every attempt its test's threadId, which is the thread of the final attempt (collect.ts#L353-L372). arrange() packs each thread's final results, and placeAttempts() tries to fit each earlier attempt into a gap on the first four lanes of that thread (collect.ts#L908, collect.ts#L1019). Attempts that fit nowhere go to a separate "Runs before a retry" lane, with a note that such runs do not record where they ran (report.ts#L748-L751).
When a retry runs on a different worker than the failed attempt, that guess is wrong in one of two ways:
- The attempt fits a gap on the final attempt's thread. It is drawn on a worker that never ran it, and nothing in the chart says so.
- It doesn't fit. It moves to the "Runs before a retry" lane, and the worker that actually ran it shows an idle gap at that time.
Either way, the tests drawn next to the failed attempt are the wrong neighbours. That matters most when looking for order-dependent or shared-state flakiness.
Proposed change
- Read the field. In
readTests, readattempt.threadIdwith the same normalization as the test's (normalizeThreadId) and keep it on the attempt. An attempt without one inherits its test's thread, as today, and is marked as inherited. - Place recorded attempts like final results. In
arrange(), put attempts with a recorded thread into that thread's group and pack them together with its final results. Only inherited attempts go throughplaceAttempts()and can end up in "Runs before a retry". - Keep overlap handling. The spec doesn't guarantee that a worker runs one test at a time, since some frameworks run tests concurrently within a worker. A recorded attempt that overlaps other tests on its thread splits the thread into extra lanes, as final results already do, instead of being moved out.
- Update the counts and notes. The stray-attempt note counts only attempts without a recorded thread, for which its wording stays true. Thread counts and the
maxLanescheck include threads that appear only in attempt history. - Types. The
ctrfpackage (0.5.0) typesAttemptHistoryEntrywithoutthreadIdand validates against spec 0.2.0. Until it ships spec 0.3.0, read the field through a narrow cast; then bumpctrfand drop the cast. Merging already keeps the field, becausemergeReportscopies tests as they are, but it can't validate such reports against 0.2.0, so the mergedspecVersionfalls back to the inputs' version. - Docs and sample. Mention attempt
threadIdin the timeline section ofdocs/report-showcase.md, and give the retried test inctrf-reports/timeline/ctrf-report.jsonan attempt on another worker.
Reports without attempt threadId render exactly as they do now.
How it improves the timeline
- Each earlier attempt is drawn on the worker that ran it, so per-worker busy and idle time is accurate.
- A failed attempt is shown next to the tests that really ran beside it on its worker. That is where order-dependent and shared-state flakiness shows up.
- A retry that moved to another worker is visible as such: the failed attempt on one row, the final attempt on another.
- A worker whose only results are failed attempts, such as one replaced after a failure, gets its own row. Today it doesn't appear.
- The "Runs before a retry" lane and its note remain only for reports that don't record attempt threads.
Dependencies
- ctrf-io/ctrf#86: the spec change, in the 0.3.0 stack (ctrf-io/ctrf#75).
- A
ctrfnpm release with spec 0.3.0, for the types. - Reporters that fill in
retryAttempts[].threadId. Until they do, the timeline stays as it is.
- 主要言語
- TypeScript
- スター
- 380
- フォーク
- 43
- 平均マージ
- 3日 11時間
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ctrf-io/github-test-reporter のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
ctrf-io/github-test-reporter#309 · コメント 1 件 ·
-
Excessive memory usage when processing history leads to Javascript Heap Exhaustion再び着手できるかも @HenrikDK が 121 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
ctrf-io/github-test-reporter#302 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
ctrf-io/github-test-reporter#297 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
ctrf-io/github-test-reporter#282 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
ctrf-io/github-test-reporter#258 · コメント 1 件 ·
ctrf-io/github-test-reporter の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
lichess-org/lila#22324 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Feature Request] [Web] Expose kvCacheQuantizationBits in the onnxruntime-web WebGPU EP optionsオープンep:WebGPU platform:web quantization
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
microsoft/onnxruntime#33752 ·
メンテナーはふだん 2 日以内に返信
-
[Skill Bug]: entra-agent-id: inaccurate blueprint permission inheritance and parent token sub claimオープンbug entra-agent-id
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/GitHub-Copilot-for-Azure#3467 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
fix(worker): keep normal prepare waiting states failure-free対応中かも @LichKing-2234 が今日担当しました。 オープンagent:codex priority:P1
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
AgoraIO-Extensions/agent-infra#3745 ·
メンテナーはふだん 1 日以内に返信
-
The five-line work window can drop its oldest line: the per-line byte share ignores the JSON framing対応中かも @Eapp1e が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
makecindy/cindy#7973 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信