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

lint accepts modelith-ref-type on a GitHub-origin provenance header

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

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

評価

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

調査の方向性

internal/provenance/provenance.go の Header.validate から始め、次に TestADR_0019_RefTypeIsRecordedOnlyWhereItIsNeeded の隣にあるテストを読んでください。GitHub-origin header に対して modelith lint で再現し、GitHub origins では modelith-ref-type が provenance finding を生成する一方、文書化されている Azure DevOps のケースでは引き続き有効であることを示すテストを追加してください。

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

説明

bug

Follow-up from the review of #52.

ADR-0019 and docs/10-vendoring.md both say the modelith-ref-type provenance key applies only to Azure DevOps and is omitted for GitHub. Lint doesn't enforce that. Header.validate (internal/provenance/provenance.go) checks only that the value is one of branch/tag/commit, not which origin it appears on.

Repro (at 52a5544)

Take a GitHub-origin vendored copy and add the key. Here the recorded type disagrees with the ref:

# modelith-vendored: DO NOT EDIT — this file is a copy. Change it at its origin.
# modelith-fetch: git
# modelith-origin: https://github.com/acme/billing
# modelith-path: docs/payments.modelith.yaml
# modelith-ref: main
# modelith-ref-type: tag
# modelith-commit: 4f2c1e9c8b3ad0e5f71b2c9a6d4e8f30ab5c7d21
# modelith-imported: 2026-09-23
# modelith-digest: sha256:…
modelith lint gh-reftype.modelith.yaml
# 0 error(s), 0 warning(s)

deps update then drops the key without saying so (recordedRefType returns "" for GitHub).

Expected

Pre-release, the header uses closed sets (compare unknown fetch: methods), so this should be a provenance finding along the lines of ref-type is only recorded for dev.azure.com origins. Pin it with a test next to TestADR_0019_RefTypeIsRecordedOnlyWhereItIsNeeded.

主要言語
Go
スター
34
フォーク
5
平均マージ
5時間 7分
マージ済み PR(30日)
6

環境構築

はじめの一歩

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

stacklok/modelith のほかの issue

stacklok/modelith の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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