refactor: migrate test files to proper packages#834
Merged
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- structural.js: compliance badges on matrix sections - operators.js: hover tooltips on operator syntax - progression.js: side-by-side tier broadening visualization - decomposition.js: heuristic decomposition suggestions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds to the matrixng viewer: - View selector ribbon with 4 toggleable overlay views - Structural compliance overlay (pass/fail badges on matrix sections) - Operator hover tooltips (syntax, example, engine from reference files) - Tier progression visualization (side-by-side with precision tags) - Decomposition suggestions (heuristic analysis cards) - Token-level comment anchoring (select text within cells) - --previous flag for iteration diff comparison - Full engine reference parser (reads references/engines/*.md) 22 tests passing, 816 assertions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Plan to redistribute 63 CLI test files across Core (9), SDK (28), KG (2), keeping 23 in CLI and deleting 1 spike test. Includes duplicate resolution strategy for 5 overlapping files, mock.module handling, AgentResolver mock creation, and content/ fixture path adjustment procedures. Baselines: Core 10 pass, SDK 381 pass, KG 127 pass, CLI 1557 pass / 10 fail. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5 phases: resolve duplicates, move 9 to Core, move 28 to SDK, move 2 to KG, cleanup. Includes mock.module strategy, AgentResolver mock utility, fixture path handling. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Delete SDK manager.test.ts (12 tests) — CLI version wins (25 tests) - Delete CLI pagination.test.ts (17 tests) — SDK version wins (17 tests) - Delete SDK types.test.ts (12 tests) — CLI version wins (52 tests) - Delete SDK registry.test.ts (3 tests) — CLI version wins (59 tests) - github.test.ts: different scope, both kept (CLI→Core later, SDK stays) CLI winners will be moved to SDK in Phase 3d. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move tests for core utilities (git, github, hash, uuid, symlink, source-parser, types, file-io) from packages/cli/test/ to packages/core/test/. All imports already use @agents/core/* paths so no import rewrites needed. Core: 10 → 203 pass (1 github integration timeout) CLI: 1540 → 1355 pass (1 pre-existing fail) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Phase 3a: 10 catalog tests → sdk/test/catalog/
Phase 3b: 5 skill tests (no AgentResolver) → sdk/test/context/skill/
and sdk/test/providers/local/skill/
(skill-commands.test.ts stays in CLI — CLI command dependency)
Phase 3c: 6 skill tests (with AgentResolver) → sdk/test/providers/local/skill/
Created mock-resolver.ts to replace createCliAgentResolver
Phase 3d: 11 remaining tests → sdk/test/{context,providers,catalog,ui}/
Split registry.test.ts: 4 CLI command tests stay in CLI
Import rewrites:
- WORKTREE/REPO_ROOT depth adjusted for new locations
- createCliAgentResolver → createMockResolver (5 files)
- Removed 4 CLI-specific registry command tests from SDK copy
SDK: 354 → 1082 pass (52 files)
CLI: 1355 → 628 pass (22 files)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move degradation.test.ts to packages/kg/test/ — tests KG embedder and meilisearch health checks plus hybrid search degradation. kg-commands.test.ts stays in CLI — imports CLI command module directly. Added @agents/sdk as KG devDependency (degradation test imports hybridSearch from @agents/sdk/catalog/search). KG: 127 → 144 pass (4 files) CLI: 628 → 611 pass (21 files) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Delete graph-spike.test.ts (exploratory spike, not maintained). Final test counts: Core: 203 pass, 1 fail (github integration timeout), 10 files SDK: 1082 pass, 0 fail, 52 files KG: 144 pass, 0 fail, 4 files CLI: 606 pass, 0 fail, 20 files Total: 2035 pass, 86 files No cross-package @agents/cli imports in SDK/Core/KG tests. Duplicate file names are expected (different scope). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Phase 1: Resolve 5 duplicate pairs (CLI wins 3, SDK wins 1, keep both 1) Phase 2: Move 9 tests to @agents/core (git, github, hash, uuid, etc.) Phase 3: Move 27 tests to @agents/sdk (catalog, skill, manifest, etc.) Phase 4: Move 1 test to @agents/kg (degradation) Phase 5: Cleanup — delete graph-spike.test.ts Test distribution now reflects package ownership: Core: 203 pass / 1 fail (github timeout) SDK: 1082 pass / 0 fail KG: 144 pass / 0 fail CLI: 606 pass / 0 fail Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
Move 40 test files from
packages/cli/test/to their proper packages:Test distribution after
Test plan
bun test --cwd packages/{core,sdk,kg,cli}🤖 Generated with Claude Code