Skip to content

fix(releaselinks): stop promising a field GitLab does not send - #853

Merged
jmrplens merged 1 commit into
plan-l17from
plan-l18
Sep 20, 2026
Merged

jmrplens merged 1 commit into
plan-l17from
plan-l18

Conversation

@jmrplens

@jmrplens jmrplens commented Sep 20, 2026

Copy link
Copy Markdown
Owner

All six release-link descriptions, the doc comment above them and the release reference page named an external field beside the five the Output type carries. GitLab has not sent it since 16.0: the live oracle taken from 19.3.1 records API::Entities::Releases::Link as exposing id, name, url, direct_asset_url and link_type, with no conditions and nothing else. A model was told six times to expect a key it never receives, and the likely answer to that is a second call looking for the field or a value invented in its place.

The word goes rather than the field arriving. client-go still models ReleaseLink.External, so filling an output field from it is the tempting reading and the wrong one: it would publish a bool that is false for every link on every instance, which is the class of defect issue 580 was about. That stale SDK field is already recorded in docs/development/upstream-bugs.md, among the ten modelled fields no Grape entity exposes, so nothing new is owed upstream.

Sixteen mock responses in the package fed external back and a helper set the SDK field from a parameter of its own, so every fixture here described a link no instance can serve, which is what let the promise survive a green suite for as long as it did. They go with it, and a guard takes their place: the six descriptions are held against the JSON keys Output publishes, with the candidates taken from client-go's own struct rather than from a list naming external, so the next key the SDK models and this server does not is caught the moment a description promises it.

The batch action also recovers the guidance a deleted duplicate block carried. It told a model not to call link_create once per asset and not to put a single name and url at top level, and a later assignment overwrote the whole block a few lines down, so none of it ever reached a model. Its usage sentence and both confusions are in the live block now, and release.link_create is among its related actions, where the dead copy had it and the live one did not.

Generated artifacts move and are left for the regeneration at the top of the stack: testdata/tools_individual.json (six tools), tools_meta.json, tools_meta_compact.json and tools_meta_full.json (one each), the llms.txt family and the testing reference, which gains one test function.

(cherry picked from commit 91aa4b0f2244e5533dbfe8be9aa37094a4cd3101)

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @jmrplens, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 10 hours and 47 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 11 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: jmrplens/gitlab-mcp-server/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: ed3e4559-8e1e-4639-856b-d2112f36ec0e

📥 Commits

Reviewing files that changed from the base of the PR and between 8f50fc7 and f140c23.

📒 Files selected for processing (4)
  • docs/reference/tools/releases.md
  • internal/tools/releaselinks/action_specs.go
  • internal/tools/releaselinks/action_specs_test.go
  • internal/tools/releaselinks/release_links_test.go

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jmrplens
jmrplens added this pull request to stack #863 September 20, 2026 10:16
@jmrplens jmrplens added this to the 3.1.0 milestone Sep 20, 2026
@github-actions github-actions Bot added bug Something isn't working v3.1.0 Targeted at the 3.1.0 release labels Sep 20, 2026
@jmrplens
jmrplens removed this pull request from stack #863 September 20, 2026 19:40
@jmrplens
jmrplens added this pull request to stack #866 September 20, 2026 19:40
All six release-link descriptions, the doc comment above them and the
release reference page named an `external` field beside the five the
Output type carries. GitLab has not sent it since 16.0: the live oracle
taken from 19.3.1 records API::Entities::Releases::Link as exposing id,
name, url, direct_asset_url and link_type, with no conditions and
nothing else. A model was told six times to expect a key it never
receives, and the likely answer to that is a second call looking for the
field or a value invented in its place.

The word goes rather than the field arriving. client-go still models
ReleaseLink.External, so filling an output field from it is the tempting
reading and the wrong one: it would publish a bool that is false for
every link on every instance, which is the class of defect issue 580 was
about. That stale SDK field is already recorded in
docs/development/upstream-bugs.md, among the ten modelled fields no
Grape entity exposes, so nothing new is owed upstream.

Sixteen mock responses in the package fed `external` back and a helper
set the SDK field from a parameter of its own, so every fixture here
described a link no instance can serve, which is what let the promise
survive a green suite for as long as it did. They go with it, and a
guard takes their place: the six descriptions are held against the JSON
keys Output publishes, with the candidates taken from client-go's own
struct rather than from a list naming `external`, so the next key the
SDK models and this server does not is caught the moment a description
promises it.

The batch action also recovers the guidance a deleted duplicate block
carried. It told a model not to call link_create once per asset and not
to put a single name and url at top level, and a later assignment
overwrote the whole block a few lines down, so none of it ever reached
a model. Its usage sentence and both confusions are in the live block
now, and release.link_create is among its related actions, where the
dead copy had it and the live one did not.

Generated artifacts move and are left for the regeneration at the top
of the stack: testdata/tools_individual.json (six tools),
tools_meta.json, tools_meta_compact.json and tools_meta_full.json (one
each), the llms.txt family and the testing reference, which gains one
test function.

(cherry picked from commit 91aa4b0f2244e5533dbfe8be9aa37094a4cd3101)
@sonarqubecloud

Copy link
Copy Markdown

@jmrplens
jmrplens merged commit a7d7c5b into main Sep 20, 2026
37 checks passed
@jmrplens
jmrplens deleted the plan-l18 branch September 20, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working v3.1.0 Targeted at the 3.1.0 release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant