fix(types): validate persisted session SQL results - #1741
Conversation
Terraform Validation Results
Pushed by: @open-inspect[bot], Action: |
Terraform Validation Results
Pushed by: @ColeMurray, Action: |
ColeMurray
left a comment
There was a problem hiding this comment.
Reviewed exact head d090ea6, all changed files, persisted row schemas, SQL counts, admission/projection callers, alarm recovery/retry contracts, and all discussion. The follow-up ensures projection validation failures cannot abort lifecycle cleanup: recovery runs before the original error is rethrown, retaining retry and malformed-row evidence. Validation remains needed and compatible with current main. Shared build, full control-plane typecheck, lint/format, 108 unit tests and 12 Workerd integration tests passed. Exact-head CI is green with intentional Terraform deployment skips; no actionable comments or remaining blockers.
This is an automated nightly unsafe-cast remediation sweep. It replaces three qualifying persisted-data casts with parse-don't-assert validation at session state boundaries, following the TypeScript Coding Standards guidance for unsafe casts and the Zod boundary-validation pattern established in PR #807.
packages/control-plane/src/session/terminal-message-projection-store.ts:58toArray() as PendingRow[]for persisted terminal projection statependingRowSchemaplus inlinesafeParseparser before mapping to domain statepackages/control-plane/src/session/message-repository.ts:106result.one() as { count: number }for unfinished prompt countreadRequiredNumberColumninline guard before queue admission uses the valuepackages/control-plane/src/session/message-repository.ts:201.one() as { count: number }for Autofix attempt-limit countreadRequiredNumberColumninline guard before attempt-limit admission uses the valueVerification:
npm run formatnpm run build -w @open-inspect/sharednpm run build -w @open-inspect/control-planenpm run typechecknpm run lintnpm test -w @open-inspect/control-planeNo dependency changes were made.
Created with Open-Inspect