Skip to content

fix(cli): reject GraphQL semantic failures in PAT preflight#1201

Closed
Desel72 wants to merge 1 commit into
entrius:testfrom
Desel72:fix/cli-pat-graphql-preflight
Closed

fix(cli): reject GraphQL semantic failures in PAT preflight#1201
Desel72 wants to merge 1 commit into
entrius:testfrom
Desel72:fix/cli-pat-graphql-preflight

Conversation

@Desel72
Copy link
Copy Markdown
Contributor

@Desel72 Desel72 commented May 12, 2026

Summary

Align gitt miner post local PAT preflight with validator-side GraphQL semantics.

This change makes CLI preflight reject PATs when GitHub GraphQL returns HTTP 200 but:

  • errors is present, or
  • data.viewer is null/missing.

It prevents false-positive "PAT is valid" results in CLI that later fail validator checks.

Related Issues

Closes #1199

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other (describe below)

Testing

  • Tests added/updated
  • Manually tested

Added CLI unit tests for:

  • GraphQL 200 + errors => reject
  • GraphQL 200 + viewer: null => reject
  • GraphQL 200 + valid viewer => accept

Note: Full pytest execution in this environment is blocked by missing dependency rich at import time.

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Changes are documented (if applicable)

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 12, 2026
@anderdc
Copy link
Copy Markdown
Collaborator

anderdc commented May 12, 2026

duplicate of #1196

@anderdc anderdc closed this May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] gitt miner post accepts GraphQL 200 semantic failures during PAT preflight

2 participants