Skip to content

Make _RecordPreparer generic - #1396

Open
myronmarston wants to merge 1 commit into
mainfrom
myron/generic-record-preparer
Open

myronmarston wants to merge 1 commit into
mainfrom
myron/generic-record-preparer

Conversation

@myronmarston

Copy link
Copy Markdown
Collaborator

Why

A record preparer only handles records of the ingestion format it serves. The interface declared a method-level generic ([T < ::Object]), so any caller could pass any record type and get the same type back. That signature cannot express the relation between a preparer and its format, and it gives no protection when a format with a non-Hash record type is added.

What

  • _RecordPreparer[R], where prepare_for_index takes and returns R.
  • RecordPreparer, RecordPreparer::Identity, and each caller use _RecordPreparer[untyped] until a concrete record type exists.

RBS only. No runtime change.

🤖 Generated with Claude Code

@myronmarston
myronmarston added this pull request to stack #1399 September 18, 2026 18:43
@myronmarston
myronmarston force-pushed the myron/generic-record-preparer branch from 359bb05 to 2ba01fb Compare September 18, 2026 19:31
@myronmarston
myronmarston removed this pull request from stack #1399 September 18, 2026 19:44
@myronmarston
myronmarston added this pull request to stack #1401 September 18, 2026 19:49
@myronmarston
myronmarston force-pushed the myron/generic-record-preparer branch from 2ba01fb to 07e7d49 Compare September 18, 2026 20:06
@myronmarston
myronmarston force-pushed the myron/generic-record-preparer branch from 07e7d49 to a3895ad Compare September 18, 2026 21:19
@myronmarston
myronmarston force-pushed the myron/generic-record-preparer branch from a3895ad to 60cd1aa Compare September 18, 2026 23:46
@myronmarston
myronmarston force-pushed the myron/generic-record-preparer branch from 60cd1aa to 94826f7 Compare September 20, 2026 01:03
@myronmarston
myronmarston marked this pull request as ready for review September 20, 2026 02:18
Base automatically changed from myron/indexing-failure-interface to main September 20, 2026 04:57
- Parameterize _RecordPreparer over the record type R, so a future
  non-Hash ingestion format can have its own preparer without an
  untyped escape hatch on the interface itself.
- Update RecordPreparer, RecordPreparer::Identity, and every caller to
  use _RecordPreparer[untyped] until a concrete record type exists.

Generated with Claude Code
@myronmarston
myronmarston force-pushed the myron/generic-record-preparer branch from 94826f7 to 92cf214 Compare September 20, 2026 04:57
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