Skip to content

Replace local isRecord guards with Valibot schemas#1416

Open
simple-agent-manager[bot] wants to merge 5 commits into
mainfrom
sam/replace-isrecord-runtime-validation
Open

Replace local isRecord guards with Valibot schemas#1416
simple-agent-manager[bot] wants to merge 5 commits into
mainfrom
sam/replace-isrecord-runtime-validation

Conversation

@simple-agent-manager

Copy link
Copy Markdown
Contributor

Summary

  • Replaced all local isRecord helpers in apps, scripts, and experiments with Valibot schemas or custom Valibot predicates.
  • Added Valibot dependency declarations where these runtime schemas now live.
  • Added a regression test for sync-wrangler-config so validated TOML maps still mutate the original config object.
  • Archived the tracked cleanup task after all checklist items were completed.

Coverage

  • apps/api/src/durable-objects/project-orchestrator/scheduling.ts
  • apps/web/src/pages/sam-prototype/onboarding-cards.tsx
  • scripts/deploy/sync-wrangler-config.ts
  • scripts/quality/check-preflight-evidence.ts
  • scripts/quality/check-specialist-review-evidence.ts
  • scripts/quality/check-observability-noise.ts
  • experiments/ai-gateway-tool-call/experiment.ts
  • experiments/harness-eval/runner.ts

Validation

  • rg -n "\bisRecord\b" apps scripts experiments packages || true returned no matches.
  • Built dependency packages used by API/web typechecks.
  • pnpm --filter @simple-agent-manager/api typecheck
  • pnpm --filter @simple-agent-manager/web typecheck
  • Direct tsc --noEmit compile for touched scripts and experiments.
  • pnpm quality:specialist-review:test (68 tests passed).
  • pnpm lint passed with pre-existing warnings only.
  • Prettier check passed for touched files.
  • Task completion validator PASS.
  • Staging retry passed: GitHub Actions run 28183922752 including deploy, health check, and smoke tests.

Notes

  • First staging run 28183565999 caught a real regression in the initial Valibot conversion: validating TOML maps through parsed output lost mutations on cloned objects. Fixed in 65ff0146 by validating but returning the original TOML map, with test coverage added.

Do not merge until explicitly approved.

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant