Skip to content

fix: Add exhaustive directive to npx test fixtures#4634

Merged
nasdf merged 3 commits intosourcenetwork:developfrom
nasdf:nasdf/fix/exhaustive-directive-npx-test
Mar 26, 2026
Merged

fix: Add exhaustive directive to npx test fixtures#4634
nasdf merged 3 commits intosourcenetwork:developfrom
nasdf:nasdf/fix/exhaustive-directive-npx-test

Conversation

@nasdf
Copy link
Copy Markdown
Member

@nasdf nasdf commented Mar 18, 2026

Relevant issue(s)

Resolves: #4667

Description

This PR fixes the npx tests by adding the missing @exhaustive directive to the test fixtures. We should also make the npx tests required.

Tasks

  • I made sure the code is well commented, particularly hard-to-understand areas.
  • I made sure the repository-held documentation is changed accordingly.
  • I made sure the pull request title adheres to the conventional commit style (the subset used in the project can be found in tools/configs/chglog/config.yml).
  • I made sure to discuss its limitations such as threats to validity, vulnerability to mistake and misuse, robustness to invalidation of assumptions, resource requirements, ...

How has this been tested?

make test:npx

Specify the platform(s) on which this was tested:

  • MacOS

@nasdf nasdf self-assigned this Mar 18, 2026
@nasdf nasdf added the area/testing Related to any test or testing suite label Mar 18, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0020ea12-effc-4784-8b56-a804cd9502fc

📥 Commits

Reviewing files that changed from the base of the PR and between 5a21761 and fef6b61.

📒 Files selected for processing (2)
  • cli/sdl_generate_npx_test.go
  • internal/request/graphql/schema/manager_npx_test.go
✅ Files skipped from review due to trivial changes (1)
  • internal/request/graphql/schema/manager_npx_test.go
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (45)
  • GitHub Check: Test Limited Resource job
  • GitHub Check: Test macos job
  • GitHub Check: Test coverage job (cli, memory, gql)
  • GitHub Check: Test coverage job (c, file, collection-save)
  • GitHub Check: Test coverage job (http, file, gql)
  • GitHub Check: Test coverage job (c, memory, collection-named)
  • GitHub Check: Test coverage job (c, file, collection-named)
  • GitHub Check: Test coverage job (c, memory, collection-save)
  • GitHub Check: Test coverage job (go, file, collection-named)
  • GitHub Check: Test coverage job (cli, file, collection-named)
  • GitHub Check: Test coverage job (go, file, gql)
  • GitHub Check: Test coverage job (c, memory, gql)
  • GitHub Check: Test coverage job (c, file, gql)
  • GitHub Check: Test coverage job (go, memory, collection-save)
  • GitHub Check: Test coverage job (http, file, collection-save)
  • GitHub Check: Test coverage job (cli, memory, collection-save)
  • GitHub Check: Test coverage job (http, memory, collection-save)
  • GitHub Check: Test coverage job (cli, file, gql)
  • GitHub Check: Test coverage job (http, memory, collection-named)
  • GitHub Check: Test coverage job (http, memory, gql)
  • GitHub Check: Test coverage job (cli, memory, collection-named)
  • GitHub Check: Test coverage job (go, memory, collection-named)
  • GitHub Check: Test coverage job (http, file, collection-named)
  • GitHub Check: Test coverage job (cli, file, collection-save)
  • GitHub Check: Test coverage job (go, file, collection-save)
  • GitHub Check: Test coverage job (go, memory, gql)
  • GitHub Check: Test coverage JS job
  • GitHub Check: Test coverage secondary index job
  • GitHub Check: Test coverage lens job (wazero)
  • GitHub Check: Test coverage document acp job (c, source-hub)
  • GitHub Check: Test coverage document acp job (cli, source-hub)
  • GitHub Check: Test coverage encryption job
  • GitHub Check: Test coverage telemetry job
  • GitHub Check: Test coverage document acp job (http, source-hub)
  • GitHub Check: Test coverage leveldb job
  • GitHub Check: Test coverage document acp job (go, source-hub)
  • GitHub Check: Test coverage view job
  • GitHub Check: Check data format changes job
  • GitHub Check: Check http documentation job
  • GitHub Check: Check wizard health job
  • GitHub Check: Check cli documentation job
  • GitHub Check: Test NPX/JS build job
  • GitHub Check: Lint GoLang job
  • GitHub Check: Validate containerfile job
  • GitHub Check: Start binary job
🔇 Additional comments (1)
cli/sdl_generate_npx_test.go (1)

437-440: Pinning graphql-inspector to @6.0.7 is a good stability fix.

This makes the npx-based schema diff deterministic across environments and CI runs, and is consistently applied across all Go test invocations.


📝 Walkthrough

Walkthrough

Adds a new GraphQL directive @exhaustive (location: QUERY) to three schema test fixture files and pins the npx @graphql-inspector/cli`` invocation to version 6.0.7 in two test files.

Changes

Cohort / File(s) Summary
GraphQL Schema Test Fixtures
internal/request/graphql/schema/testfixtures/schema.relatedmany.gen.graphql, internal/request/graphql/schema/testfixtures/schema.relatedone.gen.graphql, internal/request/graphql/schema/testfixtures/schema.simple.gen.graphql
Added directive @exhaustive on QUERY with a descriptive string indicating exhaustive/complete results may be requested at potential performance cost. Minor newline/formatting tweak in an existing encryptedIndex directive line.
Test helpers — npx invocation pinned
cli/sdl_generate_npx_test.go, internal/request/graphql/schema/manager_npx_test.go
Updated npx calls to use a fixed package version: @graphql-inspector/[email protected] instead of an unpinned package reference. No other test logic changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.76%. Comparing base (b23a706) to head (fef6b61).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4634      +/-   ##
===========================================
- Coverage    76.84%   76.76%   -0.08%     
===========================================
  Files          529      529              
  Lines        42793    42793              
===========================================
- Hits         32880    32847      -33     
- Misses        7411     7434      +23     
- Partials      2502     2512      +10     
Flag Coverage Δ
all-tests 76.76% <ø> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 12 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b23a706...fef6b61. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nasdf nasdf requested a review from a team March 19, 2026 22:49
Copy link
Copy Markdown
Collaborator

@fredcarle fredcarle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Please create an issue an link it to the PR. It would be good to document why this is needed within the issue description.

@nasdf nasdf merged commit 10b2616 into sourcenetwork:develop Mar 26, 2026
55 of 58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/testing Related to any test or testing suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add missing @exhaustive directive to introspection tests

2 participants