Skip to content

fix(uploads): validate parsed files before persisting artifacts - #39

Merged
xiaour merged 3 commits into
xiaour:mainfrom
BigDataDZ:codex/upload-atomic-artifacts
Oct 19, 2026
Merged

xiaour merged 3 commits into
xiaour:mainfrom
BigDataDZ:codex/upload-atomic-artifacts

Conversation

@BigDataDZ

@BigDataDZ BigDataDZ commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

A rejected upload could still persist its raw FILE before parsing failed. A malformed XLSX therefore left a hidden artifact/version, consumed the session quota, and could enter later model context. With a one-file quota, even the next valid CSV was rejected.

Finish parsing, sanitization, warnings and column validation before creating upload artifacts. Keep quota-check ordering, successful FILE/TABLE/PROCESS lineage and returned fields unchanged. Preserve accepted raw-only legacy XLS uploads. This change addresses input parsing failures; it does not introduce rollback for database write failures.

Validation: five invalid-input regressions failed before the fix and now prove no artifacts/versions remain; a valid CSV succeeds afterward under a one-file quota. Legacy XLS bytes and raw-only artifact versions are verified. Full npm test: 579 tests, 567 passed, 12 optional skips, 0 failures. Lint 0 errors / 7 existing warnings; eval 14/14 fixtures with 2 L3 judgments pending. Independent review approved and reran the local-file suite: 22/22 passed.

Depends on #37 for the shared PostgreSQL HTTP acceptance path; merge #37 first. Its prerequisite changes are included so this branch can run the full CI suite.

@xiaour
xiaour merged commit eaccefd into xiaour:main Oct 19, 2026
4 checks passed
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.

2 participants