adr check: verify every file reference in a record #658

Closed
opened 2026-09-29 16:39:21 +00:00 by hexajon · 2 comments
Owner

What to build

adr check reads each reference to a file in a record, as a link or a backticked path, the way ADR 0037 defines:

  • A plain path names a file in this repo. It must exist in the committed tree, not only on disk.
  • A full URL names a file in another repo. The check reads it through the forge, and skips it when the forge checks are off.
  • A path that starts with ~/ or / is a file on a user's machine, and the check skips it.
  • A reference that holds a placeholder or a glob (NNNN, *, <name>, {...}) is skipped.
  • A line number after a path fails.

A Markdown link resolves from the record's own folder. A backticked path resolves from the repo root.

Acceptance

Tests against the live forge API and a test repo: a plain path to a deleted file fails; an untracked file fails; a full URL to a missing file fails; a ~/ path, a placeholder, and a glob pass unchecked; a path with a line number fails; a link and a backticked path each resolve from their own base.

This change can fail an existing tree, so it ships in the one breaking release.

## What to build `adr check` reads each reference to a file in a record, as a link or a backticked path, the way ADR 0037 defines: - A plain path names a file in this repo. It must exist in the committed tree, not only on disk. - A full URL names a file in another repo. The check reads it through the forge, and skips it when the forge checks are off. - A path that starts with `~/` or `/` is a file on a user's machine, and the check skips it. - A reference that holds a placeholder or a glob (`NNNN`, `*`, `<name>`, `{...}`) is skipped. - A line number after a path fails. A Markdown link resolves from the record's own folder. A backticked path resolves from the repo root. ## Acceptance Tests against the live forge API and a test repo: a plain path to a deleted file fails; an untracked file fails; a full URL to a missing file fails; a `~/` path, a placeholder, and a glob pass unchecked; a path with a line number fails; a link and a backticked path each resolve from their own base. This change can fail an existing tree, so it ships in the one breaking release.
Author
Owner

The code for this landed on main, and the unit and fake-forge tests pass. The adr forge-tagged test package does not run green in the throwaway-forge VM yet: the live forge test cannot resolve a forge checkout, because the committed runner ships the tree with git archive and no .git. Tracked in #795. Keeping this open until the live forge run is green.

The code for this landed on main, and the unit and fake-forge tests pass. The adr forge-tagged test package does not run green in the throwaway-forge VM yet: the live forge test cannot resolve a forge checkout, because the committed runner ships the tree with `git archive` and no `.git`. Tracked in #795. Keeping this open until the live forge run is green.
Author
Owner

The v0.20.0 breaking set is complete and green on main. The code landed across the v0.20.0 branches, the full local gate passes, and the forge suite is green on both forges at both pinned versions on current main (31693766). Closing as done.

The v0.20.0 breaking set is complete and green on main. The code landed across the v0.20.0 branches, the full local gate passes, and the forge suite is green on both forges at both pinned versions on current main (31693766). Closing as done.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
sixfold-space/madtea#658
No description provided.