Repository navigation
fix(workflow): mark superseded workflow attempts instead of folding them - #1604
Merged
Merged
Conversation
Runs keeps one row per attempt; the older finished attempt of a task names the newer run (`superseded by <run>`) and the newer one names the older (`retry of <run>`). Two live attempts stay unmarked, and the room opens on the newest attempt for that task. Reuses the #1583 runHistoryRows shape. Fixes #1507 Docs-not-needed: plugins/workflow frontend rendering and its tests; no architecture change.
Collaborator
Author
|
Verdict: PASS at 4a8c179 Ran at this tip: Review.
Not run: root |
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.
Written-by: Dev
Fixes #1507
Owner: Chief
Reviewer: Reviewer
Tip SHA: 4a8c179
Base: a00658c
Docs-not-needed: plugins/workflow frontend rendering and its tests; no architecture change.
What changed
Retrying a Workflow task left two run rows for the same issue/PR with no way to tell which attempt was current. Runs now keeps one row per attempt (nothing is folded) and marks the pair: the older finished attempt reads
superseded by <run>and the newer oneretry of <run>, both naming the run id the workflow already carries. Two live attempts for one task are both left unmarked. The room opens on the newest attempt for that task, while older rows stay in the list.Why not fold
Runsis an append-only log of attempts; folding loses which attempt a stage row, a Bot and a session belonged to, and a re-dispatch may legitimately run two attempts at once. Marking rewrites no history and no row disappears.Files
plugins/workflow/client.js—markSupersededinrunHistoryRows,newestAttemptfor the room default, markers painted in the Runs rows.plugins/workflow/test/client.test.js— the two red-first cases.changelog.d/1507-workflow-runs-superseded.fixed.mdRed first
Both new cases fail on the base client.js and pass on the tip:
supersededBy: run-new, newerretryOf: run-old, andresolveFocusedRun(workflow, null)returnsrun-new(base: no marker, default returns the older live row).workflow.run).Ran
cd plugins/workflow && npm test— 193 pass / 0 fail at the tip; withclient.jsswapped back to the base blob, 191 pass / 2 fail (the two new cases).Not run
Root
npm run verifyin this checkout stops atarch-docswith “cannot diff against origin/main” (the work tree is a directory copy with no.git); the plugin suite above and the blob-level base comparison are what was executed. CI runs the full verify on the branch.{
"pr": 1604, "claim": "Chief", "issue": 1507,
"summary": "Runs keeps one row per attempt instead of folding retries: the older finished attempt is marked superseded by the newer run id and the newer one as a retry of the older. Two live attempts for one task stay unmarked. The room now opens on the newest attempt for that task while older rows remain in the list.",
"files": ["plugins/workflow/client.js", "plugins/workflow/test/client.test.js", "changelog.d/1507-workflow-runs-superseded.fixed.md"],
"checks": { "ran": "cd plugins/workflow && npm test", "result": "green", "at": "4a8c179128a0abb69101b70d596de94abedbf7a8" },
"next": "Reviewer: check the marker pair and the room default; base-blob swap gives 2 failing cases."
}