Conversation
|
Warning Review limit reachedNext included review available in 11 minutes. View limit detailsLimit 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. Review configuration: ⚙️ Run configurationConfiguration used: Repository: jmrplens/gitlab-mcp-server/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (9)
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. Comment |
jmrplens
added this pull request to stack #863
September 20, 2026 10:16
jmrplens
force-pushed
the
plan-l17
branch
2 times, most recently
from
September 20, 2026 14:24
696b22e to
add2d27
Compare
jmrplens
removed this pull request from stack #863
September 20, 2026 19:40
jmrplens
added this pull request to stack #866
September 20, 2026 19:40
One six-value enum was published on all three update actions, which put `global` on notification_global_update. client-go refuses that value in UpdateGlobalSettings before it builds a request, so a model picking it off the published list was guaranteed an error, and the 400 hint the same handler returned offered it the very list it had just failed with. GitLab itself imposes no such restriction, so the narrowing is the SDK's, but it sits upstream of the wire and nothing here gets past it. An unrecognized level was worse than wrong. buildUpdateOpts dropped it, the PUT went out carrying everything else and no level, GitLab kept the level it already had and answered 200, and the handler rendered that unchanged level as a successful update. Nothing in the answer distinguished it from the change the caller asked for. The enum did not close this either: the default dynamic surface and the opaque meta surface validate parameter names and requiredness and nothing else, so only the individual surface ever refuses a value on the enum's account. Each scope now carries its own level list, the account-wide one derived from the scoped one so the inherit level stays the only difference between them, and each update handler passes its own to buildUpdateOpts, which refuses anything outside it. The same list renders the enum, the parameter description and the 400 hint. The shared eventFields tag names no values, since one embed cannot say two things, and a test holds every update action's enum, description and Usage sentence to its own list. (cherry picked from commit 2b3a33f2d7a632f9784a38d200620e0012372b1b)
`make check-meta-descriptions` failed on one line. gitlab_user's Notifications block offered `global` as a value of `level` for `notification_global_update`, and that action publishes one level fewer than its project and group siblings: `global` means "inherit the setting one scope up", the account has no scope above it, and client-go refuses `GlobalNotificationLevel` there before it builds a request. The enum and the parameter description were already right; the prose a model reads on the default surfaces was not. Nothing generates that line. A meta group's description is curated text embedded from `internal/tools/testdata/tools_meta.json`, which `catalogGroupDescription` reads and the snapshot regenerator writes back from, so the round trip cannot notice one going stale. That is what `cmd/audit_meta_descriptions` exists to be the third party for, and this is it catching one. The line is corrected where it lives, in the embedded snapshot and in the two mode goldens carrying the same description. The Usage sentence was the third copy of that list and the one nothing compares: `StripMetaToolDescriptionPrefix` removes the "Action guidance" block before the audit reads a description, so a level spelled there that the action's enum refuses would reach a model unchallenged. It is rendered now by `updateUsage` from the same per-scope list the enum and the parameter description already come from, which reproduces today's three sentences byte for byte and cannot disagree with them tomorrow. `auditServedSurface` is split out of `run` so a test can hold one rule over the real surface without reassembling the setup. `TestAuditServedSurface_OffersNoValueTheActionItNamesRejects` reads the accepted values back from each action's own schema rather than listing them, and names the action and the value when a line offers one the schema rejects. It fails on the base commit with exactly this finding. The audit reads 1720 description lines, refuses none, and this was the only one on the surface that disagreed: every other action carrying a per-action enum override is clean, as is `(enabled, disabled, or dry_run)` in `runnercontrollers`, the only other Usage sentence that spells a value set. Two generated artifacts move with the served text and are left for the stack to refresh at its tip: `llms-full.txt` and `llms-full-meta-tools.txt`, seven bytes each, and `docs/development/token-footprint.md`.
|
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.



One six-value enum was published on all three update actions, which put
globalon notification_global_update. client-go refuses that value in UpdateGlobalSettings before it builds a request, so a model picking it off the published list was guaranteed an error, and the 400 hint the same handler returned offered it the very list it had just failed with. GitLab itself imposes no such restriction, so the narrowing is the SDK's, but it sits upstream of the wire and nothing here gets past it.An unrecognized level was worse than wrong. buildUpdateOpts dropped it, the PUT went out carrying everything else and no level, GitLab kept the level it already had and answered 200, and the handler rendered that unchanged level as a successful update. Nothing in the answer distinguished it from the change the caller asked for. The enum did not close this either: the default dynamic surface and the opaque meta surface validate parameter names and requiredness and nothing else, so only the individual surface ever refuses a value on the enum's account.
Each scope now carries its own level list, the account-wide one derived from the scoped one so the inherit level stays the only difference between them, and each update handler passes its own to buildUpdateOpts, which refuses anything outside it. The same list renders the enum, the parameter description and the 400 hint. The shared eventFields tag names no values, since one embed cannot say two things, and a test holds every update action's enum, description and Usage sentence to its own list.
(cherry picked from commit 2b3a33f2d7a632f9784a38d200620e0012372b1b)
One consequence surfaced by
make check-meta-descriptionsonce this layer stood on its own:gitlab_user's Notifications block still offeredglobalas a level fornotification_global_update, which this very change makes the action refuse, sinceglobalmeans "inherit the setting one scope up" and the account has no scope above it. The curated prose ininternal/tools/testdata/tools_meta.jsonis corrected here, the usage line renders the level list per scope so the two cannot drift again, and the audit reads the served surface for it.