Repository navigation
fix(workflow): keep a Triage step that already did the work when its state line is missing - #2584
Merged
Merged
Conversation
…state line is missing (#2583) The issue fast line's Triage node claimed the issue and opened the pull request, then ended without `OUTPUT state:`. #1773 failed the step there, so the run died at node 1 and claim/gate/enqueue never ran; the two runs in the issue each left a valid pull request behind. A missing `state` now stands when the step's own result names the pull request it opened or the claim it posted: the step completes, the run takes the node's first declared `state` branch, and the stage log and run record (outputMissing, producedPull) keep the format slip visible. Every other gate-read verdict still fails, and a step with no evidence still fails.
Collaborator
Author
|
Verdict: PASS at 6ccbcca Ran at this tip: TZ=UTC; DSH_HARNESS set to an installed 0.2.1-rc.2 harness (the tarball carries no node_modules). The green run above is after restoring the tip files. 审查要点:
|
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 #2583
Owner: Dev
Reviewer: Reviewer
Tip SHA: 6ccbcca
Base: 3aeb7ad
What changed
The issue fast line's Triage node had already claimed the issue and opened the pull request when its reply ended without
OUTPUT state:, and #1773 failed the step there: the run died at node 1 withMissing OUTPUT state, and claim/gate/enqueue never ran (run-9f16b089left PR #2578,run-2885514aleft PR #2582, both valid and merged).The engine now keeps that work. When
stateis the only gate-read OUTPUT missing and the step's own reply shows its result — a pull request link,pull/<n>, a line saying it opened PR #n, or aClaimed-by:/Claimed #nline — the step completes, the run takes the node's first declaredstatebranch (state: ready → claimon the fast line, so the pull request reaches gate/enqueue instead of theelseroute the step never chose), and the stage log pluswarnrecord the format slip.workflow/stateexposesrun.outputMissingandrun.producedPull, so the board can tell a format failure from a work failure and names the pull request.Every other gate-read OUTPUT keeps #1773: a missing
verdictstill fails even when the reply names a pull request, and astatestep whose reply shows no result still fails. AfailOnceretry that later prints the verdict clears the record.plugins/workflow/src/graph.js—stepArtifactsreads the pull request/claim evidence from the step result;firstBranchValuenames the branch a standing step continues on.plugins/workflow/src/service.js—commitAdvancekeeps a step that has evidence (and fills the routing value),applyOprecordsmissingOutput/producedPulland writes the stage line,publicRunexposes the two fields.plugins/workflow/client.js— the three stage-log lines.plugins/workflow/test/missing-output-state.test.js— 8 tests.docs/subsystems/workflow.md,changelog.d/2583.fixed.md.One decision the issue left to this PR: the engine has no GitHub client, so "opened a PR or posted a claim" is read from the node's own step result. That is the only evidence the engine holds; a quoted reference without a creation verb is not evidence.
Red first
The behavioral tests were run against the pre-change source (
main@ 3aeb7ad) before the fix; 3 of 5 failed for the reason they exist:#2583: a Triage step that opened a PR stands and continues down its first branch—triagewasfailedandclaimqueued: the run died on the missing line.#2583: the claim comment alone is enough evidence, and no PR number is invented— same shape.#2583: a step that produced nothing still fails the run at its missing OUTPUT—run.outputMissingwasundefined(the field is new).verdictgate keeps Workflow run finishes "done" when a step emits no OUTPUT, so the next gate silently reads silence as "no verdict" #1773) passed before and after.Green at the tip with the same tests: 453/453.
Ran at the tip
This host has no
gitand no core install, sonpm run verifywas not run as one process; the stages below were run directly.TZ=UTC.cd plugins/workflow && npm test— 453 tests, 453 pass, 0 fail, withDSH_HARNESSset to an installed harness (core/dev/harnessis not installed here; without ittest/host.test.jsfails on the missing@deepseek-ai/dsh-llm, the same failure onmain).node scripts/lint-plugins.mjs workflow— 16 warnings, 0 errors; the set is identical tomain(no new warning), and the packed plugin imports.node .github/scripts/changelog.mjs check— 4 fragments well formed.node scripts/ds-bot-patches.mjs check— 10 patches apply cleanly,core/equalsds-bot/+patches/ds-bot/(pin skipped: no git here).build-client --check(needsesbuildfromnpm ciincore/, not installed here) andarch-docs(needsgit).Checkpoint
{
"pr": 2584,
"claim": "Dev",
"issue": 2583,
"summary": "A workflow step that ends without its gate-read
stateline now stands when its own reply shows the work: a pull request link,pull/<n>, anopened PR #nline, or aClaimed-by:/Claimed #nline. The step completes, the run takes the node's first declaredstatebranch (ready to claim on the issue fast line), andrun.outputMissing/run.producedPullkeep the slip and the pull request visible. Every other missing verdict still fails, and a step with no evidence still fails.","files": [
"plugins/workflow/src/graph.js",
"plugins/workflow/src/service.js",
"plugins/workflow/client.js",
"plugins/workflow/test/missing-output-state.test.js",
"docs/subsystems/workflow.md",
"changelog.d/2583.fixed.md"
],
"checks": {
"ran": "cd plugins/workflow && npm test (453/453, DSH_HARNESS installed); node scripts/lint-plugins.mjs workflow; node .github/scripts/changelog.mjs check; node scripts/ds-bot-patches.mjs check",
"result": "green",
"at": "6ccbccab1ed783bf77dbe9ba9312eb597199b055"
},
"next": "none — ready for review"
}