Fix alert context import regression

Completed 2026-05-18 09:02:28 EDT

Summary

A recent alert-context merge left services/api/src/index.ts importing fetchAlertContextByTraceId twice from @islandflow/storage. This change removes the duplicate import so the API entrypoint no longer carries that merge regression.

Changes Made

Context

This bug scan reviewed commits since the previous automation run on 2026-05-17. The regression appears in the alert-context work that landed shortly after c0b5b6d and remains present on the current tip.

Important Implementation Details

The fix is intentionally minimal because the failure mode came from import duplication, not from the runtime logic itself.

import {
  fetchAlertsAfter,
  fetchAlertsBefore,
  fetchAlertContextByTraceId,
  fetchClassifierHitsAfter,
  ...
  fetchFlowPacketsAfter,
  fetchFlowPacketById,
  fetchFlowPacketsByMemberTraceIds,
  ...
} from "@islandflow/storage";

Expected Impact for End-Users

End-users should see no behavior change in the alert drawer itself. The benefit is operational: the API source no longer contains this compile-time regression, which lowers the chance of broken startup or validation around the new alert-context feature.

Validation

Issues, Limitations, and Mitigations

The broader API TypeScript check is not clean yet. Remaining failures include unrelated issues in packages/bus, packages/config, packages/storage, services/api/src/live.ts, and other API type call sites. They are outside the scope of this minimal regression fix, so they were not changed here.

Follow-up Work

No new follow-up issue was created for this patch beyond the Beads bug used to track this fix. If the team wants a clean API typecheck gate, the remaining TypeScript failures should be triaged separately.