lint accepts modelith-ref-type on a GitHub-origin provenance header
まだ誰も着手していません。
評価
調査の方向性
internal/provenance/provenance.go の Header.validate から始め、次に TestADR_0019_RefTypeIsRecordedOnlyWhereItIsNeeded の隣にあるテストを読んでください。GitHub-origin header に対して modelith lint で再現し、GitHub origins では modelith-ref-type が provenance finding を生成する一方、文書化されている Azure DevOps のケースでは引き続き有効であることを示すテストを追加してください。
索引モデルが issue の本文から書いたものです。
説明
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
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
stacklok/modelith のほかの issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
-
enhancement
難易度 2/5 半日 初心者へのやさしさ 68/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
stacklok/modelith の issue をすべて見る
似ている issue
-
automation models
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
txn2/mcp-data-platform#1984 ·
メンテナーはふだん 1 日以内に返信
-
agentic-workflows
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
kind/docs prio/P2
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
agent-substrate/substrate#1986 ·
メンテナーはふだん 1 日以内に返信