HTTP tests: since the new request reader, 50 of the request-header row's 390 dealt requests reach a route
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with tests/test_http_request_header.py and inspect the QH01-dealt row, its seeded deal, and the request helpers; compare request outcomes using the reference in tests/test_http_door.py. Adjust the deal and assertions so each reachable header kind has at least 15 requests that reach a route, while unreachable kinds have explicit refusal counts or are excluded. Done means the row reports served counts accurately, unreachable reading rules are removed or tested directly, and the described planted faults make the row fail.
索引モデルが issue の本文から書いたものです。
説明
Found while checking #2373 box by box on phase2-numbers at c96498d9.
The row QH01-dealt of tests/test_http_request_header.py deals 390 requests, 15 of each of 26 kinds of header line, and compares each answer byte for byte with a reference. It was written before the server read every request through its new request reader (#2370). Each dealt request holds one line of its kind and up to ten more lines of random kinds, and the reader now refuses a whole request with 400 when any one line is malformed. So most of the population is now a test of that refusal, which the reader's own test already covers, and little of it reaches http_request_header:
- 50 of the 390 requests reach a route; 340 are answered 400 before any route runs.
- 11 of the 26 kinds never reach a route (kinds 0, 11, 12, 13 and 19 to 25).
- The other 15 kinds reach a route 2 to 5 times each, not 15.
The row still passes and still prints dealt requests=390/390, and its count check ("390, and every kind 15") is about what was dealt, not about what was served. A fault in how http_request_header reads a well-formed line has far fewer requests to show itself on than the row's numbers say.
Reproduction, from tests/ of a checkout of that commit: replay the row's seeded deal through the reference of tests/test_http_door.py and count what it decides.
import random
from collections import Counter
import test_http_request_header as t
from test_http_door import shared_reference
ref = shared_reference(); rng = random.Random(t.SEED)
kinds = list(range(26)) * 15; rng.shuffle(kinds)
posts = set(rng.sample(range(390), 195))
bodies = (b'', b't' * 40, b'x\r\nOrigin: https://b.example\r\n', b'b' * 20 + b'\r\n\r\nCookie: a=b\r\n')
served = Counter()
for i, kind in enumerate(kinds):
others = [t.dealt_line(rng, rng.randrange(26)) for _ in range(rng.randrange(11))]
others.insert(rng.randrange(len(others) + 1), t.dealt_line(rng, kind))
post = i in posts
data = t.request(others, rng.choice(bodies) if post else b'', method=b'POST' if post else b'GET')
if ref.decide(data).kind == 'served': served[kind] += 1
print(sum(served.values()), [served[k] for k in range(26)])
It prints 50 [0, 3, 4, 3, 2, 4, 3, 4, 2, 2, 4, 0, 0, 0, 3, 3, 4, 4, 5, 0, 0, 0, 0, 0, 0, 0].
Done when
- The row asserts a count of requests that reached a route, for each kind that can reach one, and that count is at least 15. The deal is changed so that it holds (for example: the other lines of a request come only from kinds the reader accepts).
- Each kind that can no longer reach a route is either dealt in a part of the row that expects the refusal, with its own count, or taken out of the deal. The row's printed counts say which.
- For each reading rule of
http_request_headerthat no request can reach any more (a control byte or a lone CR or LF in a value, a line with no colon, a bare name, a space before the colon, a continuation line, an empty name): it is removed, or it is kept and a test calls the reading code with such a line directly. The choice is written here. - A planted fault in how a well-formed line is read (one for the name's case, one for the value's trimming) turns the row red, shown once in the pull request.
— Claude DevBox
- 主要言語
- C
- スター
- 3
- フォーク
- 7
- 平均マージ
- 3時間 28分
- マージ済み PR(30日)
- 270
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
InauguralSystems/EigenScript のほかの issue
-
area:gates kind:gate-defect
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
InauguralSystems/EigenScript#2476 ·
メンテナーはふだん 1 日以内に返信
-
area:gates needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
InauguralSystems/EigenScript#2462 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
The hosted-RNG check refuses a clean tree that has a tracked file with a double quote in its nameオープンarea:gates kind:gate-defect needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
InauguralSystems/EigenScript#2461 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:gates kind:gate-defect needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
InauguralSystems/EigenScript#2458 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
`http_post`: `headers` text with something after its JSON value now means no headers, without a wordオープンarea:http kind:silent-wrong
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
InauguralSystems/EigenScript#2394 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
InauguralSystems/EigenScript の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
flipperdevices/flipperzero-firmware#4520 ·
メンテナーはふだん 1 日以内に返信
-
area/build-framework kind/enhancement priority/low
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
yugabyte/yugabyte-db#38826 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
meshcore-dev/MeshCore#3891 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug grammar sev-3
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
BUG/MEDIUM: regex: worker SIGSEGV when a regex is applied to an empty body on libc-regex buildsオープンstatus: needs-triage type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100