Skip to content

fix(backend): document conventions and repair CI route wiring - #284

Merged
Tybravo merged 2 commits into
SwiftChainn:mainfrom
lewistemple22:fix/backend-issues-207-210
Oct 4, 2026
Merged

Tybravo merged 2 commits into
SwiftChainn:mainfrom
lewistemple22:fix/backend-issues-207-210

Conversation

@lewistemple22

Copy link
Copy Markdown
Contributor

Overview

This PR addresses the four assigned backend issues as one focused maintenance change. It documents
the CI pipeline and code-naming rules, prevents new parallel service/controller/model stacks, and
adds regression coverage for the indexer and admin DLQ route wiring. The existing upstream fixes
for the removed webSocketService import and the dlqController import are preserved and covered
without duplicating them.

Related Issues

Closes #207
Closes #208
Closes #209
Closes #210

Changes

Issue 1 — #207: Document the CI/CD pipeline

  • Added docs/ci-pipeline.md with a contributor checklist at the top.
  • Documented the exact pnpm stages, Node.js 22.x and MongoDB 6.0 versions, local TypeScript check,
    MongoDB/JWT test setup, lcov artifact/comment behavior, coverage thresholds, and pnpm lockfile
    requirement.

Issue 2 — #208: Document repository naming conventions

  • Added docs/code-conventions.md covering layering, file names, exports, canonical camelCase DI
    tokens, and legacy-stack handling.
  • Added deprecation banners to the retained legacy delivery service, controllers, model, and socket
    initializer. The former src/services/escrowService.ts is already removed; the document records
    src/services/escrow.service.ts as the only canonical replacement.
  • Updated the DI container to register the canonical delivery.service.ts implementation.
  • Added a pull-request-template checklist item linking the conventions document.
  • Removed the duplicate env import in the legacy socket initializer while documenting its
    deprecation.

Issue 3 — #209: Remove the broken indexer websocket import

  • Confirmed src/services/webSocketService.ts does not exist and no webSocketService reference
    remains in indexerService.ts.
  • Added tests/indexerService.test.ts to ensure the indexer service module loads without that
    removed dependency.

Issue 4 — #210: Repair admin DLQ route wiring

  • Confirmed adminRoutes.ts imports the named dlqController export and maps the existing
    getDlqEntries and retryDlqEntry methods.
  • Added tests/adminRoutes.test.ts covering both DLQ paths and verifying unauthenticated requests
    receive 401 responses instead of an application startup/reference error.

Verification Results

  • git diff --check — passed.
  • Targeted ESLint on changed TypeScript files — passed with 0 errors; 3 pre-existing warnings for
    any in untouched legacy code.
  • jest tests/adminRoutes.test.ts tests/indexerService.test.ts --runInBand --silent --no-cache —
    passed, 2 suites / 3 tests.
  • pnpm exec tsc --noEmit — not passing on the upstream baseline because of unrelated duplicate
    environment declarations/imports and missing TEST_UNLIMITED_MAX, validateRequest, and other
    existing symbols outside this issue scope.
  • tests/indexer.test.ts — blocked by the same pre-existing TEST_UNLIMITED_MAX runtime error.
  • CI — pending.

Acceptance Criteria

Issue 1 — #207

  • CI stages and exact local commands are documented.
  • lcov coverage comments and failing thresholds are documented.
  • Node.js/MongoDB versions and local matching guidance are documented.
  • Contributor checklist and pnpm lockfile gotcha are documented.
  • PR includes Closes #207 and a work summary.

Issue 2 — #208

  • Canonical naming conventions for services, controllers, repositories, models, and middleware
    are documented.
  • Export and DI token rules are documented.
  • Retained legacy variants have deprecation banners; the removed legacy escrow service is not
    recreated.
  • Canonical delivery service wiring is used by the DI container.
  • The PR template links to the conventions checklist.

Issue 3 — #209

  • The nonexistent webSocketService file was confirmed absent.
  • No invalid webSocketService reference remains in indexerService.ts.
  • An indexer module-wiring regression test passes.
  • Full TypeScript build verification is blocked by unrelated upstream baseline errors documented
    above.

Issue 4 — #210

  • dlqController is imported from ../controllers/dlqController using the verified named
    export.
  • getDlqEntries and retryDlqEntry exist and are mapped to the two admin routes.
  • Both DLQ routes return 401 for unauthenticated requests in the regression test.
  • An authenticated live admin request was not run because the local test environment lacks a
    configured admin account/database fixture.

@drips-wave

drips-wave Bot commented Sep 30, 2026

Copy link
Copy Markdown

@lewistemple22 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Tybravo

Tybravo commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

@lewistemple22

You need to resolve the conflicts as they are too complex to resolve on the web editor

Thanks

@lewistemple22

Copy link
Copy Markdown
Contributor Author

@lewistemple22

You need to resolve the conflicts as they are too complex to resolve on the web editor

Thanks

Done.

@Tybravo

Tybravo commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator

@lewistemple22

Well-done and thanks for the conflict you resolved

@Tybravo
Tybravo merged commit 22b6922 into SwiftChainn:main Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants