Add Schema Validation Coverage
Artifacts
Official change artifacts tracked under openspec/.
Connector schema coverage was uneven before this change. Five connectors (amazon, chase, chatgpt, reddit, usaa) shipped a schemas.ts with validateRecord; six others (github, gmail, ynab, codex, claude_code, slack) had no shape-check at all despite emitting hundreds of thousands of records into the local owner database. The connector authoring guide §3 calls schema-validation the floor — "a connector must never emit a record that looks right but is wrong" — but in practice that floor only existed for some.
Affected capabilities
Capability specs this change proposes to modify.
The polyfill-connectors package SHALL provide a makeValidateRecord(schemas) helper that takes a stream-keyed registry of zod schemas and returns a ValidateRecord closure with consistent diagnostic shape ({ ok: true, data } on pass; { ok: false, issues: [{ path, message }, ...] } on fail; pass-through { ok: true, data } on unknown stream).
A polyfill connector that has a parsers.ts (or equivalent record-builder layer) and emits at least one stream SHALL ship a schemas.ts declaring zod schemas for every stream it emits, wired into the connector via runConnector({ ..., validateRecord }) (or the equivalent custom emit path for connectors that don't use runConnector).