Skip to content

[CLI] Check the version headers in cg check #1390

Closed

Description

@laurabelinfante

Summary

Update cg check spec for the API version negotiation ADR (#1159, #1372). Today it skips headers completely, so it can't tell whether an API supports versioning. From 0.6.0 on, it should flag any route that's missing the version headers. This depends on the core v0.6.0 release, because the CLI needs the 0.6.0 spec to check against.

Acceptance criteria

  • The CLI bundles the 0.6.0 spec, and cg check spec --protocol-version 0.6.0 works
  • When checking against 0.6.0 or later, cg check reports any route missing the CG-Version request header or the CG-Version-Served response header. Checks against 0.1.0 to 0.5.0 work the same as today
  • Protocol versions sort as version numbers, so 0.10.0 comes after 0.9.0
  • An API that puts the version in its paths (like /v0.6/common-grants/...) gets a message saying versions go in the header, instead of a long list of missing routes

Additional information

  • Test for the second criterion: a 0.6.0 OpenAPI document where an operation is missing the CG-Version request parameter or the CG-Version-Served response header gets a cg check finding for that operation. cg check ignores headers today, so this is the test that proves the change.
  • cg check can't enforce the rule that servers serving more than one version must publish the discovery route. Route tags can't express that condition, so it's out of scope here.

Activity

  1. added
    cliIssue or PR related to the @common-grants/cli library
    coreIssues related to @common-grants/core library
    featureNew capability. Belongs on a hold branch.
    on Nov 5, 2026
  2. self-assigned this
    on Nov 18, 2026
  3. moved this from In Progress to In Review in Simpler Grants Product & Deliveryon Nov 19, 2026
  4. added 2 commits that reference this issue on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

cliIssue or PR related to the @common-grants/cli librarycoreIssues related to @common-grants/core libraryfeatureNew capability. Belongs on a hold branch.

Type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions