Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ What each of these does, and why, is in [Test Infrastructure](docs/development/t

### Request paths (R-PATH) and fine-grained grants (R-GRANT)

Two dimensions of the 1:1 audit look at the requests a handler sends rather than the surface it publishes: R-PATH at the requests the unit suite recorded, R-GRANT at the ones it derives from the handlers' code. **R-PATH** (`go run ./cmd/audit_1to1/ -scope=paths`, `make audit-1to1-paths`) was added after nine registered tools shipped unable to work while the other five dimensions were green. It reads `docs/development/request-inventory.json` and asks whether each owning package was observed sending a request, whether each GraphQL document validates, whether each REST endpoint exists in GitLab's documentation (`make audit-1to1-paths-endpoints`), whether GitLab's live record sends the fields we publish and which fields it sends that we do not (each marked by whether client-go models it), whether every list says where it ends (R-PAGE), whether a param is sent that the caller never asked to send, and whether each path was ever built from more than one fixture value. **R-GRANT** derives from each action's handlers what it sends, joins it to what a booted GitLab declares a fine-grained token needs, and generates the table the server enforces (`internal/tools/actiongrants/table_gen.go`, never edited by hand) together with the classic scope each action needs (ADR-0026); `make check-action-grants-derivation`, `make check-action-grants` and `make audit-1to1-grants` are steps 26 to 28 of `make analyze`. Every declaration table either reads fails on an entry that answers nothing. Both, with each check, oracle, gate and declaration table, are in [Request Paths and Fine-Grained Grants](docs/development/request-paths.md).
Two dimensions of the 1:1 audit look at the requests a handler sends rather than the surface it publishes: R-PATH at the requests the unit suite recorded, R-GRANT at the ones it derives from the handlers' code. **R-PATH** (`go run ./cmd/audit_1to1/ -scope=paths`, `make audit-1to1-paths`) was added after nine registered tools shipped unable to work while the other five dimensions were green. It reads `docs/development/request-inventory.json` and asks whether each owning package was observed sending a request, whether each GraphQL document validates, whether each REST endpoint exists in GitLab's documentation (`make audit-1to1-paths-endpoints`), whether GitLab's live record sends the fields we publish and which fields it sends that we do not (each marked by whether client-go models it), whether every list says where it ends and offers `page_token` only on a route the live record's schema 5 says can be paged by keyset (R-PAGE), whether a param is sent that the caller never asked to send, and whether each path was ever built from more than one fixture value. **R-GRANT** derives from each action's handlers what it sends, joins it to what a booted GitLab declares a fine-grained token needs, and generates the table the server enforces (`internal/tools/actiongrants/table_gen.go`, never edited by hand) together with the classic scope each action needs (ADR-0026); `make check-action-grants-derivation`, `make check-action-grants` and `make audit-1to1-grants` are steps 26 to 28 of `make analyze`. Every declaration table either reads fails on an entry that answers nothing. Both, with each check, oracle, gate and declaration table, are in [Request Paths and Fine-Grained Grants](docs/development/request-paths.md).

**None of that machinery may reach the server binary**: `internal/graphqlschema` and `internal/testutil` stay out of `cmd/server`'s import graph, held by `TestDependencies_TestSupport_NeverReachesTheServerBinary` in `cmd/server/main_test.go`.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<!-- START TOKEN CLAIM -->

**11,396 tokens of startup context by default, the same on every GitLab tier (1,994 with `GITLAB_MCP_CAPABILITY_SURFACE=minimal`).** Two tools reach the whole catalog, where listing every tool as its own costs from 576,925 to 738,013 tokens. Measured with the cl100k_base tokenizer and checked in CI. [How it is measured](https://docs.jmrp.io/gitlab-mcp-server/tools/dynamic-tools/#how-much-startup-context-does-dynamic-mode-save)
**11,396 tokens of startup context by default, the same on every GitLab tier (1,994 with `GITLAB_MCP_CAPABILITY_SURFACE=minimal`).** Two tools reach the whole catalog, where listing every tool as its own costs from 576,700 to 737,788 tokens. Measured with the cl100k_base tokenizer and checked in CI. [How it is measured](https://docs.jmrp.io/gitlab-mcp-server/tools/dynamic-tools/#how-much-startup-context-does-dynamic-mode-save)

<!-- END TOKEN CLAIM -->

Expand Down
14 changes: 11 additions & 3 deletions docs/development/cmd-utilities.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/development/repository-map.md

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions docs/development/request-inventory.json
Original file line number Diff line number Diff line change
Expand Up @@ -9614,9 +9614,8 @@
"expires_before",
"last_used_after",
"last_used_before",
"order_by",
"page_token",
"pagination",
"page",
"per_page",
"revoked",
"search",
"sort",
Expand Down Expand Up @@ -16199,10 +16198,7 @@
"expires_before",
"last_used_after",
"last_used_before",
"order_by",
"page",
"page_token",
"pagination",
"per_page",
"revoked",
"search",
Expand Down
Loading
Loading