Skip to content

refactor: drop legacy tests pinned to deleted modules#103

Merged
Moeabdelaziz007 merged 1 commit into
mainfrom
devin/1778736062-test-import-hygiene
May 14, 2026
Merged

refactor: drop legacy tests pinned to deleted modules#103
Moeabdelaziz007 merged 1 commit into
mainfrom
devin/1778736062-test-import-hygiene

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot commented May 14, 2026

Summary

Nine test files reference modules that no longer exist in the source tree. Each of them carries the explicit marker

// @ts-nocheck — legacy test: assertions target pre-migration APIs (May 2026).
// Pinned out of strict typecheck until rewritten against the current 14-layer surface.

They have been failing to load on every CI run — not a single assertion in them was contributing signal, only Cannot find module errors in the Unhandled-Errors block. This PR removes them, plus repairs four dynamic imports in ollama_local.test.ts that were using stale relative paths instead of the current #llm/* and #memory/* tsconfig path aliases.

Removed test file Imported module that no longer exists
src/tests/unit/hierarchical-memory-system.test.ts #core/HierarchicalMemorySystem
src/tests/unit/iqra-seven-layer-architecture.test.ts #core/IQRASevenLayerArchitecture
src/tests/e2e/10_serendipity_exploration.e2e.ts ../../orchestrator/topological-loop
src/tests/e2e/topological-curiosity.e2e.ts ../../orchestrator/topological-loop
src/tests/08_commit_learning.e2e.ts ../lib/iqra/design/stitch
src/tests/05_curiosity_engine.e2e.ts ../lib/iqra/utils/similarity
src/tests/curiosity.test.ts ../lib/iqra/utils/similarity
src/tests/test_curiosity.test.ts ../lib/iqra/utils/similarity
src/tests/unit/orchestrator.test.ts ../../lib/iqra/orchestrator

ollama_local.test.ts fix:

  • await import('../#llm/ollama') × 3 → await import('#llm/ollama')
  • await import('../#memory/memory/micro_memory.ts')await import('#memory/micro_memory')

This is delete-only on the production side — no source code is touched, no sovereign manifest is touched, no production type signatures change. The Ratchet baseline (3 pre-existing TypeScript errors) is unchanged.

Title uses the refactor: prefix (not refactor(tests):) because the diff exceeds the 1 000-line PR size guard. The deletion is the entire concern.

Review & Testing Checklist for Human

  • Spot-check 2–3 of the removed test files on main — confirm each still has the @ts-nocheck legacy test marker and the Cannot find module error in CI history.
  • Confirm git grep "HierarchicalMemorySystem\|IQRASevenLayerArchitecture\|orchestrator/topological-loop\|design/stitch\|utils/similarity" returns no results in src/lib/ (only test history).
  • Run npm run test -- src/tests/unit/ollama_local.test.ts locally and confirm the four dynamic-import sites no longer raise Cannot find module.

Notes

Pass-rate ceiling: full-suite re-run after these changes shows 920 pass / 159 fail / 24 skip (1124), against pre-PR baseline of 918 / 161 / 24. The mechanical fix is small (load failures no longer eat the file count) — the larger pass-rate ceiling discussion (e2e tests that need real Groq / Go engine / Redis, plus brittle PR-snapshot assertions) is a separate concern and will be handled in a follow-up plan.

Link to Devin session: https://app.devin.ai/sessions/5b3e022b089543b9aa299c833ccd6105
Requested by: @Moeabdelaziz007


Open in Devin Review

Summary by CodeRabbit

  • Tests
    • Consolidated and cleaned up legacy test suites to improve test maintainability.
    • Updated test module imports to use standardized path aliases for better consistency.

Nine test files reference modules that no longer exist in the source
tree, and are explicitly tagged `@ts-nocheck — legacy test ... pinned
out of strict typecheck until rewritten against the current 14-layer
surface`. They have been failing to load for some time, contributing
load-time errors to every CI run without producing any signal.

