Skip to content

[Import] Previously cleansed dataset silently replaces a newly uploaded file #44

Description

@Exotic209093

Severity

Critical — the file shown on screen is not the file that gets pushed.

What happens

DataPushScreen computes sourceRecords = props.cleanedRecords ?? dataset?.sourceRecords. The Cleanser route clears cleaned on dataset change, but the Import route's onDataset={setDataset} never calls setCleaned(null). Clean file A once, return to Import, upload file B: the banner shows B's filename and B's headers drive the mapping UI, but every record mapped and pushed comes from file A's cleaned rows. The same override corrupts the Retry and "Prepare Delete Push" flows, which also load datasets via onDataset.

Evidence

  • src/ui/app/AppRoot.tsx:402 (import route, no cleaned reset) vs :462 (cleanser route resets)
  • src/ui/screens/DataPushScreen.tsx:163

Suggested fix

Clear cleaned in the import route's onDataset callback (and whenever dataset.filename changes).

Environment

Commit 74cf21b (main), WaveLink 0.6.0. Found in the 2026-08-31 adversarial audit (code-verified).

Activity

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

    bugSomething isn't working

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions