Fix alert context import regression
+ + +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
+-
+
- Removed the second duplicate
fetchAlertContextByTraceIdimport fromservices/api/src/index.ts.
+ - Left the alert-context implementation and route behavior unchanged. +
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
+-
+
- Ran
bun test apps/web/app/terminal.test.ts packages/storage/tests/alerts.test.ts services/api/tests/alert-context.test.tsand all 75 tests passed.
+ - Ran
bunx tsc --noEmit -p services/api/tsconfig.json. The duplicate import no longer appears as an error, but the repo still has unrelated pre-existing TypeScript failures in other packages and modules.
+
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. +
+