Repository navigation
feat(adr-lint)!: check ADR files in shell instead of adr-check - #37
Conversation
Remove the adr-check step, the agent-config-ref input and the agent-config pin of adr-lint.yml, and check the ADR files directly in a shell step: file name, duplicate numbers, leftover front matter, and reuse of a number that an ADR ever had in the history of the base commit. Drop adr-lint.yml from the Renovate manager that follows agent-config, update the README, strip front matter from the fixtures and test each condition with a passing and a failing case. Refs furedea/agent-config#293 BREAKING CHANGE: adr-lint fails on ADRs that start with front matter and no longer accepts the agent-config-ref input. Delete the front matter, and delete any ADR that a newer one replaced. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Review summaryNo blocking issues found. I read the diff and reasoned through the shell logic. I could not run the bats suite in this sandbox.
Checked and fine:
🤖 Generated with Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5b089e426b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…bering renames Reduce ADR_DIR to Git's repository-relative form and compare paths literally, so ./docs/adr, docs//adr, a trailing slash or an absolute path no longer turn the reuse check off. Drop rename detection and exempt only a number that the pull request itself deletes, so renaming an ADR to a deleted number is reported while a rename that keeps the number still passes. Refs furedea/agent-config#293 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Refs furedea/agent-config#293 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Refs furedea/agent-config#293 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
|
Review summary (read-only): no blocking findings. No P0/P1/P2 issues, so no inline comments. Checked:
Observations, not findings:
The 14 bats cases cover each condition with a passing and a failing example, and they look correct against the script. 🤖 Generated with Claude Code |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Fixes the ast-grep rules bash_local_underscore_prefix and bash_readonly_constant_name that failed CI on the bats file. Refs furedea/agent-config#293 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
Review summaryI read the full diff and found one minor problem. Nothing blocks the merge. I only read the code and didn't run the workflow or the bats tests. P2 (inline, Checked, no findings:
Tests cover each new condition with a passing and a failing case. 🤖 Generated with Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ced714ed46
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Exempt only a rename that git detects and that keeps the number, so deleting an ADR and adding an unrelated one with its number is reported. Follow the full history so a number added and deleted on a merged side branch is taken, and handle adr-dir at the repository root. Refs furedea/agent-config#293 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
Review summaryThe shell check is carefully built. It runs under P2
Not blocking
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c572b20a02
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…n adr-dir Use a 90% similarity threshold for the rename that keeps an ADR number, so a replacement that only shares the MADR skeleton is reported as a reuse, and canonicalize ., .. and empty components of adr-dir before comparing it with Git's paths. Refs furedea/agent-config#293 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
@codex review |
Review summaryNo P0 or P1 findings, and nothing I considered worth an inline comment. This was a read-only review of the diff. I did not run the bats suite. What I checked:
Optional notes (P3, not blocking):
🤖 Generated with Claude Code |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…izing it (#39) `adr-lint` の「Check ADR files」で,`adr-dir` を正規化する `normalize_dir`(約 17 行)をやめ,正規の形でない `adr-dir` を手順の冒頭でエラーにする. 理由:正規化は #37 のレビュー指摘(`./docs/adr`,`.`,`docs/./adr`,`..`,`//`,絶対パス)ごとに足したもので,呼び出し側はすべて既定の `docs/adr` を使っている.入力は境界で一度だけ検査する. **release PR #38(2.0.0)より先にマージする**: 同じ破壊的変更として 2.0.0 に含めるため. | `adr-dir` | #37(未リリース) | この PR | | ------------------------------------------------------------------------------- | ----------------- | -------------------------------------- | | `docs/adr`(既定) | 通る | 通る | | `./docs/adr`,`docs/adr/`,`docs//adr`,`docs/./adr`,`docs/x/../adr`,絶対パス | 正規化して通る | エラー(1 件のメッセージで理由を示す) | | `.`(リポジトリ直下) | 通る | エラー | | 空文字 | 既定値に戻る | エラー | ## 検証 - [x] ローカルで `bats tests -r`: 19 件すべて成功(正規でない書き方の拒否と `docs/adr` の受理を含む) - [ ] CI(`adr-lint-files`,`ast-grep`,`gha-lint`,`all-green` ほか) - [ ] Claude / Codex review <details><summary>範囲・関連</summary> - Refs furedea/agent-config#293(ADR から front matter と `adr-check` を廃止する計画の L2 の追補) - 続き:#37(マージ済み) - 範囲外:ファイル名,番号の重複,front matter の残存,番号の再利用(90% のリネーム規則,`--full-history`)の検査は変えない. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: furedea <[email protected]> Co-authored-by: Claude Sonnet 5.5 <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [2.0.0](v1.6.0...v2.0.0) (2026-12-02) ### ⚠ BREAKING CHANGES * **adr-lint:** reject a non-canonical adr-dir instead of normalizing it ([#39](#39)) * **adr-lint:** check ADR files in shell instead of adr-check ([#37](#37)) ### Features * **adr-lint:** check ADR files in shell instead of adr-check ([#37](#37)) ([9dc6a04](9dc6a04)) ### Code Refactoring * **adr-lint:** reject a non-canonical adr-dir instead of normalizing it ([#39](#39)) ([60f069a](60f069a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: furedea-release[bot] <353651101+furedea-release[bot]@users.noreply.github.com>
概要
furedea/agent-config#293 の L2.
adr-lintから agent-config のadr-checkへの依存を外し,ADR ファイルの検査を shell で行う(この PR では #293 を閉じない).変更
adr-lint.yml:adr-checkの手順,agent-config-ref入力,AGENT_CONFIG_REF,agent-config の pin を削除.新しい「Check ADR files」手順を追加(markdownlint,MD043,lychee は変更なし).NNNN_<小文字words>.md(単語は_区切り)---(front matter)ならエラー.front matter を削除し,置き換えた ADR も削除するよう案内するREADME.md:adr-lint.ymlの節を新しい検査の説明に更新renovate.json: agent-config 追従の対象からadr-lint.ymlを外し,nixpkgs 追従にci.ymlを追加tests/adr-lint/check_files.bats(12 ケース,各条件に合格例と違反例)を追加.ci.ymlのadr-lint-filesジョブで実行.fixtures から front matter を除去破壊的変更
front matter を持つ ADR は失敗し,
agent-config-ref入力は廃止される.呼び出し側は Renovate の更新 PR の中で front matter を削除し,置き換えられた ADR を削除する.BREAKING CHANGE を含むので release-please が major リリースにする.
🤖 Generated with Claude Code