[Fusion] Extend federation-gateway-audit satisfiability tests#9786
[Fusion] Extend federation-gateway-audit satisfiability tests#9786glen-84 wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
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.Unsatisfiableconstant value toUNSATISFIABLE_QUERY_PATHand update both emission sites inSatisfiabilityValidator. - 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.
|
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). |
Summary
SatisfiabilityValidatorTestswith 16 suites across the@override,@provides,@requires, entity-call, and schema-shape clusters: 13 pass, 3 are committed as[Fact(Skip = …)].@lookupis added for every type with a resolvable@keyin the audit subgraph, since the composite-schemas spec has no implicit reference resolution (Federation's implicit_entitiesresolver becomes an explicit@lookup).@requires(fields:)becomes argument-level@require(field:)(includingpath<ConcreteType>.fieldtype conditions), and@override(from:)uses the helper's uppercase schema names.@requires, parent entity calls, and object-to-union widening at merge). Each quotes its blocker and asserts the intendedIsSuccess, 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.