adr check: C11 drops the host from an issue URL and reads the link on the record's own forge #632

Closed
opened 2026-09-24 19:36:41 +00:00 by hexajon · 4 comments
Owner

What happens

madtea adr check rule C11 reads every issue link under ## More Information. For a full URL, issueURLRE in internal/service/adr/adr.go captures only the owner, the repo, and the number. parseIssueLinks then stores owner/repo#n, and fetchIssue reads that issue on the forge of the checkout. The host in the URL is lost.

So a record whose repo is on one forge, and that links an issue on another forge, fails C11 on that link. For example, a record on forge-a.example whose More Information links https://forge-b.example/acme/tool/issues/528 fails with:

C11: could not read acme/tool#528: API error 404: not found

I hit this on a record that links two madtea issues from a repo on a different forge. When the same owner/repo and number also exist on the record's own forge, C11 reads that other issue instead, and passes or fails on the wrong issue's state.

Expected

C11 reads a linked issue on the host in its URL. When madtea has no credentials for that host, C11 says that it cannot check a link on another forge, and names the link. It never reads a different issue on the record's own forge.

Acceptance criteria

  • A test record links an issue URL on a second host. C11 reads that host, or reports the link as unchecked on another forge. It never queries the record's own forge for that link.
  • A test where the same owner/repo#n exists on the record's own forge proves that C11 does not read it for a URL on another host.
  • The C11 help text in internal/mcp/tools_help.go says how a link on another forge is handled.
## What happens `madtea adr check` rule C11 reads every issue link under `## More Information`. For a full URL, `issueURLRE` in `internal/service/adr/adr.go` captures only the owner, the repo, and the number. `parseIssueLinks` then stores `owner/repo#n`, and `fetchIssue` reads that issue on the forge of the checkout. The host in the URL is lost. So a record whose repo is on one forge, and that links an issue on another forge, fails C11 on that link. For example, a record on `forge-a.example` whose More Information links `https://forge-b.example/acme/tool/issues/528` fails with: ``` C11: could not read acme/tool#528: API error 404: not found ``` I hit this on a record that links two madtea issues from a repo on a different forge. When the same `owner/repo` and number also exist on the record's own forge, C11 reads that other issue instead, and passes or fails on the wrong issue's state. ## Expected C11 reads a linked issue on the host in its URL. When madtea has no credentials for that host, C11 says that it cannot check a link on another forge, and names the link. It never reads a different issue on the record's own forge. ## Acceptance criteria - [ ] A test record links an issue URL on a second host. C11 reads that host, or reports the link as unchecked on another forge. It never queries the record's own forge for that link. - [ ] A test where the same `owner/repo#n` exists on the record's own forge proves that C11 does not read it for a URL on another host. - [ ] The C11 help text in `internal/mcp/tools_help.go` says how a link on another forge is handled.
Author
Owner

The title and body name the check by its rule code, C11. The plain name is the linked-issues check (#492). Retitle this issue to: adr check: a link to an issue on another forge is read on the record's own forge, and read C11 in the body as the linked-issues check. The one exception is the quoted error output, which shows what madtea prints today.

The title and body name the check by its rule code, `C11`. The plain name is the linked-issues check (#492). Retitle this issue to: `adr check: a link to an issue on another forge is read on the record's own forge`, and read `C11` in the body as the linked-issues check. The one exception is the quoted error output, which shows what madtea prints today.
Author
Owner

After #634, adr check reads only the issue links in a record's Decision issues: list. Decided: when one of those links points to a forge that madtea has no login for, the check fails. The message names the link. It says to log in to that forge, or names the flag that skips the forge checks.

After #634, `adr check` reads only the issue links in a record's `Decision issues:` list. Decided: when one of those links points to a forge that madtea has no login for, the check fails. The message names the link. It says to log in to that forge, or names the flag that skips the forge checks.
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#632
No description provided.