Skip to content

feat(stdlib): baml.csv — streaming CSV readers/writers (BEP-060) - #3744

Merged
rossirpaulo merged 5 commits into
canaryfrom
paulo/csv-stdlib
Jun 11, 2026
Merged

rossirpaulo merged 5 commits into
canaryfrom
paulo/csv-stdlib

Conversation

@rossirpaulo

@rossirpaulo rossirpaulo commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Implements BEP-060: a baml.csv standard library namespace for reading and writing CSV, built around streaming CsvReader / CsvWriter handles that implement baml.iter.Iterator (BEP-051).

// Eager: small files, eval datasets, LLM output
let leads = baml.csv.read<Lead>("./testdata/leads.csv")

// Streaming: same options, constant memory, any file size
for (let lead in baml.csv.open("leads-10gb.csv").rows<Lead>()) {
  Qualify(lead)
}

Surface

  • CsvReader is a lazy iterator over CsvRecords; one cursor shared by raw iteration, rows<T>(), and headers(). Every BEP-051 adapter/default method (map, filter, collect, …) works on it.
  • Typed decode (rows<T> / decode<T> / read<T> / decode_optional<T> / decode_one<T>) follows the baml.json verb family and baml.sql cardinality split; cells cover string/int/bigint/float/bool/enums plus baml.time.Instant, PlainDate, PlainDateTime. Strict, locale-free conversion — no value sniffing.
  • Structured CsvError { kind, message, line, record, field, column, expected, found }; malformed records throw per record and the reader resumes at the next record. on_error: "skip" with skipped() / skipped_count() / on_skip covers dirty-input pipelines.
  • Full dialect surface: delimiter/quote/escape/comment (single ASCII bytes, validated at construction), trim, skip_lines, skip_blank_records, ragged (strict/pad/truncate), null_values, utf8/utf8-lossy, BOM handling, limit.
  • Writer: quote_style (minimal/all/never), lf/crlf, auto/explicit headers, null_value, BOM, sanitize_formulas (OWASP CSV-injection guard); write_rows<T> batches are atomic — a thrown Encode error emits and counts nothing.
  • to_markdown<T> / to_markdown_records for prompt context, with max_rows truncation.

Architecture

All tokenization, typed decoding, and encoding is VM-native (bex_vm/src/package_baml/csv.rs). File IO is pumped through the existing baml.fs sysops (File.read_bytes / File.write) from thin BAML method bodies — the baml.llm.Stream pump pattern — so this adds zero new sysops and needs no engine, sys_native, or wasm changes. The compiler has no CSV-specific code; the namespace is discovered by compiling ns_csv/csv.baml through the normal pipeline like any other stdlib file.

Compiler fixes (CSV-agnostic, individually regression-tested)

CSV is the first stdlib namespace with generic native methods and the first cross-namespace implementor of baml.iter.Iterator, which exposed three latent bugs:

  • TIR: explicit call-site type args on method calls (x.foo<int>()) were silently dropped — the declared-generic-params lookup missed path-shaped callees. Now falls back to path_member_resolutions, accepting only method-like entries so abstract-interface-method arity checking is preserved.
  • MIR: interface dispatch guards dropped implementors whose associated bindings are typevar unions (type Error = E | E2) against normalized requests. Assoc bindings now fall back to unpinned wildcard guards (frame seeded from the runtime instance); positional interface args keep strict pairwise pinning.
  • LSP check: implements signature matching now lowers class-level generics semantically instead of degrading to string equality, so cross-namespace generic implementors validate cleanly.

Per ARCHITECTURE.md's contribution guidance, the TIR/MIR diffs deserve owner eyes — they are deliberately small and carry CSV-independent tests in tests/interfaces.rs and projects/compiles/method_explicit_type_args/.

Documented deviations from the BEP