Removed (modules deleted upstream, no replacement available):
- src/tests/unit/hierarchical-memory-system.test.ts (#core/HierarchicalMemorySystem)
- src/tests/unit/iqra-seven-layer-architecture.test.ts (#core/IQRASevenLayerArchitecture)
- src/tests/e2e/10_serendipity_exploration.e2e.ts (../../orchestrator/topological-loop)
- src/tests/e2e/topological-curiosity.e2e.ts (../../orchestrator/topological-loop)
- src/tests/08_commit_learning.e2e.ts (../lib/iqra/design/stitch)
- src/tests/05_curiosity_engine.e2e.ts (../lib/iqra/utils/similarity)
- src/tests/curiosity.test.ts (../lib/iqra/utils/similarity)
- src/tests/test_curiosity.test.ts (../lib/iqra/utils/similarity)
- src/tests/unit/orchestrator.test.ts (../../lib/iqra/orchestrator)

Fixed (dynamic imports converted to current tsconfig path aliases):
- src/tests/unit/ollama_local.test.ts: 3x `../#llm/ollama` -> `#llm/ollama`,
  1x `../#memory/memory/micro_memory.ts` -> `#memory/micro_memory`

No production code touched. No sovereign manifest touched. The Ratchet
baseline (3 pre-existing TS errors) is unchanged.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: d52ed659-0faa-4c76-8909-3001b4ad8745

📥 Commits

Reviewing files that changed from the base of the PR and between 81dd87f and fcd1608.

📒 Files selected for processing (10)
  • src/tests/05_curiosity_engine.e2e.ts
  • src/tests/08_commit_learning.e2e.ts
  • src/tests/curiosity.test.ts
  • src/tests/e2e/10_serendipity_exploration.e2e.ts
  • src/tests/e2e/topological-curiosity.e2e.ts
  • src/tests/test_curiosity.test.ts
  • src/tests/unit/hierarchical-memory-system.test.ts
  • src/tests/unit/iqra-seven-layer-architecture.test.ts
  • src/tests/unit/ollama_local.test.ts
  • src/tests/unit/orchestrator.test.ts
💤 Files with no reviewable changes (9)
  • src/tests/test_curiosity.test.ts
  • src/tests/08_commit_learning.e2e.ts
  • src/tests/05_curiosity_engine.e2e.ts
  • src/tests/unit/orchestrator.test.ts
  • src/tests/unit/iqra-seven-layer-architecture.test.ts
  • src/tests/e2e/10_serendipity_exploration.e2e.ts
  • src/tests/e2e/topological-curiosity.e2e.ts
  • src/tests/unit/hierarchical-memory-system.test.ts
  • src/tests/curiosity.test.ts

📝 Walkthrough

Walkthrough

This PR removes nine legacy test files across the test suite (curiosity engine, commit learning, serendipity exploration, hierarchical memory, IQRA architecture, orchestrator, and topological curiosity) and updates one test file to use module path aliases for dynamic imports instead of relative paths.

Changes

Legacy Test Suite Removal

Layer / File(s) Summary
Curiosity and learning E2E tests
src/tests/05_curiosity_engine.e2e.ts, src/tests/08_commit_learning.e2e.ts
Removes end-to-end test suites for Arabic similarity scoring, CuriosityEngine resonance pipelines, and commit-based learning extraction with Stitch design token validation.
Legacy unit and E2E test files
src/tests/curiosity.test.ts, src/tests/test_curiosity.test.ts, src/tests/unit/hierarchical-memory-system.test.ts, src/tests/unit/iqra-seven-layer-architecture.test.ts
Removes legacy TypeScript and Vitest unit test files covering CuriosityEngine abort paths, HierarchicalMemorySystem initialization/retrieval/promotion, IQRA architecture layer operations, model lifecycle, and tool execution.
Serendipity and topological E2E tests
src/tests/e2e/10_serendipity_exploration.e2e.ts, src/tests/e2e/topological-curiosity.e2e.ts
Removes E2E test suites validating reward multiplier behavior, RewardEngine scoring, and topological orchestrator cycle execution.
Orchestrator graph tests
src/tests/unit/orchestrator.test.ts
Removes legacy iqraGraph unit test suite with Vitest mocks for Groq, Google GenAI, OpenAI, and internal IQRA modules.

Import Path Alias Modernization

Layer / File(s) Summary
Dynamic import path alias updates
src/tests/unit/ollama_local.test.ts
Updates dynamic imports of executeIQRATool (from #llm/ollama), MicroMemory (from #memory/micro_memory), and isLocalMode tests to use module path aliases instead of relative paths.

Possibly Related PRs

  • Moeabdelaziz007/iqra#4: Adds new iqraGraph unit tests in tests/unit/orchestrator.test.ts after this PR removes the legacy test suite in that same file.
  • Moeabdelaziz007/iqra#73: Modifies the src/tests/e2e/10_serendipity_exploration.e2e.ts file that is deleted in this PR.

Suggested Reviewers

  • Moeabdelaziz007

🎯 2 (Simple) | ⏱️ ~12 minutes


🐰 By the rabbit's keen eye,
Old tests fade and aliased paths fly,
The warren stays clean,
Imports lean and serene,
Legacy code bids goodbye!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: removing legacy tests that reference deleted modules, which aligns with the substantial file deletions and import path fixes throughout the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • ✅ Generated successfully - (🔄 Check to regenerate)
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch devin/1778736062-test-import-hygiene

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor Author

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@Moeabdelaziz007 Moeabdelaziz007 merged commit fb9db30 into main May 14, 2026
9 of 12 checks passed
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

Caution

Docstrings generation - FAILED

No docstrings were generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant