Skip to content

Dynamic mode: confirm inferred types before table creation, with a provenance flag #195

Open

Description

@amar-python

Decision by the product owner, 4 Nov 2026: require type confirmation before a dynamic-mode table is created, and add a provenance flag.

Scope note: this does not reopen BR-22 or the multi-engine work. Confirm with the product owner before any change to the deferred items.

What the code shows (verified at c7bebd1)

  • api/services/dynamic_loader.py creates a table named csv_<sha256[:16]> in uploads_schema(). This is already separate from the twelve T&E tables.
  • Column types are inferred from the data. The inference is not confirmed by a person before the table is created. I have not reproduced the mis-typed clearance and date examples from the feedback.

Proposed

  • Return the inferred types from the upload preview, and create the table only after the user confirms them or changes them.
  • Store a provenance value on each dynamic table (for example inferred_unconfirmed, user_confirmed) and show it in the API response and the UI.
  • Keep dynamic-mode tables out of any T&E import path. Assert this in a test.

Done when

  • A test shows that no table exists before confirmation, and that confirmation creates it with the confirmed types.
  • A test shows that the provenance value is stored and returned.
  • The T&E import path rejects a dynamic-mode table as a source (test run attached).

Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions