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

tests: prNoNames rejects factory IDs containing 820

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

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

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

評価

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

調査の方向性

まず cmd/codeaf/appfactory_pipeline_pr_test.go で、prNoNames がマーシャリングされたエラーとその文字列を検査している箇所を確認し、appfactory_pipeline_edit_test.go の構造化された factory ID のアサーションと比較してください。提示された再現手順 go test -count=100 -timeout=10m -run '^TestPipelinePreviewRefusalsAreTypedAndPlainlyWorded$/^malformed_base$' ./cmd/codeaf を実行してください。正当な factory ID は通過し、PR データと認証情報の漏えいを検出するチェックは引き続き失敗する状態になれば完了です。

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

説明

What happens

TestPipelinePreviewRefusalsAreTypedAndPlainlyWorded/malformed_base fails even though the response correctly carries bad_params / base_invalid and says “Nothing was written.” The factory ID factory_446b7bd61b820a6c happens to contain 820, which the leak helper rejects anywhere in the serialized error. The parent and all five subtests passed locally 3/3 on head and 1/1 on the pre-merge base.

Expected

The test rejects leaked PR data or credentials while allowing legitimate structured identifiers. Random local-server addresses must not determine the verdict.

Repro

  1. Use Go 1.26.5 at app/v3 12dadd64a.
  2. Run go test -count=100 -timeout=10m -run '^TestPipelinePreviewRefusalsAreTypedAndPlainlyWorded$/^malformed_base$' ./cmd/codeaf.
  3. The failure occurs when the stub origin hashes to a factory ID containing 820; this is nondeterministic, so 100 passes do not disprove it.

Evidence

Full 40788953543, shard 2/3, logged the ID above and appfactory_pipeline_edit_test.go:540. At 12dadd64a, cmd/codeaf/appfactory_pipeline_pr_test.go:174 defines prNoNames; :177 includes 820; :178 scans the whole marshaled error plus its string. cmd/codeaf/appfactory.go:277 derives the factory ID from the origin's SHA-256 hash. appfactory_pipeline_edit_test.go:534 intentionally requires the structured factory ID.

Since when

Pre-existing assertion false positive: the helper and ID algorithm are byte-for-byte identical at base 36dba7c7e. The helper dates to 24c8d6b7d (2026-10-17). No new malformed-file refusal regression is established.

Likely cause / where to look

Confirmed overbroad substring assertion in prNoNames. Check leak-prone fields explicitly while excluding legitimate ID fields, or inject deterministic fixture IDs. Preserve explicit tests that actual forbidden PR data and credentials still fail the check.

主要言語
Go
スター
115
フォーク
14
平均マージ
8時間 27分
マージ済み PR(30日)
229

環境構築

このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

Agent-Field/CodeAF のほかの issue

Agent-Field/CodeAF の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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