[Bug]: the required Windows lane fails on the long-path CLI budget fixture because the fixture pins the workload path length but not its JSON-escaped cost
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 84/100
調査の方向性
tests/control_plane/test_cli_output_budget.py と、ルートを128文字に固定する長いパスのfixtureから始めてください。ドキュメントに記載されたpytestコマンドと、より深い一時名前空間を使って再現してください。3つの長いパスの予算テストすべてで測定されたワークロードが同じになり、Windowsの一時ディレクトリの深さに関係なく成功すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
LoopX version or commit: main dc9fdbb51
Host or runtime surface: Not host-specific (fails in the required windows-powershell lane; the defect is in the budget fixture, not in the CLI)
Area: Build, packaging, installer, or CI (required-check regression in Python Tests)
Problem
The required windows-powershell job of the Python Tests workflow is red on the current main head, and it fails on exactly three tests:
FAILED tests/control_plane/test_cli_output_budget.py::test_long_path_budget_is_independent_of_runner_temp_prefix
FAILED tests/control_plane/test_cli_output_budget.py::test_long_path_budget_uses_native_temp_without_a_drive_root_directory[False]
FAILED tests/control_plane/test_cli_output_budget.py::test_long_path_budget_uses_native_temp_without_a_drive_root_directory[True]
AssertionError: heartbeat_prompt_brief/json emitted 10522 chars; variant ceiling is 10500
merge-gate lists windows-powershell in needs, so the whole required qualification is red for that lane. Runner: job 117808033252 in run 39172287050.
The long-path budget fixtures build a fixture root whose path length is pinned to 128 characters so that the measured packet is host-independent:
parent = Path(tempfile.gettempdir() if os.name == "nt" else "/tmp").resolve()
...
while len(str(parent / prefix)) + 8 > 128:
parent = parent.parent
prefix += "p" * (128 - len(str(parent / prefix)) - 8)
with tempfile.TemporaryDirectory(prefix=prefix, dir=parent) as directory:
root = Path(directory).resolve()
assert len(str(root)) == 128
Path length is not the quantity the budget measures. The emitted heartbeat_prompt_brief JSON quotes the fixture root and the paths derived from it about twenty times, and JSON escapes every Windows separator in each quoted copy, so emitted size grows with both the length and the separator count. Varying the fixture root on this checkout gives:
emitted_chars(root) = 7782 + 20 * len(root) + 20 * separators(root)
At the pinned 128-character length this reduces to 10342 + 20 * separators, the rows below:
A 128-character root therefore measures differently on every host, depending only on how deep its temporary namespace is:
| Fixture root | separators | measured chars | verdict (ceiling 10500) |
|---|---|---|---|
D:\Temp\<128-char root> |
2 | 10382 | passes |
D:\Temp\a\b\c\pytest-1\<128-char root> |
5 | 10442 | passes |
hosted Windows runner C:\Users\<user>\AppData\Local\Temp\pytest-of-<user>\pytest-1\test_...\<128-char root> |
9 | 10522 | fails |
local deep TEMP (five nested segments) |
10 | 10542 | fails |
So the guard reports a failure for a deep temporary namespace rather than for a change in the emitted packet, and the size of the measured workload is not the one the ceilings were pinned against. #6833 (merged in dc9fdbb51) exposed this by adding long_path_budget to the Windows lane selection and by holding only the length constant; the runner's temp namespace is four segments deeper than the local one, which is exactly the observed 10522 - 10442 = 80 = 4 x 20 difference.
Impact
windows-powershellis a required lane (merge-gateneeds it): the required qualification is red onmain, and every pull request based on currentmaininherits a failing required check it did not cause.- The same three tests are part of the scheduled
Python Testsqualification, so the daily run is red for this cause as well. - The guard cannot be trusted on Windows in either direction: on a deeper namespace it fails without any packet change, and on a shallower one it measures a smaller workload than the pinned ceiling describes.
Minimal reproduction
git checkout dc9fdbb51
uv sync --extra test
# point the host temp namespace deeper than the workload, as the hosted runner does
# PowerShell: $env:TEMP = $env:TMP = "<deep-drive>/a/b/c/d/e"
TEMP=<deep-drive>/a/b/c/d/e uv run --extra test python -m pytest -q \
tests/control_plane/test_cli_output_budget.py -k long_path_budget
Observed on dc9fdbb51: the same three failures, with the emitted count 10542 instead of 10522 because the namespace is one segment deeper.
Expected behavior
The three tests qualify the same workload on every host: a fixture root that the emitted-text budget sees with a constant cost (or a comparison that accounts for the root the fixture actually created), so the verdict does not depend on the depth of the host's temporary namespace.
Actual behavior
The verdict depends on the host's temporary-namespace depth, and the required Windows lane stays red on main until the fixture holds the measured quantity constant.
- 主要言語
- Python
- スター
- 6.2k
- フォーク
- 596
- 平均マージ
- 7時間 35分
- マージ済み PR(30日)
- 928
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
loopx-project/loopx のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
loopx-project/loopx#6108 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
loopx-project/loopx#5688 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
loopx-project/loopx#5632 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
loopx-project/loopx#5443 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
loopx-project/loopx#5026 ·
メンテナーはふだん 1 日以内に返信
loopx-project/loopx の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
fossasia/visdom-dev#69 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
BUG: PROD: v1.3.0-beta Onboarding Profile Picture Misaligns When Name Validation Error Appears対応中かも @RitikaSen27 が今日担当しました。 オープンbug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
AOSSIE-Org/PictoPy#1647 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
-
[oblt-aw][autodoc] Update workflow docs for gh-aw v0.92.5 and detector permission scope対応中かも @github-actions が今日担当しました。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信