Forced by current language features and noted in csv.baml doc comments: options: ReaderOptions? = null (class-literal parameter defaults unsupported), non-flat decode targets are a runtime CsvError { kind: Options } (no custom compile-time checks), header parse errors exhaust the reader (continuing would silently install the next data row as the header), rows<T> returns the baml.iter.Iterator interface type, and loop-attached catch (a BEP open question) does not exist yet — the reader is resumable so explicit catch works today.

Test plan

  • 82 pure-BAML tests in baml_tests/baml_src/ns_csv/csv.baml: dialect matrix (line endings, quoting, escape dialects, TSV, BOM, comments, trim, blank records), the BEP null-semantics table, typed decode across all cell types, ragged policies, resumability/skip-mode/on_skip, cardinality one-shots, record/reader/writer APIs, file round-trips, Excel profile, markdown rendering, and regressions for every issue found in review (header poisoning, writer state atomicity, caller-owned handle lifecycle, PlainDate round-trip).
  • 8 end-to-end smoke tests in baml_tests/tests/csv.rs.
  • Compiler regression tests for the dispatch-guard and type-arg fixes.
  • Full suites green: 2,373 baml_tests, 377 lsp_actions tests, 211 baml_cli tests; stdlib compiles with zero diagnostics; clippy-clean on all touched crates.

Summary by CodeRabbit

  • New Features

    • Comprehensive CSV standard library: streaming reader/writer, typed decode/encode, one-shot helpers, and Markdown table rendering.
  • Bug Fixes

    • Improved interface/generic type-argument validation and method-call generic resolution to reduce incorrect compile/runtime dispatch.
  • Tests

    • Extensive CSV test suite and new compile/run tests covering interface/generic behaviors and CSV roundtrips.

…-060)

Add the baml.csv standard library: streaming CsvReader/CsvWriter handles
built around baml.iter.Iterator, typed decode (rows<T>/decode<T>/read<T>)
with the baml.json column-matching family, structured positional CsvError
throws with per-record resumability and on_error="skip" diagnostics, the
cardinality one-shots (decode_optional/decode_one), a full writer
(quote_style, terminator, BOM, sanitize_formulas, atomic write_rows
batches), and to_markdown prompt rendering.

All parsing/encoding is VM-native (bex_vm/package_baml/csv.rs); file IO is
pumped through the existing baml.fs sysops from thin BAML method bodies, so
no new sysops and no engine/wasm changes are needed. Cell decode covers
string/int/bigint/float/bool/enums plus baml.time Instant, PlainDate, and
PlainDateTime.

CSV is the first stdlib namespace with generic native methods and the first
cross-namespace implementor of baml.iter.Iterator, which exposed three
latent compiler bugs fixed here (none CSV-specific, each with independent
regression tests):

- TIR: explicit call-site type args on method calls (x.foo<int>()) were
  silently dropped — the declared-generic-params lookup missed path-shaped
  callees and now falls back to path_member_resolutions, accepting only
  method-like entries so abstract-interface-method arity checks survive.
- MIR: interface dispatch guards dropped implementors whose associated
  bindings are typevar unions (type Error = E | E2) against normalized
  requests; assoc bindings now fall back to unpinned wildcard guards
  (frame seeded from the runtime instance) while positional args keep
  strict pairwise pinning.
- LSP check: implements-signature matching now lowers class-level generics
  semantically instead of degrading to string equality, so cross-namespace
  generic implementors (CsvRows<T>) validate cleanly.

Deviations from the BEP forced by current language features are documented
in csv.baml doc comments (ReaderOptions? = null instead of class-literal
defaults, runtime Options error for non-flat decode targets, header parse
errors exhaust the reader, rows<T> returns the Iterator interface type).
@vercel

vercel Bot commented Jun 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
beps Ready Ready Preview, Comment Jun 11, 2026 10:35pm
promptfiddle Ready Ready Preview, Comment Jun 11, 2026 10:35pm
promptfiddle2 Ready Ready Preview, Comment Jun 11, 2026 10:35pm

Request Review

@vercel
vercel Bot temporarily deployed to Preview – beps June 11, 2026 19:17 Inactive
@coderabbitai

coderabbitai Bot commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 234ec093-fe31-4373-9d9c-5ff79ed0da25

