Repository navigation
[TST-E7] test: Tools test helpers, fixtures and mirrored tests live in the slice that uses them - #406
Merged
Merged
Conversation
…ce that uses them
The moved Tools helpers' consumers import their slice's Support namespace, so 23 using-header pairs re-pair and 17 old ones go. Each is a header clone; the ignore-using change removes them.
Collaborator
Author
|
Correction to this PR's description: it says the baseline delta was derived from empty-set regenerations "because |
20 of 39 tasks
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 applies the slice-home rule to
OpenCode.Sdk.Tools.Tests, the second half of #402. Helpers and embedded fixtures move into the slice whose code uses them, and the mirror-misplaced tests move to their subject's path. It is moves only: no test body, assertion or helper behaviour changes.78d47a16by its code consumers only. A helper stays in the rootSupport/when more than one slice uses it.mirror.txtlisted move to their subject's path withInternaldropped, somirror.txtgoes from 14 rows to 0.Support/Testsself-tests sit beside their subjects.EmbeddedResourcekeeps its oldLogicalName(OpenCode.Sdk.Tools.Tests.Fixtures.<old path with dots>) and is included exactly once. CopiedNoneinputs (spec, profile, curation, SDK source) do not move.usingdirectives;OwnershipPlanData.Models(...)qualifications against the newBinding.Modelsnamespace;mirror.txt,collapsed-assertions.txt,file-size.txt);.csprojresource items;testing-style.md§1 slice sentence, which now covers SDK.Tests and Tools.Tests and names Tools' one deliberate root hold: the Roslyn compiler helpers,GeneratedSourceCompilerand its closure.ModelPlacementFixturestays in the rootSupport/: its extension methods already had consumers in several slices.RefreshScenarioDatastays in the rootSupport/: a newerCommandsconsumer uses it.TestRosterScenarioandTrxContentmove with the roster test toCommands/Support/. Their only code consumer isCommands/VerifyTestRosterCommandTests.cs, which this PR moves there; the plan had left them inTestRoster/Support/.Part of TST-E7 (step 3b). Related: #403 records a cross-slice helper that predates this PR and is outside its inventory (
Generator/Refresh/Support/RefreshScenario, also used byCommands).🔄 Type of Change
🎯 Protocol & API Surface
external/,spec/orsrc/was touched🧪 Testing
Clone baseline. The second commit carries only this PR's own tests-baseline delta: 23 using-header fingerprints added and 17 removed, re-paired because the moved files'
usingblocks now pair differently. There are no count changes, and no method-body pair is baselined.The delta was derived from empty-set regenerations (
quality-gates.md), because--update-baselinemerges into the existing file:78d47a16has 811 live fingerprints, and this head has 817;Rebase. This branch was rebased onto #402's merge. The
testing-style.md§1 conflict was merged hunk by hunk. Consumers of the moved helpers were re-checked on the new base: #398 and #404 added two Tools consumers (EmitterPlanFixture,EmitterSnapshot), both in their helper's ownGenerator/Emissionslice, so no home changed.Review. A fresh read-only review re-checked:
MirrorGuard;LogicalName;It raised two defects. The roster helpers are moved in this head. The §1 sentence's overclaim is fixed: the compiler-closure exception is named, and the pre-existing
RefreshScenariocase is #403.✅ Completion Gate
Local check (
quality-gates.md) on head7c8753b8, base78d47a16. 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 newOpenCode.Sdk.Tools.Tests(all but NativeAot): 1794, 0 failedOpenCode.Sdk.Tests(all but ServiceElection/NativeAot): 8203, 0 failed. Its first attempt stopped at discovery because this worktree's pinned server was not yet installed; afterbun installinexternal/opencode, it ran without a rebuild.The run shared the host with a dispatched worker's read-only phase; no step needed a re-run because of it.
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
Need help on this PR? Tag
@codesmith-botwith what you need.