Repository navigation
[TST-E3] test: the materialization matrix compiles three source sets instead of eight - #439
Merged
Merged
Conversation
…f eight TST-E3 first half, PRs 4 and 5 together. ModelMaterializationMatrixTests binds its object/DTO scenarios (group B) and its container/promotion scenarios (group C) as one combined document each, so each group's tests request one identical plan and the compiler cache shares one compilation: 8 distinct compilations become 3. Two synthetic operations get collision-free identities (widget.containerList; widget.nullable at /api/widget/nullable); every asserted facet, test name and assertion is unchanged. The tests clone ratchet keeps a minimum headroom: the ceiling is the measurement plus 0.25 points, rounded up to the next 0.5%; at 5.48% it stays 6%.
Blind-Striker
force-pushed
the
test/tst-e3a-matrix
branch
from
October 17, 2026 10:41
ca6fb8e to
0d26015
Compare
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
What does this PR do?
It is the last PR of TST-E3's first half, the Tools.Tests safety net ahead of GEN-E3's binding refactor.
ModelMaterializationMatrixTestsnow compiles three generated-source sets instead of eight.Each scenario used to build, bind and compile its own document. Now each group builds one combined ingested document, selection and curation, and binds it once. Every test in the group requests that identical plan, so the existing
GeneratedSourceCompilercache shares one compilation per group.DataLocationlist.Data, and the promotedDataLocationlist item.Tests select operations by id, never
.Single()over the whole plan.Two synthetic identities change, for the test assembly only:
widget.containerList. Its path/api/widget/listand itsGetWidgetListAsyncname row are kept.Dataoperation becomeswidget.nullableat/api/widget/nullable. Two group-C scenarios both declaredGET /api/widget, and a combined document keeps one operation per path and method, so one would have overwritten the other.No test asserts either path. A facet audit shows every asserted facet unchanged: model and type names, nullability, status arms, the client method names the runtime tests invoke, and payloads.
All 10 test names, runtime payloads, helper assertions and all 134
Assert.Thatsites are unchanged, and every compilation keeps its[ParallelLimiter<RoslynCompilationSlots>]. The file goes from 975 to 925 lines. The compiler,SchemaPresets,PinnedBinding,BindingTestHost,BindingScenarioData,SpecScenarioand the files GEN-E3 is editing are unchanged.The tests clone ratchet keeps a minimum headroom (new rule). The old rule set the ceiling to the measurement rounded up to the next 0.5%. At this PR's 5.48%, that would have dropped the ceiling to 5.5%, leaving 0.02 percentage points of headroom. Every test PR that followed would have gone into a refactor round, whatever its size.
quality-gates.mdnow reads: the ceiling is the measurement plus 0.25 points, rounded up to the next 0.5%, and it only ever falls. Here that gives 5.48 + 0.25 = 5.73, which rounds up to 6%, so the ceiling stays at 6%, and the headroom is 0.52 points. The maintainer delegated this decision to the lead on 2026-10-17. The rule change and its first application land together in this PR. #409 tracks enforcing the ratchet mechanically, and is updated to the new formula.🔄 Type of Change
🎯 Protocol & API Surface
external/,spec/orsrc/was touched🧪 Testing
Compilation count. Each group's content keys were measured with temporary test-side diagnostics in the implementer's worktree, then removed:
Clone baseline. Four entries are removed and none added. Combining group B first created two clones between it and group C's still-separate operation arms. Combining group C then removed them.
How it was built.
Datais a recorded plan amendment, with the facet audit as its condition.verify-clonesand the whole Tools.Tests project under[(Category!=Packaging)&(Category!=NativeAot)]on each worker's committed tree. All exited 0.Review. A fresh read-only review found no defects, out-of-scope changes or notes. It checked all 134 ordered assertions, all nine limiters and every reflection target. It expanded all eleven operation declarations and confirmed only the two authorized identity changes and the route amendment. It confirmed that no asserted facet changes, and that runtime reflection invokes the adapters'
Adapt, not client methods. It also confirmed that group B's zero-PayloadEntriesoracle is still meaningful. It reviewed the earlier 5.5% version; the final head reverts the ceiling values to 6% and changes only the canon sentence, as above.✅ Completion Gate
Local check (
quality-gates.md) on headca6fb8e0(the 5.5% version), base68d8afaf. Every step's own exit code was read:dotnet build --configuration Release: 0 warnings, 0 errorsdotnet format whitespace/dotnet format style --severity warn: no changesverify-clones: passed, 0 new (tests 5.48%)OpenCode.Sdk.Tools.Tests(all but NativeAot): 2005, 0 failedOpenCode.Sdk.Tests(all but ServiceElection/NativeAot): 8390, 0 failedThe final head
0d260152restores the ceiling to 6% inCloneScopes.csand the two test expectations, which now match master, and changes only thequality-gates.mdratchet sentence. On it:CloneDetectorTests,VerifyClonesCommandTestsandCommentResidueScanTestspass, 56 with 0 failed;verify-clonespasses, 0 new, at 5.48% under 6%.The host runs Bun 1.4.3, a maintainer-named off-pin host (
OPENCODE_SDK_TESTS_BUN_MISMATCH=allow); the pin is 1.4.2.✅ Code Quality Checklist