Skip to content

fix(backend): eliminate duplicate type systems (#168) - #210

Merged
devJaja merged 2 commits into
Epta-Node:mainfrom
Clement-coder:fix/issue-168-eliminate-duplicate-types
Jul 29, 2026
Merged

fix(backend): eliminate duplicate type systems (#168)#210
devJaja merged 2 commits into
Epta-Node:mainfrom
Clement-coder:fix/issue-168-eliminate-duplicate-types

Conversation

@Clement-coder

Copy link
Copy Markdown
Contributor

Summary

Closes #168

Resolves the remaining type-system issues after the duplicate files (coordinator/types.ts, coordinator/decompose.ts) were already removed by prior PRs.

Changes

backend/src/agents/registry.ts

Renamed the AgentRegistry class to AgentStartupRegistry to eliminate the naming collision with the AgentRegistry interface in types/agent.ts. These are two distinct concepts:

  • types/agent.ts → look-up interface used by the coordinator to resolve agents by type
  • agents/registry.ts → startup/initialization manager that instantiates and registers agents on boot

No callers import the class by name, so there are no cascading changes.

backend/src/api/middleware/rateLimit.ts

Added explicit : number type annotation to the filter callback parameter to fix a TS7006 implicit-any error that was causing 5 test suites to fail to compile.

Verification

  • npx tsc --noEmit → 0 errors
  • npm test → 14/15 suites pass (1 pre-existing skip), 159/161 tests pass (2 pre-existing skips)
  • npm run build → success

- Rename AgentRegistry class in agents/registry.ts to AgentStartupRegistry
  to eliminate naming collision with the AgentRegistry interface in
  types/agent.ts. The class is a startup/init manager; the interface is
  the coordinator's look-up contract — they are different concepts.

- Add explicit number annotation to rateLimit.ts filter callback to fix
  implicit-any TS error (TS7006).

- Remove lru-cache from package.json (not needed by the simple Map-based
  rateLimit.ts on main).

npx tsc --noEmit: 0 errors
npm test: 14/15 suites pass (1 pre-existing skip)
@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

@Clement-coder is attempting to deploy a commit to the Jaja's projects Team on Vercel.

A member of the Team first needs to authorize it.

@devJaja

devJaja commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

@Clement-coder
Resolve the conflicts, make sure all CI checks passed

@devJaja

devJaja commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

@Clement-coder
Resolve the conflicts

@devJaja
devJaja self-requested a review July 29, 2026 20:47

@devJaja devJaja left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Solid Implementation @Clement-coder

LGTM

@devJaja
devJaja merged commit 8661232 into Epta-Node:main Jul 29, 2026
6 of 7 checks passed
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.

[Backend] Eliminate Duplicate Type Systems and Decompose Implementations Across Codebase

2 participants