Skip to content

Phase 3: Scanner restructure + FieldSink trait #269

Closed as not planned
Closed as not planned

Description

@strawgate

Summary

Rename ScanBuilder → FieldSink. Ensure the scan loop works in no_std core. Add bounded Kani proof and proptest oracle for scan_line.

Tasks

  • Rename ScanBuilder trait to FieldSink in core
  • Verify scan_into and scan_line compile under no_std
  • logfwd-arrow builders implement FieldSink
  • Add Kani bounded proof for scan_line (≤128 byte lines, ≤8 fields)
  • Add proptest oracle: scan_line output vs serde_json parse
  • Verify existing scanner_conformance tests still pass through re-exports
  • Optional: add secondary type-based API (ParsedLine) for testing convenience

FieldSink trait

pub trait FieldSink {
    fn begin_batch(&mut self);
    fn begin_row(&mut self);
    fn end_row(&mut self);
    fn resolve_field(&mut self, key: &[u8]) -> usize;
    fn field_str(&mut self, idx: usize, value: &[u8]);
    fn field_int(&mut self, idx: usize, value: &[u8]);
    fn field_float(&mut self, idx: usize, value: &[u8]);
    fn field_null(&mut self, idx: usize);
    fn field_raw(&mut self, line: &[u8]);
}

Assignability

Needs us for trait design and Kani proofs. Copilot can handle the rename/mechanical refactoring once the trait is defined.

Parent: #262

Activity

  1. strawgate commented on Mar 31, 2026

    @strawgate
    OwnerAuthor

    Superseded by #332 (migrate scanner to StreamingClassifier). The FieldSink rename will happen as part of that migration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions