vote-tally: date_order_mismatches compares ISO dates as text, so UTC offsets are misread
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
tools/release-management/src/release_management/vote_tally/tally.py の tally() 内、str(after) < str(before) の比較から始め、parse_roster と投票の dict が date の値を文字列としてどう渡しているかを読む。issue に示された再現スクリプトを uv run --project tools/release-management python repro.py で実行し、比較する前に両方の日付をタイムゾーン対応のインスタント(例: datetime.fromisoformat)にパースする。同じ修正を plugins/magpie-security-tools/tools/release-management/ 以下のコピーにも適用し、両方が同期したままになるようにする。完了とは、最初のサンプルが date_order_mismatches に載り、2 番目は載らないことである。
索引モデルが issue の本文から書いたものです。
説明
What's broken
vote-tally tally decides whether a changed vote's date "runs backwards" against thread order by comparing the two ISO-8601 date strings as text. When the dates carry different UTC offsets, date_order_mismatches misses a real backwards date and flags a date that is in order.
Which layer
tools/release-management/src/release_management/vote_tally/tally.py, in tally(): if before and after and str(after) < str(before): (plus the plugin copy under plugins/magpie-security-tools/tools/release-management/).
How to reproduce
from release_management.vote_tally.tally import parse_roster, tally
roster = parse_roster("| Apache ID | Primary email |\n|---|---|\n| alice | [email protected] |")
def mismatches(first, second):
votes = [
{"from": "[email protected]", "date": first, "value": "-1"},
{"from": "[email protected]", "date": second, "value": "+1"},
]
return tally(votes, roster, {}, False, "dev-list-vote")["date_order_mismatches"]
print(mismatches("2026-06-11T09:00:00Z", "2026-06-11T10:30:00+02:00")) # 08:30Z, earlier: prints []
print(mismatches("2026-06-11T09:00:00+02:00", "2026-06-11T08:00:00Z")) # 07:00Z then 08:00Z, in order: flagged
Run with uv run --project tools/release-management python repro.py.
Expected vs actual
superseded-votes.md says: "A vote whose date runs backwards against thread order is listed in date_order_mismatches". The vote-tally SKILL.md passes date as <ISO-8601>, and vote replies come from senders in different time zones.
Expected: the two dates are compared as instants, so the first case is listed and the second is not.
Actual: the first case returns [], and the second lists a mismatch whose later vote is 1 hour after the earlier one.
The counted vote is not affected (thread order decides it); only the RM-facing date_order_mismatches report is wrong.
Surface area (optional)
Only this comparison. pr_review_votes also compares submittedAt as text, but GitHub always returns UTC Z timestamps there, so it is not affected.
- 主要言語
- Python
- スター
- 152
- フォーク
- 133
- 平均マージ
- 12時間 39分
- マージ済み PR(30日)
- 384
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/magpie のほかの issue
-
release-verify-rc: the Nexus staging id shape refuses Maven's maven-NNNN ids対応中かも @Anurag-S1ngh が 3 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
family:tools substrate:sandbox
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
apache/magpie#2176 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
ci: start each shipped tool once from its packaged plugin copy対応中かも @Anurag-S1ngh が 3 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 57/100
メンテナーはふだん 1 日以内に返信
-
capability:fix capability:intake family:docs family:security family:tools substrate:sandbox
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
メンテナーはふだん 1 日以内に返信
-
feat(issue): interactive duplicate-picker pane mod for issue-deduplicate対応中かも @Kaap10 が 8 日前に担当しました。 オープンcapability:resolve enhancement family:ci family:dev family:docs family:issue family:setup family:tools substrate:framework-dev
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
apache/magpie#2075 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
OpenFreeEnergy/openfe#2371 ·
メンテナーはふだん 2 日以内に返信
-
HMDB's smiles file writes "None" for metabolites with an empty <smiles/> (file not currently used)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
NCATSTranslator/Babel#1269 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
-
404 on sample dataオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
bcgov/nr-hydrometric-rating-curve#443 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100