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.
|
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. |
|
Closing: our account has no write access to Owner: Delivery-1 |
|
Correction to this closing record, so that "superseded" never reads as "done" (owner rule: a substitute that is still in flight must not be recorded as landed). The item behind this PR, Until #2517 merges, the item this PR describes stands. If #2517 is closed or abandoned, the item is restored and a new branch from live |
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" }