Require project IDs for CLI request scoping - #218
Merged
Conversation
Document the global project selector truthfully and use the SDK's canonical project option so request scoping continues to match the ID-only API header contract.
Sayan-
approved these changes
Aug 7, 2026
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.
Summary
--projectflag as accepting project IDs onlyoption.WithProjectIDclient optionKERNEL_PROJECTexamples with the merged API contractWhy
X-Kernel-Project-Idis an ID selector on the merged API. Advertising project names here can scope a command incorrectly or produce a confusing not-found response. The typed SDK option also keeps client configuration aligned with generated SDK behavior.Implementation
The request still carries the same
X-Kernel-Project-Idheader. This changes the public CLI guidance and replaces the manually named header option with the SDK's first-class project option.Verification
go test -short -timeout=2m ./...go vet ./...gofmt -l cmdgit diff --checkresolveProjectSelectionCRAP 2.0; rootinitCRAP 5.8Note
Low Risk
Small client-option refactor with equivalent header behavior; main user-facing change is clearer docs that names are not valid for global scoping.
Overview
Global project scoping (
--project/KERNEL_PROJECT) is now documented and intended for project IDs only, not names, matching the API’sX-Kernel-Project-Idcontract.Client setup switches from a manual
X-Kernel-Project-Idheader option to the Go SDK’soption.WithProjectID(same header, typed configuration). README and flag help text are updated accordingly, including clarification thatapi-keys create --project-idis separate from the global scoping flag. Tests use ID-style example values.Reviewed by Cursor Bugbot for commit 8f4d57d. Bugbot is set up for automated code reviews on this repo. Configure here.