Skip to content

fix(sdk): expose the flat-files surface on the TypeScript HistoricalClient#865

Merged
userFRM merged 1 commit into
mainfrom
fix/historicalclient-flatfiles
Jun 17, 2026
Merged

fix(sdk): expose the flat-files surface on the TypeScript HistoricalClient#865
userFRM merged 1 commit into
mainfrom
fix/historicalclient-flatfiles

Conversation

@userFRM

@userFRM userFRM commented Jun 17, 2026

Copy link
Copy Markdown
Owner

The standalone HistoricalClient documents a historical / list / snapshot / at-time / flat-files surface identical to the unified client, but the flatFiles getter and flatFileToPath writer were implemented only on the unified Client. A historical-only handle therefore resolved flatFiles to undefined at runtime, breaking the contract its own docstring promises and diverging from the Python HistoricalClient, which delegates to its wrapped client and reaches the flat-files surface.

The invariant: HistoricalClient exposes the flat-files surface its contract promises, matching the Python binding and the unified client.

The historical-only handle opens the same data channel and holds the same client core, so the FlatFilesNamespace and the to-path writer are client-agnostic. Both members are mirrored onto HistoricalClient so the documented surface is reachable. The regenerated index.d.ts now declares get flatFiles() and flatFileToPath on the class, and the structural contract test pins the flat-files surface on HistoricalClient against the unified Client.

Verification: cargo check and cargo fmt --all -- --check clean; npm run build regenerates index.d.ts with the new members; npm test passes (170/170); the binding parity gate is clean with no new row required.

🤖 Generated with Claude Code

…lient

The standalone HistoricalClient documents a historical / list / snapshot / at-time / flat-files surface identical to the unified client, but the flatFiles getter and flatFileToPath writer were implemented only on the unified Client. A historical-only handle therefore resolved flatFiles to undefined at runtime, breaking the contract its own docstring promises and diverging from the Python HistoricalClient, which delegates to its wrapped client and reaches the flat-files surface.

The historical-only handle opens the same data channel and holds the same client core, so the namespace and the to-path writer are client-agnostic. Mirror both members onto HistoricalClient so the documented surface is reachable, matching the unified client and the Python binding. The structural contract test now pins the flat-files surface on HistoricalClient against the unified Client.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@userFRM userFRM enabled auto-merge (squash) June 17, 2026 16:13
@userFRM userFRM merged commit 0e3190d into main Jun 17, 2026
44 checks passed
@userFRM userFRM deleted the fix/historicalclient-flatfiles branch June 17, 2026 17:00
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.

2 participants