Repository navigation
Conversation
The repository-qualified shape had no boundary in front of it, so any link whose path carried a segment before the `#` matched as `<host>/<segment>ThinkFlowLab#12`: `https://example.com/page#123` named issue ThinkFlowLab#123 and the dispatch wrote a card for an issue nobody meant. The qualified shape now needs the same boundary as the bare number, so a URL fragment stays a fragment while `owner/repo#12`, a bare `ThinkFlowLab#12` and GitHub issue/pull URLs still name the issue. Test: core/test/issue-ref-url-fragment.test.js (red on b38ec01: 5 of 8 tests fail). Docs-not-needed: core/src/shared/issue-ref.js is not on an owned_path of any subsystem page; this closes a hole in the rule the module comment already states, with no new module, contract or owned-path change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2435
Owner: Delivery-1
Reviewer: Birfy
Written-by: Delivery-1
Claim-Id: 9ebcbbe589f8456289f64635143a95d5
Base: b38ec01
Risk tier: T3
What changed
issueRefsread a URL fragment as anowner/repo#12reference whenever the link's path had a segment before the#.https://example.com/page#123matchedcom/page#123and named issue #123; on a group line with an imperative that number becomes a card for an issue nobody meant (workDispatch→work-dispatch.js).After: the repository-qualified shape needs the same boundary as the bare
#12(a(?<![\w./-])in front), so a URL fragment stays a fragment. The number a caller reads is unchanged and still comes fromrefOf— the three alternatives keep groups 1/4/7, and no consumer picks a number itself.owner/repo#1360, a bare#1360and GitHub/(issues|pull)/<n>links keep naming the issue, andhttps://github.com/o/r/issues/123#issuecomment-4567still yields exactly#123.Hand-written files:
core/src/shared/issue-ref.js(+4/−2),core/test/issue-ref-url-fragment.test.js(new, 42 lines),changelog.d/2435-issue-ref-url-fragment.fixed.md.patches/ds-bot/files/src/shared/issue-ref.jsand its test mirror are only whatnode scripts/ds-bot-patches.mjs generatewrites.core/client.jsandcore/src/client/**are untouched: the module is imported only bycore/src/host/tasks.jsandcore/src/host/work-dispatch.js.Verification at the tip
Tip SHA: eed6068
Ran:
b38ec011tree carrying onlycore/test/issue-ref-url-fragment.test.js:# tests 8 / # pass 3 / # fail 5# tests 22 / # pass 22 / # fail 0work-dispatch,tasks,groups):# tests 63 / # pass 63 / # fail 0TZ=UTC node --import ./test/harness-resolve.mjs --test "test/*.test.js":# tests 2925 / # pass 2925 / # fail 0node scripts/build-client.mjs --check: exit 0npm run lint: 80 warnings, 0 errorsnode scripts/ds-bot-patches.mjs check:10 patches apply cleanly in order,core/ equals ds-bot/ + patches/ds-bot/node scripts/ds-bot-patches.mjs canonical:ok patches/ds-bot/ is what generate writesnode .github/scripts/changelog.mjs check:33 fragment(s) in changelog.d/ are well formedARCH_DOCS_BASE=b38ec011d7dc3df13d76c8bf60af205534b2d69d npm run arch-docs:OK (0 changed file(s))Not run: the smoke test (no
index.jsorsrc/hostchange) and CI itself.Docs-not-needed:
core/src/shared/issue-ref.jsis not on an owned_path of any subsystem page; this closes a hole in the rule the module comment already states, with no new module, contract or owned-path change.Checkpoint
{ "pr": 2517, "claim": "Delivery-1", "issue": 2435, "summary": "A URL fragment no longer reads as a repository-qualified issue reference: https://example.com/page#123 named issue #123 and wrote a card for it. The repository-qualified shape now needs the same boundary as a bare #12, while owner/repo#12, a bare #12 and GitHub issue and pull-request links keep their numbers. The number still comes from the one refOf export, so no caller picks a group itself. Red first on b38ec011: 5 of 8 tests failed; at the tip the full core suite is 2925/2925.", "files": [ "core/src/shared/issue-ref.js", "core/test/issue-ref-url-fragment.test.js", "patches/ds-bot/files/src/shared/issue-ref.js", "patches/ds-bot/files/test/issue-ref-url-fragment.test.js", "changelog.d/2435-issue-ref-url-fragment.fixed.md" ], "checks": { "ran": "TZ=UTC node --import ./test/harness-resolve.mjs --test \"test/*.test.js\"; node scripts/ds-bot-patches.mjs check; node scripts/build-client.mjs --check; npm run lint", "result": "green", "at": "eed6068ba46a95d60f8c9db0dce7acb1adaaf4b2" }, "next": "none \u2014 ready for review" }