test_http_csv_is_streamed_coerced_and_numeric_validated asserted three behaviors the connectors layer deliberately does NOT provide: numeric coercion of CSV (contradicts the documented no-coercion contract and test_s3's string assertion), loopback reads without the SSRF opt-in, and an ETag on read batches (only inspect() surfaces it; the fixture has no HEAD). Rewritten to assert the real contract: faithful string records + private-network opt-in + numeric=True rejecting textual CSV. Repo now has zero failing tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
LawSynth connectors
lawsynth-connectors provides bounded, reproducible ingestion adapters for the
LawSynth Python stack. Connectors normalize external sources into batches of
plain records while preserving source metadata, snapshot identity, and a stable
content fingerprint.
The package deliberately keeps third-party drivers optional. Importing the core
package never imports pandas, Arrow, database clients, cloud SDKs, or streaming
clients. A concrete adapter raises DependencyUnavailableError with the exact
extra to install when its driver is missing.
Contract
Every connector:
- receives immutable
ConnectorConfiglimits; - exposes explicit capabilities and health information;
- returns bounded
DataBatchvalues rather than an unbounded iterator; - redacts credentials and sensitive error details;
- records source/snapshot metadata and deterministic fingerprints;
- supports predictable cleanup through a context manager.
from lawsynth_connectors import ConnectorConfig, ReadRequest, registry
connector = registry.create(
ConnectorConfig(
name="filesystem",
batch_size=5_000,
max_rows=100_000,
options={"root": "./datasets"},
)
)
with connector:
batches = connector.read(ReadRequest(resource="observations.csv"))
rows = [row for batch in batches for row in batch.records]
Adapters do not perform LawSynth domain inference. Their boundary ends after safe acquisition, structural validation, and provenance capture; profiling and world discovery remain responsibilities of the main SDK.