Skip to content

RV-F13: T&E review displays invalid rows without validation errors (empty type list) #190

Open

Description

@amar-python

What happened

External repo review at commit c7bebd1 reproduced: T&E uploads store an empty column-type list in uploads.column_types. The review service falls back to text for every column and does not incorporate stored DB constraint failures. Reproduction: stored invalid organisation with a CHECK violation returned errors: [] on review.

Code paths:

  • api/services/review.py L32–57 (review falls back to text)
  • api/services/te_loader.py L325–338 (empty type list stored)

PR #142 itself documents this limitation: "T&E-mode uploads have no stored types. Their values are reviewed as text, with no type validation."

Why this matters

A reviewer looking at a T&E upload that was rejected sees "no errors" even though the DB CHECK constraints rejected it. The audit trail (M3a columns, M4a review tables) records the rejection, but the review UI does not surface the reason.

This is explicitly called out as a known M4 limitation. The attachment's testing report also flags it. The fix is retaining target-schema metadata on T&E uploads so review can revalidate against the target.

Proposed

  1. T&E loader stores the target schema/table and the per-column DB-level constraint set on upload.
  2. Review service revalidates edited rows against the target, not as free text.
  3. For rows that failed on upload, the stored constraint failure is included in the review response.
  4. Reproduction test: upload an invalid organisation; open review; errors: [] becomes errors: ["CHECK violation on type column: ..."].

Done when

  • Reproduction test passes.
  • T&E uploads with CHECK/FK failures show the actual constraint reasons on review.
  • Regression test: dynamic-mode uploads still review correctly.

Reference

Tracker row G56. Repo review finding RV-F13. Documented limitation in PR #142 ("T&E-mode uploads have no stored types"). Related: #177 (composite FKs — once stored types exist, composite FK violations should also surface here).

Activity

  1. added this to the ART extension milestone on Nov 3, 2026
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

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions