Repository navigation
Conversation
The repository-qualified shape had no lookbehind in front of it, so any link whose path carried a segment before the `#` matched it 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 a GitHub issue/pull URL still name the issue. Test: core/test/issue-ref-url-fragment.test.js (red on the base: 4/4). Docs-not-needed: the shape list in docs/subsystems/core-host.md is unchanged; this closes a hole in the rule the module and its tests already state (ThinkFlowLab#1392), with no new module, contract or owned-path change.
Contributor
Author
|
Written-by: Delivery-1 Review requested at the current tip, please.
One conclusion at this tip is what clears it; nothing else here is waiting on a change. |
Contributor
Author
|
Closing: our account has no write access to Owner: Delivery-1 |
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.
Written-by: Delivery-1
Fixes #2435
Owner: Delivery-1
Tip SHA: bb6579b
Branch:
delivery1/issue-ref-url-fragment(forkHugoXK/FlyBot, basedelivery/ai-centric-development-service@5e71a07e)Reproduce
On the base, a link whose path has a segment before the
#reads asowner/repo#12:Actual:
['#123']and['#12']. Expected:[]for both — the module's own rule is that a word character,.,-or/in front makes the#part of an identifier, a version, a hex colour or a URL fragment; only#1234,owner/repo#1234and a GitHub/(issues|pull)/<n>link name an issue (#1392).What changed
core/src/shared/issue-ref.js:10— the repository-qualified alternative had no lookbehind, so inhttps://example.com/page#123it matchedcom/page#123(host segment as "owner", path segment as "repo"). It now carries the same(?<![\w./-])boundary as the bare-number alternative. The third alternative (GitHub issue/pull URL) is untouched, and so areowner/repo#1360, a bare#1360and a mention-qualified ref.Four files, +66/−4:
core/src/shared/issue-ref.js(+6/−2),core/test/issue-ref-url-fragment.test.js(new, 29 lines), and the two generatedpatches/ds-bot/files/mirrors (generatethencheck).Red without the source change
core/test/issue-ref-url-fragment.test.json base5e71a07e(fix reverted, test file present):With the source change:
# tests 4 / # pass 4 / # fail 0. The fourth test also holds the accepted shapes (owner/repo#1360, a bare ref, a GitHub issue URL) so the fix is not "reject every qualified ref".Why the existing suite missed it: its URL-fragment case is
https://example.com/help/#123(core/test/issue-ref.test.js:13), which has noowner/repopair before the#; a fragment after one path segment is the common documentation-link shape and was untested.What I ran (at the tip
bb6579bd)The 7 failures are the box's environment group (
test/workbench-client.test.jsandtest/project-runtime-setup.test.js, PTY / browser routes); they fail identically with the source change reverted (32 tests / 25 pass / 7 fail in those two files) and no issue-ref suite is among them.git diff upstream/delivery/ai-centric-development-service...HEAD --statlists only the four files above.Not run
changelog.d/is outside this lane's file surface (core/src/shared/**,core/test/**); the repository gate only validates existing fragments. The change removes a false issue reference; it adds no feature.index.js/src/host/are untouched.Checkpoint
{ "pr": 2437, "claim": "Delivery-1", "issue": 2435, "summary": "The repository-qualified issue pattern had no lookbehind, so a URL with a path segment before the # matched as <host>/<segment>#12 and named an issue nobody meant. The qualified shape now needs the same boundary as a bare number, while owner/repo#12, a bare #12, a GitHub issue URL and a mention-qualified ref keep working. One new test file proves the fragment cases and holds the accepted shapes.", "files": ["core/src/shared/issue-ref.js", "core/test/issue-ref-url-fragment.test.js"], "checks": { "ran": "node --import ./test/harness-resolve.mjs --test test/issue-ref-url-fragment.test.js test/issue-ref.test.js test/face-mentions.test.js test/work-dispatch.test.js && node scripts/ds-bot-patches.mjs check", "result": "green", "at": "bb6579bd5af212a922d8a9b1a3a878ed07ffb2cb" }, "next": "none — ready for review" }