Skip to content

SUBMISSION-207: Reset is_source_processed and clear preview on file change.#93

Merged
DavidLFielding merged 1 commit into
developfrom
SUBMISSION-207-reset-processing-state
Jul 24, 2026
Merged

SUBMISSION-207: Reset is_source_processed and clear preview on file change.#93
DavidLFielding merged 1 commit into
developfrom
SUBMISSION-207-reset-processing-state

Conversation

@DavidLFielding

@DavidLFielding DavidLFielding commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary. After a submission was processed, editing its files left it incorrectly marked as "processed," so the workflow could skip recompiling the changed source and could reference a stale preview. This resets the processing state on any file change, forcing reprocessing of the new source — for both TeX and PDF-only submissions.

Problem. The file-change events (UploadFiles, UploadArchive, RemoveFiles, RemoveAllFiles) delete the derived artifacts (preview, compile log, preflight, directives, source package) but never reset the submission's processing state. So after a submission is processed (is_source_processed=True), editing files left it wrongly marked processed:

legacy must_process stayed 0 ("already processed");
the Process stage's completion gate (conditions.is_source_processed) stayed satisfied, letting the workflow skip recompilation of the changed source;
submission.preview dangled at a now-deleted preview file (which ConfirmPreview.validate later checksum-matches).

This affected both TeX and PDF-only submissions, which route through the same common_file_change* helpers.
Fix. Extend the shared _common_file_change_project(submission) helper — already called by all four file-change events' project() — to also set is_source_processed=False and preview=None, mirroring UnConfirmSourceProcessed. Because is_source_processed round-trips to the legacy must_process column, must_process correctly returns to 1 after any file change.
Tests. Added test_upload_resets_processing_state and test_remove_all_resets_processing_state: a processed submission (is_source_processed=True, preview set) has both reset after an upload or remove-all.

@DavidLFielding
DavidLFielding marked this pull request as ready for review July 22, 2026 16:19

@bdc34 bdc34 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

@DavidLFielding
DavidLFielding merged commit 5dde7f4 into develop Jul 24, 2026
1 check passed
@DavidLFielding
DavidLFielding deleted the SUBMISSION-207-reset-processing-state branch July 24, 2026 14:50
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