Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[TUI] The deeply-nested telemetry fixture is stale on a newer Python: 20,000 levels now parse, so the server answers the other message

オープン 初心者向け
#4,532 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
testing

調査の方向性

tests/terminal/test_connections.py::ConnectionTests::test_deeply_nested_telemetry_returns_one_redacted_errorを読み、サポート対象のPythonバージョンで、20,000階層のペイロードがどのように動作するか確認してください。テストが意図した動作を確実に受け入れるよう、fixtureまたはassertionを調整し、その後python -m pytest tests/terminal/test_connections.py -k deeply_nestedを実行してください。パースに失敗する場合でも、オブジェクト以外のレスポンスで成功する場合でも、テストが安定して通れば完了です。

索引モデルが issue の本文から書いたものです。

説明

Problem: tests/terminal/test_connections.py::ConnectionTests::test_deeply_nested_telemetry_returns_one_redacted_error feeds a 20,000-level JSON array and expects the parse to fail:

depth = 20000   # Python 3.13 parses 1100 levels; the recursion limit is reached at a few thousand on every version
body = b"[" * depth + b"0" + b"]" * depth
…
with self.assertRaisesRegex(ClientError, "malformed JSON telemetry"):

On Python 3.14 the comment's premise no longer holds: the parse succeeds, returns a list, and strata_cli/client.py:131 therefore raises the other error - server returned a non-object telemetry response - so the assertion fails on a message that is correct for the payload. Measured on this box:

python 3.14.8
  json.loads at depth   20000: OK -> a list      (so the code says "non-object")
  json.loads at depth  200000: RecursionError: Stack overflow (used 8156 kB) while decoding a JSON array

The code side is fine: client.py:128 catches (ValueError, UnicodeDecodeError, RecursionError), so a payload that genuinely overflows still produces the "malformed JSON telemetry" the test wants.

Environment:
Environment:
Strata Version: 0.2.7.1 (source checkout at tag v0.2.7.1, commit 46c152a1; the test file discussed is upstream's own, unmodified by this fork)
OS: Linux x86-64 - Runtime: Python 3.14.8, Node 26.12.1 for the host suite

Reproduce: python -m pytest tests/terminal/test_connections.py -k deeply_nested on a Python 3.14 host. Measured at three levels (live checkout, clean worktree of the same commit, pure-tag worktree): red in all three, so it is the interpreter, not the checkout. One more thing worth knowing: run as part of the whole tests/terminal batch it can go green in the same tree - the depth at which the C scanner gives out depends on how much stack the process has already used - so this fixture is order-sensitive as well as version-sensitive.

Expected: the fixture proves "a telemetry body the parser cannot take", whatever the interpreter's limit is.

Suggested one-line shape: raise depth past the C scanner's ceiling on every supported interpreter (200,000 overflows here with the 8 MB stack and 8,156 kB used), or accept either message: assertRaisesRegex(ClientError, "malformed JSON telemetry|non-object telemetry response").

Reproduction status: measured on this box (the two json.loads probes above, and the test at three checkout states). Older interpreters were not run here - the overflow arrives earlier the deeper the version's own limit, so a larger depth cannot make it pass less often. This fork raised its own copy's depth to 200,000 for the same reason.

主要言語
C++
スター
11.6k
フォーク
1k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Niko1221/Strata のほかの issue

Niko1221/Strata の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。