📥 Commits

Reviewing files that changed from the base of the PR and between 5015393 and 7f55ad5.

⛔ Files ignored due to path filters (1)
  • baml_language/crates/baml_tests/snapshots/baml_src/csv.snap is excluded by !**/*.snap
📒 Files selected for processing (6)
  • baml_language/crates/baml_compiler2_mir/src/lower.rs
  • baml_language/crates/baml_release/src/lib.rs
  • baml_language/crates/baml_tests/baml_src/ns_csv/csv.baml
  • baml_language/crates/baml_tests/tests/csv.rs
  • baml_language/crates/bex_vm/src/package_baml/csv.rs
  • baml_language/crates/bex_vm/src/package_baml/time.rs
✅ Files skipped from review due to trivial changes (1)
  • baml_language/crates/baml_release/src/lib.rs
🚧 Files skipped from review as they are similar to previous changes (5)
  • baml_language/crates/bex_vm/src/package_baml/time.rs
  • baml_language/crates/baml_tests/tests/csv.rs
  • baml_language/crates/baml_compiler2_mir/src/lower.rs
  • baml_language/crates/bex_vm/src/package_baml/csv.rs
  • baml_language/crates/baml_tests/baml_src/ns_csv/csv.baml

📝 Walkthrough

Walkthrough

Adds a full BAML CSV standard library (public API + native VM engine), registers the builtin, widens time helper visibility, updates compiler/LSP generic binding and callee-resolution logic, and adds extensive BAML and Rust tests for CSV read/write, decoding, error handling, markdown rendering, and regressions.

Changes

CSV Standard Library and VM

Layer / File(s) Summary
CSV public API and builtin registration
baml_language/crates/baml_builtins2/baml_std/baml/ns_csv/csv.baml, baml_language/crates/baml_builtins2/src/lib.rs
Defines CsvError/CsvPosition, ReaderOptions/WriterOptions, CsvValue, CsvRecord, CsvReader, CsvRows<T>, CsvWriter, one-shot helpers (reader/open/parse/decode/decode_one/decode_optional/write/stringify), markdown helpers, and registers ns_csv/csv.baml in builtins.
CSV native VM engine
baml_language/crates/bex_vm/src/package_baml/csv.rs, baml_language/crates/bex_vm/src/package_baml/mod.rs, baml_language/crates/bex_vm/src/package_baml/time.rs
Implements quote-aware tokenizer, streaming reader with position/header handling, typed cell decoding/encoding (strings, ints, bigints, floats, bools, enums, Instant/PlainDate/PlainDateTime), writer state/BOM/terminator handling, markdown rendering, and VM trait wiring; adds mod csv and widens several time helper visibilities.

Compiler & LSP Adjustments

Layer / File(s) Summary
MIR interface binding inference
baml_language/crates/baml_compiler2_mir/src/lower.rs
Adds assoc_union_wildcard to infer_interface_class_bindings, threads flag through recursive cases, and changes union matching to allow unpinned associated-type unions while keeping positional args strict.
TIR callee generic-param lookup
baml_language/crates/baml_compiler2_tir/src/builder.rs
callee_declared_generic_params now also checks path_member_resolutions for multi-segment method callees when resolutions lacks the callee.
LSP signature matching
baml_language/crates/baml_lsp2_actions/src/check.rs
SignatureMatchContext gains outer_generic_params and MethodSignature::matches merges outer params for lowering/comparison; call sites updated in implements/class validation.

Tests

Layer / File(s) Summary
BAML CSV test suite
baml_language/crates/baml_tests/baml_src/ns_csv/csv.baml
Extensive tests for dialects, BOM/comments, trim/skip/null semantics, typed decoding, header mapping errors, ragged-record policies, reader resumability, writer behaviors, markdown rendering, file IO roundtrips, and regressions.
Rust runtime & interface tests
baml_language/crates/baml_tests/tests/csv.rs, baml_language/crates/baml_tests/tests/interfaces.rs, baml_language/crates/baml_tests/projects/compiles/method_explicit_type_args/*
Runtime CSV tests for streaming, error recovery, skip counts, markdown output; interface/generic regression tests and a compile-time project exercising explicit method type args.

Sequence Diagram

sequenceDiagram
  participant User
  participant CsvReader
  participant Scanner
  participant Decoder
  participant VmNamespace
  User->>CsvReader: rows<T>() / next()
  CsvReader->>Scanner: scan_record()
  Scanner->>CsvReader: Record / Skip / NeedData
  CsvReader->>Decoder: decode_record()
  Decoder->>VmNamespace: construct instance or emit CsvError
  User->>CsvReader: close()
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • BoundaryML/baml#3729: Also inserts a new baml stdlib namespace builtin into baml_builtins2/src/lib.rs.

Poem

🐰 I hop through rows and fields with cheer,

Quoted commas and newlines, nothing to fear,
Errors noted by line, record, and column light,
I nibble headers, write buffers through the night,
Tests and markdown make my CSV delight!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 79.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: adding a new baml.csv standard library with streaming CSV readers and writers, which is the primary focus of this PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch paulo/csv-stdlib

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 June 11, 2026 19:23 Inactive

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (3)
baml_language/crates/bex_vm/src/package_baml/csv.rs (1)

802-985: ⚡ Quick win

Consider adding Rust unit tests for the tokenizer.

The scan_record function contains complex quote-aware parsing logic with many edge cases. While the BAML-level tests provide good end-to-end coverage, unit tests for the tokenizer would make it easier to verify edge cases in isolation and catch regressions during future refactoring.

Example test cases that would benefit from direct unit testing:

  • Unterminated quotes at various positions
  • RFC 4180 quote doubling vs escape-character dialects
  • Stray quotes in unquoted fields
  • Data after closing quote

As per coding guidelines: "Prefer writing Rust unit tests over integration tests where possible".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@baml_language/crates/bex_vm/src/package_baml/csv.rs` around lines 802 - 985,
Add focused Rust unit tests for the tokenizer by exercising scan_record
directly: create tests in a #[cfg(test)] mod that construct ReaderOpts (set
delimiter, quote, escape, quoting, trim, skip_blank) and call scan_record with
tailored byte buffers and eof flags to assert returned Scan variants and fields.
Include tests for unterminated quotes (expect Scan::Malformed with Kind::Quote
and exhausted true/false as appropriate), RFC4180 quote doubling vs
escape-character dialects (double-quote consumes vs escape uses next byte),
stray quotes in unquoted fields (expect Scan::Malformed Kind::Quote), and
unexpected data after closing quote (err then Record with cell contents or
Malformed depending on consumed). Use finish_cell/scan_record behavior to verify
consumed, lines, cells, and exhausted flags so future refactors catch
regressions.

Source: Coding guidelines

baml_language/crates/baml_lsp2_actions/src/check.rs (1)

1001-1014: ⚡ Quick win

Add a unit regression for outer-generic signature matching.

This matcher now depends on enclosing generics being threaded into semantic lowering, but the local #[cfg(test)] module does not cover the new path. A focused unit test for both class C<T> implements I<T> and out-of-body implements<U> ... for C<U> would pin this behavior down and catch any future fallback to string-only matching. As per coding guidelines, "Prefer writing Rust unit tests over integration tests where possible."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@baml_language/crates/baml_lsp2_actions/src/check.rs` around lines 1001 -
1014, Add a focused unit test in the local #[cfg(test)] module that exercises
the new outer-generic path used by matches(&self, other: &Self, ctx:
SignatureMatchContext) in check.rs: create cases for a type declared with
enclosing generics (e.g., class C<T> implements I<T>) and an out-of-body impl
with its own generics (e.g., implements<U> ... for C<U>), invoking the semantic
lowering/path that populates ctx.outer_generic_params so the gp_all branch is
hit; assert that signature matching succeeds (and also include a negative case
that would fail if matching fell back to string-only), thereby preventing
regressions where outer_generic_params are ignored.

Source: Coding guidelines

baml_language/crates/baml_tests/baml_src/ns_csv/csv.baml (1)

1256-1261: ⚡ Quick win

Inline catch expressions instead of storing them in local let variables.

This let caught = ({...} catch ...) pattern is a known test fragility point in BAML sources; keep the catch expression inline in the returned/asserted expression to avoid boxed-value behavior.

Suggested pattern update
-    let caught = {
-        w.write_row<MdRow>(MdRow { metric: "bad", value: float.nan() });
-        "no-throw"
-    } catch (e) {
-        baml.csv.CsvError => kind_name(e.kind),
-    };
-    w.write_row<MdRow>(MdRow { metric: "ok", value: 1.5 });
-    caught + "#" + w.text() + "#" + baml.json.stringify(w.records_written())
+    let result =
+        ({
+            w.write_row<MdRow>(MdRow { metric: "bad", value: float.nan() });
+            "no-throw"
+        } catch (e) {
+            baml.csv.CsvError => kind_name(e.kind),
+        });
+    w.write_row<MdRow>(MdRow { metric: "ok", value: 1.5 });
+    result + "#" + w.text() + "#" + baml.json.stringify(w.records_written())

Based on learnings, avoid binding the result of a catch expression to a let in BAML test sources because boxed values can break downstream assertions/comparisons.

Also applies to: 1281-1286, 1302-1310

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@baml_language/crates/baml_tests/baml_src/ns_csv/csv.baml` around lines 1256 -
1261, The test binds a catch expression to a local `let caught` which can create
boxed values and break assertions; instead, remove the `let caught =` binding
and place the `({...} catch (e) { baml.csv.CsvError => kind_name(e.kind) })`
expression directly where the value is used (inline the catch) — locate the
pattern around the `w.write_row<MdRow>(MdRow { metric: "bad", value: float.nan()
}); "no-throw" } catch (e) { baml.csv.CsvError => kind_name(e.kind) }` usage
(and the similar occurrences near the other ranges) and replace the `let`
assignment with the catch expression itself so comparisons/assertions operate on
the raw catch result instead of a boxed local.

Source: Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@baml_language/crates/baml_compiler2_mir/src/lower.rs`:
- Around line 521-533: The assoc_union_wildcard fallback currently allows
matching when associated members remain unresolved, letting fparts/aparts logic
succeed without pinning class parameters and leaving impl_ty with typevars;
update the condition around assoc_union_wildcard (and the later
associated-binding check that consults impl_ty) so that you either require at
least one class parameter to be pinned (i.e., ensure a concrete class-arg match
for the class-param members) before treating the associated-union as a wildcard
OR add a runtime re-check against the receiver’s concrete class args before
selecting the arm: modify the code around assoc_union_wildcard, fparts, aparts
and is_class_param (and the use of
baml_compiler2_tir::normalize::is_same_normalized_type) to ensure unresolved
associated-union members do not permit a match unless class args are pinned,
otherwise perform a final runtime comparison of the receiver’s concrete class
args to the requested union binding to reject unsafe matches; also apply the
same guard where impl_ty is examined for typevars (the later associated-binding
check) so unresolved typevars cannot bypass this check.

In `@baml_language/crates/baml_tests/tests/interfaces.rs`:
- Around line 11003-11064: The CI test failure is due to running `cargo test
--lib` from the wrong directory; rerun the tests from the crate or workspace
root that contains the Cargo.toml so the baml_tests crate is discovered (this
will run tests like positional_typevar_union_interface_args_dispatch and
field_chain_abstract_interface_method_arity_checked successfully); ensure your
test command is executed in the repository root (or the specific crate directory
containing Cargo.toml) or update your CI/job script to cd into the correct
workspace/crate root before running `cargo test --lib`.

---

Nitpick comments:
In `@baml_language/crates/baml_lsp2_actions/src/check.rs`:
- Around line 1001-1014: Add a focused unit test in the local #[cfg(test)]
module that exercises the new outer-generic path used by matches(&self, other:
&Self, ctx: SignatureMatchContext) in check.rs: create cases for a type declared
with enclosing generics (e.g., class C<T> implements I<T>) and an out-of-body
impl with its own generics (e.g., implements<U> ... for C<U>), invoking the
semantic lowering/path that populates ctx.outer_generic_params so the gp_all
branch is hit; assert that signature matching succeeds (and also include a
negative case that would fail if matching fell back to string-only), thereby
preventing regressions where outer_generic_params are ignored.

In `@baml_language/crates/baml_tests/baml_src/ns_csv/csv.baml`:
- Around line 1256-1261: The test binds a catch expression to a local `let
caught` which can create boxed values and break assertions; instead, remove the
`let caught =` binding and place the `({...} catch (e) { baml.csv.CsvError =>
kind_name(e.kind) })` expression directly where the value is used (inline the
catch) — locate the pattern around the `w.write_row<MdRow>(MdRow { metric:
"bad", value: float.nan() }); "no-throw" } catch (e) { baml.csv.CsvError =>
kind_name(e.kind) }` usage (and the similar occurrences near the other ranges)
and replace the `let` assignment with the catch expression itself so
comparisons/assertions operate on the raw catch result instead of a boxed local.

In `@baml_language/crates/bex_vm/src/package_baml/csv.rs`:
- Around line 802-985: Add focused Rust unit tests for the tokenizer by
exercising scan_record directly: create tests in a #[cfg(test)] mod that
construct ReaderOpts (set delimiter, quote, escape, quoting, trim, skip_blank)
and call scan_record with tailored byte buffers and eof flags to assert returned
Scan variants and fields. Include tests for unterminated quotes (expect
Scan::Malformed with Kind::Quote and exhausted true/false as appropriate),
RFC4180 quote doubling vs escape-character dialects (double-quote consumes vs
escape uses next byte), stray quotes in unquoted fields (expect Scan::Malformed
Kind::Quote), and unexpected data after closing quote (err then Record with cell
contents or Malformed depending on consumed). Use finish_cell/scan_record
behavior to verify consumed, lines, cells, and exhausted flags so future
refactors catch regressions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 22b5c53f-6756-4bd2-9125-caa0293c3973

📥 Commits

Reviewing files that changed from the base of the PR and between c2789e5 and cc9f0f7.

⛔ Files ignored due to path filters (18)
  • baml_language/crates/baml_cli/src/snapshots/baml_cli__describe_command_tests__render_builtin_package_listing.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/baml_src/_root.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/baml_src/csv.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/__baml_std__/baml_tests__compiles____baml_std____03_hir.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/__baml_std__/baml_tests__compiles____baml_std____04_5_mir.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/__baml_std__/baml_tests__compiles____baml_std____04_tir.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/__baml_std__/baml_tests__compiles____baml_std____06_codegen.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/method_explicit_type_args/baml_tests__compiles__method_explicit_type_args__01_lexer__method_explicit_type_args.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/method_explicit_type_args/baml_tests__compiles__method_explicit_type_args__02_parser__method_explicit_type_args.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/method_explicit_type_args/baml_tests__compiles__method_explicit_type_args__03_hir.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/method_explicit_type_args/baml_tests__compiles__method_explicit_type_args__04_5_mir.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/method_explicit_type_args/baml_tests__compiles__method_explicit_type_args__04_tir.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/method_explicit_type_args/baml_tests__compiles__method_explicit_type_args__05_diagnostics.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/method_explicit_type_args/baml_tests__compiles__method_explicit_type_args__06_codegen.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/snapshots/compiles/method_explicit_type_args/baml_tests__compiles__method_explicit_type_args__10_formatter__method_explicit_type_args.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/src/compiler2_tir/snapshots/baml_tests__compiler2_tir__phase5__snapshot_baml_package_items.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/tests/bytecode_format/snapshots/bytecode_format__bytecode_display_expanded.snap is excluded by !**/*.snap
  • baml_language/crates/baml_tests/tests/bytecode_format/snapshots/bytecode_format__bytecode_display_expanded_unoptimized.snap is excluded by !**/*.snap
📒 Files selected for processing (12)
  • baml_language/crates/baml_builtins2/baml_std/baml/ns_csv/csv.baml
  • baml_language/crates/baml_builtins2/src/lib.rs
  • baml_language/crates/baml_compiler2_mir/src/lower.rs
  • baml_language/crates/baml_compiler2_tir/src/builder.rs
  • baml_language/crates/baml_lsp2_actions/src/check.rs
  • baml_language/crates/baml_tests/baml_src/ns_csv/csv.baml
  • baml_language/crates/baml_tests/projects/compiles/method_explicit_type_args/method_explicit_type_args.baml
  • baml_language/crates/baml_tests/tests/csv.rs
  • baml_language/crates/baml_tests/tests/interfaces.rs
  • baml_language/crates/bex_vm/src/package_baml/csv.rs
  • baml_language/crates/bex_vm/src/package_baml/mod.rs
  • baml_language/crates/bex_vm/src/package_baml/time.rs

@vercel
vercel Bot temporarily deployed to Preview – promptfiddle June 11, 2026 19:36 Inactive
…0114 for assoc-binding duplicates

The assoc-binding wildcard in interface dispatch-guard unification leaves
unpinnable typevar-union bindings (type Error = E1 | E2 against a
normalized request) as wildcard guard entries. Document the three
invariants that make this safe — concrete-class identity check on every
arm, E0114 rejection of same-class blocks differing only in assoc
bindings, and frame args seeding from the runtime instance — and pin the
E0114 invariant with a compile-error test, since the safety argument
leans on it. Also note that the typevar skip in the guard's assoc
post-check is only reachable after binding inference structurally vetted
the same pairs.
@vercel
vercel Bot temporarily deployed to Preview – beps June 11, 2026 21:19 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 June 11, 2026 21:24 Inactive
# Conflicts:
#	baml_language/crates/baml_tests/tests/bytecode_format/snapshots/bytecode_format__bytecode_display_expanded.snap
#	baml_language/crates/baml_tests/tests/bytecode_format/snapshots/bytecode_format__bytecode_display_expanded_unoptimized.snap
@vercel
vercel Bot temporarily deployed to Preview – beps June 11, 2026 21:31 Inactive
@github-actions

github-actions Bot commented Jun 11, 2026 •

Copy link
Copy Markdown

⏭️ Performance benchmarks were skipped

Perf benchmarks (CodSpeed) are opt-in on pull requests — they no longer run on every push. They always run automatically after merge to canary/main.

To run them on this PR, do any of the following, then push a commit (or re-run CI):

  • Add RUN_CODSPEED=1 to the PR description, or
  • Include run-perf or /perf in the PR title or any commit message.

@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 June 11, 2026 21:36 Inactive
@github-actions

Copy link
Copy Markdown

No description provided.

@vercel
vercel Bot temporarily deployed to Preview – promptfiddle June 11, 2026 21:48 Inactive
@rossirpaulo
rossirpaulo enabled auto-merge June 11, 2026 22:16
@vercel
vercel Bot temporarily deployed to Preview – beps June 11, 2026 22:17 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 June 11, 2026 22:22 Inactive
@rossirpaulo
rossirpaulo added this pull request to the merge queue Jun 11, 2026
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle June 11, 2026 22:35 Inactive
Merged via the queue into canary with commit f007399 Jun 11, 2026
51 checks passed
@rossirpaulo
rossirpaulo deleted the paulo/csv-stdlib branch June 11, 2026 22:49

This branch was previously deployed

3 inactive deployments
Preview – promptfiddle — 7f55ad52 Deployed Jun 11, 2026 by vercel[bot]
Preview – promptfiddle2 — 7f55ad52 Deployed Jun 11, 2026 by vercel[bot]
Preview – beps — 7f55ad52 Deployed Jun 11, 2026 by vercel[bot]
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