Add runtime type checks#1016
Open
simple-agent-manager[bot] wants to merge 7 commits into
Open
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Validation
COUNT 0pnpm typecheckpnpm lint(passes; existing warnings remain)pnpm testpnpm buildStaging Verification (REQUIRED for all code changes — merge-blocking)
pnpm testStaging Verification Evidence
No staging deployment was performed from this session. Local verification completed:
apps/api/src,apps/web/src,packages,scripts,infra, andexperiments:COUNT 0pnpm typecheck: passedpnpm lint: passed with existing warningspnpm test: passedpnpm build: passedUI Compliance Checklist (Required for UI changes)
End-to-End Verification (Required for multi-component changes)
Data Flow Trace
Runtime validation now happens at trust boundaries before typed use: API request/response helpers in
apps/api/src/lib/runtime-validation.ts, web response/storage/WebSocket helpers inapps/web/src/lib/runtime-validation.ts, package helpers inpackages/acp-client/src/runtime-validation.tsandpackages/terminal/src/runtime-validation.ts, plus shared trial event validation inpackages/shared/src/trial.ts.Untested Gaps
No staging/browser manual pass was run. The change is parsing/validation hardening rather than visual UI behavior.
Post-Mortem (Required for bug fix PRs)
N/A: hardening task, not a specific bug fix.
Specialist Review Evidence (Required for agent-authored PRs)
needs-human-reviewlabel added and merge deferred to humanExceptions (If any)
Agent Preflight (Required)
Classification
External References
N/A: using existing repo Valibot/runtime validation patterns.
Codebase Impact Analysis
Affected components include API routes/services/Durable Objects, web/client runtime JSON handling, shared trial events, ACP/terminal package helpers, scripts, infra tests, and experiments.
Documentation & Specs
Task checklist added and completed at
tasks/active/2026-05-15-runtime-type-checks.md.Constitution & Risk Check
Checked Principle XI risk: validation helpers avoid new configurable business values. Main risk was changing permissive fallback behavior at runtime boundaries; full tests were run and schemas were adjusted to validate only the fields consumers actually require.