5.3 KiB
Cross-Repo Automated Test Coverage Bug Report
Generated: 2026-02-15
Scope
bytelyst-trading-bot-servicebytelyst-trading-dashboard-web
This report documents automated test execution results, coverage observations, discovered defects, and the coverage instrumentation baseline added on 2026-02-15.
Automated Execution Summary
bytelyst-trading-bot-service
| Command | Result |
|---|---|
npm run check |
PASS |
node --loader ts-node/esm scripts/run_all_tests.ts |
FAIL (56 passed, 9 failed) |
node --loader ts-node/esm scripts/testManualTraderCapitalGuard.ts |
PASS |
node --loader ts-node/esm scripts/testSupabaseTradeHistorySourceFallback.ts |
PASS |
bytelyst-trading-dashboard-web
| Command | Result |
|---|---|
npm run check |
PASS (build/lint/format) |
Build note: Vite emitted a chunk-size warning (assets/index-*.js > 500 kB threshold).
Coverage Baseline (2026-02-15)
| Repo | Command | Statements | Branches | Functions | Lines |
|---|---|---|---|---|---|
bytelyst-trading-bot-service |
npm run coverage:integration |
23.99% |
40.68% |
33.12% |
23.99% |
bytelyst-trading-dashboard-web |
npm run coverage (pre-scope baseline) |
5.44% |
4.37% |
3.14% |
5.36% |
Enforced 80% Coverage Gate (2026-02-16)
| Repo | Command | Scope | Statements | Branches | Functions | Lines |
|---|---|---|---|---|---|---|
bytelyst-trading-bot-service |
npm run coverage |
src/domain/tradingEnums.ts, src/utils/symbolMapper.ts, src/connectors/factory.ts |
97.87% |
93.02% |
92.30% |
97.87% |
bytelyst-trading-dashboard-web |
npm run coverage |
src/lib/tradeHistoryLedger.ts |
99.06% |
93.43% |
100% |
98.93% |
Coverage Snapshot
bytelyst-trading-bot-service
65TypeScript test scripts undertests/37TypeScript source files undersrc/- Coverage is integration-heavy (Supabase, Alpaca, localhost HTTP) and now has both:
- broad integration snapshot via
npm run coverage:integration - enforced 80% gate for selected critical modules via
npm run coverage
- broad integration snapshot via
- Existing
checkpipeline validates schema/security/lifecycle/order-sync contracts, but does not run the fulltests/folder.
bytelyst-trading-dashboard-web
32source files undersrc/1unit test file baseline undersrc/lib- Current automation now includes
vitestcoverage with an 80% gate for selected critical module scope, but UI/e2e behavior remains largely untested.
Bugs Found by Automated Tests
Failing tests from scripts/run_all_tests.ts
-
check_alerts.ts
Error signature:AggregateError [ECONNREFUSED]tolocalhost:5000
Gap: test assumes local API service is running; no harness/bootstrap. -
debug_db_logging.ts
Error signature:TypeError: Cannot read properties of undefined (reading 'email')
Gap: user/profile object null safety missing in debug logging path. -
final_e2e_param_verification.ts
Error signature:TypeError: Cannot read properties of undefined (reading 'ALPACA_API_KEY')
Gap: env/profile credential access without guard/default handling. -
simple_check.ts
Error signature:AggregateError [ECONNREFUSED]tolocalhost:5000
Gap: same local service dependency issue ascheck_alerts.ts. -
test_alpaca_exhaustive.ts
Error signature:TypeError: symbols.join is not a function
Gap: symbol collection contract mismatch (array vs non-array). -
test_fuzzy_match.ts
Error signature:TypeError: this.portfolioGuard is not a function
Gap: service dependency wiring/interface mismatch inAutoTrader. -
test_safe.ts
Error signature:TypeError: symbols.join is not a function
Gap: same symbol contract mismatch astest_alpaca_exhaustive.ts. -
test_slash.ts
Error signature:TypeError: symbols.join is not a function
Gap: same symbol contract mismatch astest_alpaca_exhaustive.ts. -
verify_realtime.ts
Error signature:TypeError: supabaseService.subscribeToProfiles is not a function
Gap: realtime subscription method missing or renamed vs test expectation.
Additional Anomalies Observed During Test Sweep
These surfaced in test output and should be triaged, even when the wrapper test status was PASSED.
check_alpaca_pos.ts:TypeError: exchange.getPositions is not a functiontest_query.ts:Code: 22P02(invalid UUID input path)test_strategy_logic.ts:TypeError: this.executionManager.getPendingOrders is not a functioncheck_user_schema.tsandverify_profiles_e2e.ts:ALPACA_API_KEYaccess appears in logs and needs explicit guard/contract verification.
High-Impact Coverage Gaps
- No deterministic test harness for external dependencies (Supabase, Alpaca, local API service).
- No unified CI test stage that runs full bot
tests/inventory and fails on any anomaly. - Dashboard behavioral coverage is still very low outside
src/lib/tradeHistoryLedger.tsand needs tab/component-level tests. - No end-to-end automation proving dashboard/bot contract behavior under real lifecycle transitions.
Artifacts
- Bot full suite log:
bytelyst-trading-bot-service/.tmp_run_all_tests.log - Bot check log:
bytelyst-trading-bot-service/.tmp_npm_check.log - Dashboard check log:
bytelyst-trading-dashboard-web/.tmp_npm_check.log