Skip to content

Unity 6.5 EditMode: 14 pre-existing test failures (triage, none caused by EntityId rename) #1

Description

@Scaler0222

Background

Forking branch: unity6-compat.
Embedded copy in downstream project: Packages/com.besty.unity-skills/ at host project commit 5f81301 ("Embed local Unity 6.5 compat fork").

After migrating the package to Unity 6000.5.0b8 (the InstanceID -> EntityId rename across 33 files), 110 / 124 internal EditMode tests pass. The remaining 14 are pre-existing upstream defects or test fixture issues — none are caused by the EntityId rename. The Forge production baseline (761 tests) is unaffected.

Filing this so the work isn't lost if the package is ever re-pulled. Full triage doc is in the downstream project at Packages/com.besty.unity-skills/UNITY6_TEST_TRIAGE.md and reproduced below.

Test-suite numbers

Suite Total Pass Fail
UnitySkills.Tests.Editor.dll 124 110 14

Source of truth: TestResults/EditMode-results.xml (run 2026-05-28; retries=3, all retry attempts failed).

Failures (a) — test fixture / env (2)

Same root cause for both: the test saves a .unity file under Assets/CodexTemp/RealValidation/ but the fixture never creates that folder. Unity emits Parent directory must exist before creating asset and EditorSceneManager.SaveScene returns false.

  1. PerceptionSkillsTests.SceneDiff_SnapshotOnlyIncludesActiveSceneObjectsTests/Editor/Core/PerceptionSkillsTests.cs:249
  2. TestInfrastructureTests.TestRun_WhenAnotherRunIsActive_ReturnsErrorInsteadOfStartingConcurrentRunnerTests/Editor/Core/TestInfrastructureTests.cs:85

Fix recipe

Add to the [SetUp] of each fixture (the pattern already exists in SelectionDrivenSkillTests.cs:22-25):

if (!AssetDatabase.IsValidFolder("Assets/CodexTemp"))
    AssetDatabase.CreateFolder("Assets", "CodexTemp");
if (!AssetDatabase.IsValidFolder("Assets/CodexTemp/RealValidation"))
    AssetDatabase.CreateFolder("Assets/CodexTemp", "RealValidation");

Failures (b) — upstream code <-> test drift (9)

SkillsModeManager never-list removal — 3 tests still expect old behavior

Editor/Skills/SkillsModeManager.cs:89-94 documents that the historical _explicitNeverList (scene_clear / scene_new / batch_apply) was removed in v1.9.x, because metadata flags now cover the 75 forbidden skills.

But three tests still call MakeSkill("scene_clear") with default op=Modify, risk="low" and assert Forbidden:

  1. SkillsModeManagerTests.CheckAccess_ApprovalMode_NeverInSemiSkill_ForbiddenSkillsModeManagerTests.cs:312-314"Expected: Forbidden / But was: NeedsGrant"
  2. SkillsModeManagerTests.IsForbiddenInSemi_CoversAllAutoJudgementBranchesSkillsModeManagerTests.cs:405-407"Names in the explicit never list must be forbidden / Expected: True / But was: False"
  3. SkillsModeManagerTests.Allowlist_OverridesForbiddenInSemi_HighRiskSkillAllowedSkillsModeManagerTests.cs:523-524"Expected: Forbidden / But was: NeedsGrant"

Fix: rewrite each MakeSkill("scene_clear") to a forbidden-by-metadata flavour (e.g. MakeSkill("del", op: SkillOperation.Delete)) — or drop the now-dead never-list coverage.

CurrentMode fresh-install default — code says Auto, test says Approval

  1. SkillsModeManagerTests.CurrentMode_FreshInstall_NoKeys_DefaultsToApprovalSkillsModeManagerTests.cs:475"Expected: Approval / But was: Auto"

SkillsModeManager.cs:143 returns SkillsOperatingMode.Auto on fresh install. The test (and its #17 matrix label) expects Approval. Pick one: either the code regressed the default (revert line 143 to Approval) or the test is stale.

SkillRouter no longer emits unknownParams field

  1. SkillValidationTests.Execute_WithUnknownTransformParameters_ReturnsStructuredErrorAndSuggestionsSkillValidationTests.cs:19"Expected: not null / But was: null"
  2. SkillValidationTests.Execute_WithUnknownShaderParameter_SuggestsCanonicalParameterSkillValidationTests.cs:35"Expected: not null / But was: null"

Both expect a top-level unknownParams JArray in the error envelope. That field is now absent. Either re-add it to the envelope or migrate the tests to the new shape.

SKILL.md <-> code drift (one test, many findings)

  1. SkillDocumentationConsistencyTests.SkillDocumentation_ShouldMatchCodeDefinitionsSkillDocumentationConsistencyTests.cs:70

Concrete drift:

  • 6 packages missing schema-first Exact Signatures block: addressables-design, dotween, dotween-design, netcode-design, unitask-design, yooasset-design.
  • ~25 extra dotween_pro_add_animation.* / dotween_pro_stagger_animations.* params documented but not in the signatures.
  • dotween_pro_batch_add_animation.dotween_pro_add_animation extra param.
  • job_status.recentCount extra param.

Fix: regenerate the listed SKILL.md files from current code, or add the missing Exact Signatures: blocks. Runtime is unaffected.

Test-isolation defect — discovery cache leaks across tests

  1. TestInfrastructureTests.TestList_WhenNoCachedDiscoveryExists_StartsAsyncDiscoveryTestInfrastructureTests.cs:240"Expected: False / But was: True"

The test asserts TestSkills.TestList() returns success=false when no cache exists, but the cache is populated by sibling tests / a previous CLI test pass. Need a [SetUp] that wipes the discovery cache (or a dedicated reset hook in BatchPersistence).

Failures (c) — Unity 6.5 / URP 17.5 regressions to verify (4)

SmartReplaceObjects returns "error"

  1. SelectionDrivenSkillTests.SmartReplaceObjects_ReplacesSelectedObjectsWithPrefabSelectionDrivenSkillTests.cs:132

The router envelope status is "error", so SmartReplaceObjects returned one of:

  • "Prefab not found: ..."AssetDatabase.LoadAssetAtPath<GameObject>(prefabPath) returned null. Likely a Unity 6.5 timing change around PrefabUtility.SaveAsPrefabAsset — the test destroys the source GO immediately after saving and never calls AssetDatabase.Refresh().
  • "No objects selected"Selection.gameObjects was empty.

Editor/Skills/SmartSkills.cs:516-537 does NOT use any renamed API. Candidate test-side repair: add AssetDatabase.Refresh(); AssetDatabase.SaveAssets(); after PrefabUtility.SaveAsPrefabAsset.

Shader Graph node / sub-graph operations fail on URP 17.5

The "is Shader Graph installed?" probe passes (URP 17.5 ships SG), so the tests don't Assert.Pass — they reach the actual operations and fail there.

  1. ShaderGraphNodeEditingTests.ShaderGraphNodeEditing_WorksOnGraph — fails at ShaderGraphAddNode("Vector1Node", …)ShaderGraphNodeEditingTests.cs:87
  2. ShaderGraphNodeEditingTests.ShaderGraphNodeEditing_WorksOnSubGraph_AndRejectsInvalidOperations — fails at ShaderGraphCreateSubGraph(...)ShaderGraphNodeEditingTests.cs:120
  3. ShaderGraphSkillsTests.ShaderGraphConstrainedEditing_WorksWhenPackageInstalled — fails at ShaderGraphCreateSubGraph(...)ShaderGraphSkillsTests.cs:69

The sibling ShaderGraphCreateGraph_WorksWithTemplateOrBlankFallback does pass, so blank-graph creation still works. Three of the four failures involve sub-graph creation or node addition specifically — likely a Unity 6.5 + URP 17.5 internal API change inside Editor/Skills/ShaderGraphSkills.cs.

Out of scope for this issue

The InstanceID -> EntityId rename itself (33 files) — that lives in the downstream project as commit 5f81301 and is not the cause of any failure here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions