Repository navigation
Description
Problem Description
Refine reads each #<n> of a wait text as an issue of the item's own repository (_text_issues in src/devops_cli/roadmap/refine/refine.py, used by _wait_refs). A wait text can name a pull request of another project in the form PR #<n>.
Seen on 2026-11-27: dan-petty/homelab#61 waits for "an ansible-lint release with the fix of PR #5240" (https://github.com/ansible/ansible-lint/pull/5240). Its record holds refine.wait_refs = #5240, so each refine round of the item reads dan-petty/homelab#5240. That number is no issue of the repository; since v0.223.4 the store logs #5240 is no issue of dan-petty/homelab now. The store leaves it out. at each round.
Effect: one wasted GitHub read and one misleading log line in each round, and a wait that no issue of the repository can end. No wrong write.
Expected vs Actual Behavior
- Expected: a wait reference names an issue of the repository only when the text names it as such:
#<n>with no other project before it, orowner/name#<n>of the same repository. - Actual:
PR #5240after a link to another project is recorded as#5240of the own repository.
Proposed Fix
Leave out a #<n> whose number is the number of a GitHub link to another repository in the same text, and read owner/name#<n> with its repository. Or drop a wait reference that the store answers as no issue of the repository, so the round reads it one time only.
Acceptance Criteria
- A test: the wait text of homelab#61 (a link to
ansible/ansible-lint/pull/5240and the wordsPR #5240) gives no wait reference#5240. - A test: a bare
#12in a wait text is still a wait reference of the own repository.
Environment Diagnostics
devops-cli 0.224.0.
Alternatives check of 2026-11-27: partly.
Tool: semantic-release/issue-parser (https://github.com/semantic-release/issue-parser), MIT, last activity 2026-11-25, maintained.
Reason: Searches found no Python reference parser; issue-parser extracts a bare #12 and an owner/name#12 with its repository, but it has no rule to drop #5240 that matches a cross-repository link in the same text.
Covers:
- Reads a bare
#12with no repository - Reads
owner/name#12with its repository slug - Returns raw text, slug and issue number per reference
Lacks:
- No rule to drop
#5240that matches a cross-repository link - No repository inference from a nearby pull request URL
- JavaScript package with no Python equivalent on PyPI
Proposed design
Problem statement
Refine reads each #<n> of a wait text as an issue of the item's own repository. A wait text can name a pull request of another project, as dan-petty/homelab#61 does with PR #5240. Each round then reads an issue that the repository does not hold, and the store logs a misleading line. The wait can never end by an issue of the repository.
Acceptance criteria
Requirement: Cross-repository pull request number
The wait-reference reader SHALL leave out a bare #<n> when the same text holds a GitHub link to another repository with that number.
Scenario: Pull request of another project
- WHEN A test calls the wait-reference reader of
src/devops_cli/roadmap/refine/refine.pywith the textan ansible-lint release with the fix of PR #5240and the linkhttps://github.com/ansible/ansible-lint/pull/5240. - THEN The test asserts that the result holds no wait reference to issue 5240.
Requirement: Bare number of the own repository
The wait-reference reader SHALL keep a bare #<n> as a wait reference of the item's own repository when the text holds no cross-repository link with that number.
Scenario: Bare number with no link
- WHEN A test calls the wait-reference reader with the text
waits for #12. - THEN The test asserts that the result holds one wait reference to issue 12 of the own repository.
Requirement: Qualified reference of another repository
The wait-reference reader MUST read owner/name#<n> with that repository and MUST keep it only when owner/name is the repository of the item.
Scenario: Qualified reference of another repository
- WHEN A test calls the wait-reference reader with the text
blocked by ansible/ansible-lint#5240for the repositorydan-petty/homelab. - THEN The test asserts that the result holds no wait reference to issue 5240 of the own repository.
Requirement: Qualified reference of the own repository
The wait-reference reader SHALL keep owner/name#<n> as a wait reference of the own repository when owner/name is the repository of the item.
Scenario: Qualified reference of the own repository
- WHEN A test calls the wait-reference reader with the text
needs dan-petty/homelab#61for the repositorydan-petty/homelab. - THEN The test asserts that the result holds one wait reference to issue 61.
Existing Tool Considered
The alternatives check of 2026-11-27 in the issue body records the verdict partly for semantic-release/issue-parser (https://github.com/semantic-release/issue-parser, MIT, maintained). The block names what the tool covers and what it lacks. The tool lacks the one rule that the reported wait text needs: no drop of #5240 that matches a cross-repository link, and no repository from a nearby pull request URL. It is a JavaScript package with no Python equivalent on PyPI, so the change keeps the existing Python reader in src/devops_cli/roadmap/refine/refine.py and adds that one rule to _text_issues. The cost of the rule is about 1 500 tokens to write it with its tests and about 30 minutes to keep it.
Key questions
- Where does refine read the wait references of a wait text?:
_wait_refsinsrc/devops_cli/roadmap/refine/refine.pyreads the text of the parts of the refine section that name a cause and the text of the replies._text_issuesturns each#<n>into an issue of the item's repository, and the job record keeps the result inRefineRecordKey.WAIT_REFS. [sources: src/devops_cli/roadmap/refine/refine.py:2750, src/devops_cli/roadmap/refine/refine.py:2809] - Which rule makes a bare
#<n>a wait reference of the own repository?: A bare#<n>is a wait reference of the own repository. The reader drops it when the same text holds a GitHub link to another repository with number<n>. This rule costs no GitHub read and keeps the wait text as the only input. (best practice) [sources: src/devops_cli/roadmap/refine/refine.py:2750]- Chosen: Drop a number that a cross-repository link in the same text names. The text holds the link and the number already, so the rule needs no request, and it follows the expected behavior of the issue.
- Rejected: Drop a reference that the store answers as no issue. It costs one GitHub read in each round, and the issue reports that read as the effect to remove.
- Rejected: Read
owner/name#<n>with its repository alone. The reported wait text has a bare#5240, so this option leaves the defect in place.
- Which URL forms count as a GitHub link to another repository?: A link counts when it has the form
https://github.com/<owner>/<name>/pull/<n>,https://github.com/<owner>/<name>/issues/<n>orhttps://github.com/<owner>/<name>/discussions/<n>, and<owner>/<name>is not the repository of the item. A link to a repository root or to a file names no number, so it counts for nothing. (best practice) [sources: src/devops_cli/roadmap/refine/refine.py:2809]- Chosen: Match the three GitHub object URL forms with their repository. GitHub gives these three forms a number, and each form names its repository in the path.
- Rejected: Match each
https://github.com/URL. A link to a repository root or to a file holds no object number, so it would drop a correct reference. - Rejected: Match the words
PRbefore the number. The words give no repository, and a bare#12afterPRcan still be an issue of the own repository.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 27, 2026
Both fix refine text parsing that produces wrong references, but #6444 fixes false file-path matches while the candidate fixes false issue-reference matches.devops-cli-service commentedon Nov 27, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (10)
Tools considered:
Searches run:
owner/repo#123PR fix(security): the masker leaves names after token or Secret alone #5240, results: 5owner/repo#123from text, results: 5owner/repo#123" cross-repository issue reference, results: 5Sources:
devops-cli-service commentedon Nov 28, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
devops-cli-service commentedon Nov 28, 2026
Released in v0.241.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.241.0
devops-cli-service commentedon Nov 29, 2026
Live since 2026-11-29 00:41 UTC