2.6 KiB
2.6 KiB
Tasks — Migrate @suaveplan/health-check to genesis
0. Pre-flight (non-negotiable)
- 0.1
git statusclean inside.claude/worktrees/agent-ae4f1a1bd61f6b11d - 0.2 Account for every worktree returned by
git worktree list(this agent's worktree + main checkout + other live agent) - 0.3
git merge-base --is-ancestor 5942a30eeb82f16a92479e34d04c1c6d4513f041 HEADreports true aftergit fetch /home/paul/web/genesis genesis && git merge FETCH_HEAD --no-edit
1. Spec authoring
- 1.1 Read upstream
/mnt/s/web/suaveplan/packages/server/health-check/end-to-end - 1.2 Read
openspec/AGENTS.mdSections 13 and 14 - 1.3 Draft
proposal.mdwith## Source mappingtable - 1.4 Draft
specs/health-check/spec.mdwith## ADDED Requirements+**Verified by:**lines
2. Implementation
- 2.1
src/types/— shared types incl.HealthEventMap,TcpConnectFn,TcpSocketLike, injectable fetch/connect on configs - 2.2
src/error-codes/—HEALTH_CHECK_CODES+ public-ctorHealthCheckError - 2.3
src/telemetry/— OTel meter (counter + counter + histogram) - 2.4
src/health-checker/—HealthCheckerwith injectableClock/TimersLike/LoggerLike+EventBus<HealthEventMap> - 2.5
src/http-check/—createHttpCheckwith injectablefetchImpl - 2.6
src/tcp-check/—createTcpCheckwith injectableTcpConnectFn - 2.7
src/response-builder/—ResponseBuildermapping statuses to HTTP codes - 2.8
src/index.ts— explicit named re-exports only
3. Tests
- 3.1 Unit tests co-located at
src/<feature>/<feature>.test.ts - 3.2 100/100/100/100 coverage gate met (istanbul)
- 3.3 Every
it(...)carries{ timeout: 5000 } - 3.4 All tests import from
@suaveplan/testing/runner
4. Documentation
- 4.1 Sibling
.mdfor every non-exempt implementation file (≥200 words, six sections) - 4.2 Root
README.mdwith module list + install + usage
5. Verification
- 5.1
bunx turbo lint typecheck test --filter=@suaveplan/health-checkgreen - 5.2
bunx turbo test:coverage --filter=@suaveplan/health-check≥ 100/100/100/100 - 5.3
bunx turbo build --filter=@suaveplan/health-checkgreen - 5.4
grep -rnE "from ['\"](vitest|bun:test)['\"]" packages/observability/monitor/health-check/src/empty - 5.5
grep -rn "biome-ignore\|TODO\|FIXME\|XXX" packages/observability/monitor/health-check/src/empty - 5.6
bun scripts/lint/check-feature-layout.ts | grep health-checkempty - 5.7
bun scripts/folder-reorg/generate-manifest.tsrefreshedMANIFEST.md