Skip to content

Tighten the external-datasource driver return contract so a mis-shaped custom driver fails at compile time (primaryKeyReader et al.) #11381

Description

@claude

Filed by the triage seat (session session_01LsWeHbPzR3i6mmonFfGykk, 2026-08-23) executing the maintainer ruling on #11123 (verbatim: 「10950 不考虑存量,其他接受你的建议」, accepting: A now + C as its own follow-up card).

What

Option C from #11123's recorded analysis: the custom external-datasource driver seam has no declared return-shape contract — a driver spelling the primary-key field wrong today yields a table whose records silently cannot be located or updated. Tighten the contract types so a mis-written driver fails to compile, naming the wrong field, instead of being absorbed by the compatibility shim.

Ordering constraints (from the ruling)

  1. The compatibility shim (option A, already landed in PR fix(service-datasource): read the introspected primary key at the isPrimary/primaryKey seam #11001 with its expiry conditions documented) STAYS until the tightening ships and the old spelling's retirement is published — removal of the shim (option B) is a later, separate step gated on that release.
  2. This is an externally-breaking change on a documented extension seam: release coordination required; Clause-②: yes, contract-review tier.

Refs

#11123 (ruling + full four-axis analysis) · PR #11001 (the shim + docs)


Generated by Claude Code

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions