Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

tests: prNoNames rejects factory IDs containing 820

未關閉 適合新手
#2,026 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
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 小時 36 分鐘
30 天內合併 PR
229

環境準備

我們還沒有檢查這個專案的環境設定檔。先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

Agent-Field/CodeAF 的其他 Issue

查看 Agent-Field/CodeAF 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。