Skip to content

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

Closed
glen-84 wants to merge 3 commits into
mainfrom
gai/rename-unsatisfiable-query-path-code
Closed

[Fusion] Extend federation-gateway-audit satisfiability tests#9786
glen-84 wants to merge 3 commits into
mainfrom
gai/rename-unsatisfiable-query-path-code

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 16 suites across the @override, @provides, @requires, entity-call, and schema-shape clusters: 13 pass, 3 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 3 skipped suites are valid supergraphs in the audit project that hit current engine gaps (circular @requires, parent entity calls, and object-to-union widening at merge). Each quotes its blocker and asserts the intended IsSuccess, so it re-activates once the gap closes.

Test plan

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

Copilot AI review requested due to automatic review settings May 27, 2026 15:37
@github-actions github-actions Bot added 📚 documentation This issue is about working on our documentation. 🌶️ hot chocolate labels May 27, 2026
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 renames the satisfiability validator's error code from UNSATISFIABLE to UNSATISFIABLE_QUERY_PATH across the Fusion composition source, tests, and migration/composition documentation. It also adds assertions in the existing SatisfiabilityValidatorTests to verify that emitted log entries use the new code. Note that the diffs shown here do not include the 16 new federation-gateway-audit test suites described in the PR summary — only the rename-related additions are visible.

Changes:

  • Rename LogEntryCodes.Unsatisfiable constant value to UNSATISFIABLE_QUERY_PATH and update both emission sites in SatisfiabilityValidator.
  • Add Assert.All(log, ...) checks in existing satisfiability tests to verify the new code is emitted.
  • Update Fusion v16 docs (composition reference, diagnostics section, migration guide) to use the new error code name.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/HotChocolate/Fusion/src/Fusion.Composition/Logging/LogEntryCodes.cs Renames the constant and changes its string value to UNSATISFIABLE_QUERY_PATH.
src/HotChocolate/Fusion/src/Fusion.Composition/SatisfiabilityValidator.cs Updates the two SetCode calls to use the renamed constant.
src/HotChocolate/Fusion/test/Fusion.Composition.Tests/SatisfiabilityValidatorTests.cs Adds per-test assertions that every emitted log entry carries the new code.
website/src/docs/fusion/v16/composition.md Updates documentation text, table entry, and anchor/section heading to the new error code.
website/src/docs/fusion/v16/migration/migrate-from-15-to-16.md Updates two references in the migration guide to the new error code.

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

@glen-84
Copy link
Copy Markdown
Member Author

glen-84 commented May 27, 2026

Closing: opened from the wrong branch (gai/rename-unsatisfiable-query-path-code, whose rename work already merged via #9780). Reopening from gai/audit-derived-satisfiability-tests.

Drafted by Claude (Anthropic AI assistant).

@glen-84 glen-84 closed this May 27, 2026
@glen-84 glen-84 deleted the gai/rename-unsatisfiable-query-path-code branch May 27, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📚 documentation This issue is about working on our documentation. 🌶️ hot chocolate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants