Skip to content

[Fusion] Extend federation-gateway-audit satisfiability tests#9787

Merged
glen-84 merged 5 commits into
mainfrom
gai/audit-derived-satisfiability-tests
May 28, 2026
Merged

[Fusion] Extend federation-gateway-audit satisfiability tests#9787
glen-84 merged 5 commits into
mainfrom
gai/audit-derived-satisfiability-tests

Conversation

@glen-84
Copy link
Copy Markdown
Member

@glen-84 glen-84 commented May 27, 2026

Summary

  • Extend the federation-gateway-audit-derived section of SatisfiabilityValidatorTests with 15 suites across the @override, @provides, @requires, entity-call, and schema-shape clusters: 13 pass, 2 are committed as [Fact(Skip = …)].
  • Lookups follow one rule: an explicit @lookup is added for every type with a resolvable @key in the audit subgraph, since the composite-schemas spec has no implicit reference resolution (Federation's implicit _entities resolver becomes an explicit @lookup).
  • SDLs are adapted to the composite-schemas spec: @requires(fields:) becomes argument-level @require(field:) (including path<ConcreteType>.field type conditions), and @override(from:) uses the helper's uppercase schema names.
  • The 2 skipped suites are valid supergraphs in the audit project that hit current validator gaps (circular @require, parent entity calls). Each quotes its blocker and asserts the intended IsSuccess, so it re-activates once the gap closes.
  • The union-intersection suite is intentionally not ported: it would require widening an object type to a union containing it at merge time, which is out of scope.

Test plan

  • dotnet test src/HotChocolate/Fusion/test/Fusion.Composition.Tests --filter "FullyQualifiedName~SatisfiabilityValidatorTests" — 61 passed, 2 skipped, 0 failed on net8.0, net9.0, and net10.0.

Copilot AI review requested due to automatic review settings May 27, 2026 15:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends SatisfiabilityValidatorTests with additional satisfiability suites derived from the federation-gateway-audit project, covering more directive/shape scenarios (e.g., @override, @provides, @require, entity-call, schema-shape). It also adapts the suite SDLs to the composite-schemas spec by making reference resolution explicit via @lookup and translating @requires(fields:) patterns into argument-level @require(field:).

Changes:

  • Added multiple new satisfiability test cases for audit-derived scenarios, including pass and intentionally-skipped suites for known engine gaps.
  • Introduced explicit @lookup @inaccessible entry points for resolvable @key types to match composite-schemas behavior.
  • Updated SDLs in the new suites to composite-schemas equivalents (notably argument-level @require(field:) and updated @override(from:) schema names).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@glen-84 glen-84 merged commit 802fe27 into main May 28, 2026
143 checks passed
@glen-84 glen-84 deleted the gai/audit-derived-satisfiability-tests branch May 28, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants