fix publish queue processing time for corrections - #3291
Merged
petrjasek merged 1 commit intoAug 24, 2026
Merged
Conversation
it shows time since first publishing instead of the time since the correction was published. SDESK-7979
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates publish queue timing so corrections measure from the correction publication rather than the original publication.
Changes:
- Reset lifecycle timestamps for subsequent publish actions.
- Add regression coverage for correction timing.
- Resend actions still bypass the reset path and require adjustment.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Summary |
|---|---|
tests/archive/archive_test.py |
Adds regression coverage for correction lifecycle timing. |
apps/publish/content/common.py |
Resets lifecycle timing, but resend requests do not currently use this reset path. |
Suppressed comments (1)
tests/archive/archive_test.py:434
- This regression test only checks the archive document. It does not verify the user-visible publish-queue timing (
lifecycle_started_ms/lifecycle_to_transmit_ms), so it would still pass if the reset were lost while constructing thePublishRequestor queue item. Please exercise the correction's queue entry and assert that its lifecycle start and calculated transmit duration usecorrection_at.
correction_at = first_publish_at + timedelta(hours=5)
with mock.patch.object(common, "utcnow", lambda **kwargs: correction_at):
await correct_service.patch_async("foo-correct", {"body_html": "corrected"})
corrected = self.app.data.find_one("archive", req=None, _id="foo-correct")
# firstpublished must be untouched, but lifecycle timing restarts for this correction
self.assertEqual(first_publish_at, corrected["firstpublished"])
self.assertEqual(correction_at, corrected["lifecycle_timing"]["lifecycle_started_at"])
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
BrianMwangi21
approved these changes
Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
it shows time since first publishing instead of the time since the correction was published.
SDESK-7979
Purpose
What has changed
Steps to test
Resolves: #[issue-number]