Repository navigation
feat(taskflow)!: hold task row when a step in its workflow parks - #357
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
lokewate
marked this pull request as ready for review
October 26, 2026 18:47
lokewate
added a commit
to OpenNSW/nsw-srilanka
that referenced
this pull request
Oct 27, 2026
Pins OpenNSW/core to OpenNSW/core#357's head (1826a5a), which also holds a task whose step parks after its submission, and drops the go.sum entries left from the previous pin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
12 of 17 tasks
lokewate
force-pushed
the
feat/hold-parked-task-steps
branch
6 times, most recently
from
October 28, 2026 04:22
a0fc223 to
6e3bf4d
Compare
PersistSubmission moves the row to ADVANCING at seq+1, but the step's park notification carries the step's own seq, so HoldTask's seq <= n guard dropped it and the task never went ON_HOLD. HoldTask now also accepts a row ADVANCING at exactly seq+1, and keeps seq+1 so a repeated submission of the step stays stale. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lokewate
force-pushed
the
feat/hold-parked-task-steps
branch
from
October 28, 2026 04:26
6e3bf4d to
2f21f25
Compare
lokewate
added a commit
to OpenNSW/nsw-srilanka
that referenced
this pull request
Oct 28, 2026
Main now has force-park (#920) squashed. Pins core to 3ccf5f9, the squash of the hold-on-park change (OpenNSW/core#357) this branch was built on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Note
For reviewers, lines to review (blank lines not counted): code +29 / −2, plus 28 / −3 comment lines · tests +121 / −2 · docs +4 / −2. Diff against #287.
Summary
Add
store.StateOnHold("ON_HOLD") and aseq-guardedHoldTaskwrite so a task row moves toON_HOLDwhenever a node in its workflow parks for admin intervention, stripping interactive actions and refusing drafts until an admin resolves the park.Type of Change
Changes Made
workflow: AddSeq int64toAdminParkPayloadand populate it fromnodeInfo.SeqinnotifyAdminParkso hosts can order park notifications against later step claims.taskflow/storeandtaskflow/store/gorm: AddStateOnHold = "ON_HOLD"andTaskStore.HoldTask(ctx, taskID, seq), guarded by(seq <= ? OR (state = 'ADVANCING' AND seq = ? + 1)) AND state NOT IN ('COMPLETED', 'CANCELLED'), and includeStateOnHoldinWriteDraft's excluded states.taskflow/orchestrator: AddTaskManager.HoldTask(ctx, payload)to wire to a task workflow runner'sAdminParkHandler, and refuseStateOnHoldinSaveDraft.PersistSubmissionhas already moved the row toADVANCINGatseq + 1, soHoldTaskalso accepts that row and keepsseq + 1, so a repeated submission of the step stays stale. Tested inTestHoldTask_StepParkedAfterItsSubmissionandTestHoldTask_HoldsAStepThatParkedAfterItsSubmission.taskflow/docs/architecture.md: DocumentHoldTaskandON_HOLDlifecycle semantics.Testing
Checklist
Related Issues
Related to https://github.com/LSFLK/lsf-govtech-tnsw/issues/243
Stacked on #287
Screenshots/Demo
N/A
Additional Notes
Stacked on #287 (
feat/task-cancel-and-fail-activation).TaskStoregainsHoldTask(ctx, taskID, seq).