docs(audit): mark predictive typing cleanup

What changed:
- Marked W4 predictive analytics typing cleanup complete.
- Recorded commit 021f053 and the workspace warning delta.

Warning impact:
- Documentation only; records 189 -> 184 warnings from 021f053.

Verification:
- pnpm --filter @lysnrai/platform-service build
- pnpm --filter @lysnrai/platform-service test
- pnpm --filter @lysnrai/platform-service exec eslint . --ext .ts,.tsx
- pnpm lint
This commit is contained in:
Saravana Achu Mac 2026-05-04 16:00:46 -07:00
parent 04d239848e
commit e8d762a6eb

View File

@ -307,13 +307,26 @@ why the call is not runtime service code.
Goal: remove production `any`s from
`services/platform-service/src/modules/predictive-analytics/campaign-engine.ts`.
- [ ] Read `campaign-engine.ts` end-to-end before editing.
- [ ] Identify the domain shapes behind the 5 `any` uses.
- [ ] Prefer local interfaces or Zod-inferred types over broad casts.
- [ ] Add or update tests for campaign generation branches touched by types.
- [ ] Avoid changing campaign selection/scoring behavior unless a bug is found.
- [ ] Run predictive analytics tests.
- [ ] Run platform-service build/test/lint gates.
- [x] Read `campaign-engine.ts` end-to-end before editing. Done in `021f053`;
warning delta `-5`; verified with platform-service build/test/lint and
workspace lint.
- [x] Identify the domain shapes behind the 5 `any` uses. Done in `021f053`;
event payload shapes already exist in `@bytelyst/events`.
- [x] Prefer local interfaces or Zod-inferred types over broad casts. Done in
`021f053`; replaced event-bus `any` casts with typed `bus.emit` calls.
- [x] Add or update tests for campaign generation branches touched by types.
Done in `021f053`; no behavior branch changed, existing predictive
analytics tests cover the module gate.
- [x] Avoid changing campaign selection/scoring behavior unless a bug is found.
Done in `021f053`; preserved fire-and-forget event dispatch with
`void bus.emit(...)`.
- [x] Run predictive analytics tests. Done in `021f053`; verified by
`pnpm --filter @lysnrai/platform-service test`.
- [x] Run platform-service build/test/lint gates. Done in `021f053`; verified
with `pnpm --filter @lysnrai/platform-service build`,
`pnpm --filter @lysnrai/platform-service test`,
`pnpm --filter @lysnrai/platform-service exec eslint . --ext .ts,.tsx`,
and `pnpm lint`.
Suggested split: do this as one commit if all 5 `any`s share one domain shape;
otherwise split by function/section and update this checklist after each commit.
@ -441,10 +454,11 @@ Goal: keep future agents aligned with the true baseline.
## Progress Log
| Date | Commit | Change | Warning impact |
| ---------- | --------- | ---------------------------------------------- | ------------------------------------------ |
| 2026-05-04 | `4690072` | Typed `@bytelyst/api-client` header merging. | Removed 1 `no-explicit-any` warning. |
| 2026-05-04 | `afe7d88` | Typed `@bytelyst/monitoring` fetch test mocks. | Removed 6 `no-explicit-any` warnings. |
| 2026-05-04 | `b6da94d` | Typed tracker-web proxy test request helper. | Removed 1 `no-explicit-any` warning. |
| 2026-05-04 | `9625999` | Removed stale platform-service lint disables. | Removed 2 stale-disable warnings. |
| 2026-05-04 | `6978ddb` | Typed cowork-service test doubles. | Removed cowork-service test `any` cluster. |
| Date | Commit | Change | Warning impact |
| ---------- | --------- | ---------------------------------------------- | -------------------------------------------------------------------- |
| 2026-05-04 | `4690072` | Typed `@bytelyst/api-client` header merging. | Removed 1 `no-explicit-any` warning. |
| 2026-05-04 | `afe7d88` | Typed `@bytelyst/monitoring` fetch test mocks. | Removed 6 `no-explicit-any` warnings. |
| 2026-05-04 | `b6da94d` | Typed tracker-web proxy test request helper. | Removed 1 `no-explicit-any` warning. |
| 2026-05-04 | `9625999` | Removed stale platform-service lint disables. | Removed 2 stale-disable warnings. |
| 2026-05-04 | `6978ddb` | Typed cowork-service test doubles. | Removed cowork-service test `any` cluster. |
| 2026-05-04 | `021f053` | Typed predictive campaign event dispatch. | Removed 5 `no-explicit-any` warnings; workspace lint `189` -> `184`. |