adr check: C11 drops the host from an issue URL and reads the link on the record's own forge #632
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
Reference
sixfold-space/madtea#632
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happens
madtea adr checkrule C11 reads every issue link under## More Information. For a full URL,issueURLREininternal/service/adr/adr.gocaptures only the owner, the repo, and the number.parseIssueLinksthen storesowner/repo#n, andfetchIssuereads 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.examplewhose More Information linkshttps://forge-b.example/acme/tool/issues/528fails with:I hit this on a record that links two madtea issues from a repo on a different forge. When the same
owner/repoand 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
owner/repo#nexists on the record's own forge proves that C11 does not read it for a URL on another host.internal/mcp/tools_help.gosays how a link on another forge is handled.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 readC11in the body as the linked-issues check. The one exception is the quoted error output, which shows what madtea prints today.After #634,
adr checkreads only the issue links in a record'sDecision 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.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 archiveand no.git. Tracked in #795. Keeping this open until the live forge run is green.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.