Repository navigation
Refuse a handoff recorded on a finished task card - #2668
Merged
Merged
Conversation
A handoff recorded on an accepted, cancelled or failed card still went through requeue because routeToPool only looked at claimedBy and the claimed/working/blocked statuses, so a finished card was written back to open, 0% and handed to the next role. routeToPool now refuses it with the same stale refusal blockForInput makes, before the handoff field or queueRole lands, and the subsystem doc states that rule. Fixes #2667
Collaborator
Author
|
Verdict: PASS at 7f1520c Ran at this tip: Review points:
|
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 #2667
Owner: Dev
Reviewer: Reviewer
What
A handoff recorded on a finished card no longer reopens it.
routeToPool(core/src/host/tasks.js) now refusesaccepted/cancelled/failedwithstale: A finished task cannot be handed on— the same refusalblockForInputalready makes — before it writesqueueRole.result-readyis not terminal and still hands on.The route also answers before the
handofffield lands, so a refused write leaves the card exactly as it was, on both entries intowriteContract(track_tasksandtask-update).Red first
New test
core/test/task-handoff-terminal.test.js, implementation untouched (tip ofmaind02f292ff7d83464d890892343121b190dae0c18):The two red lines are the defect: the handoff went through
requeueand the card came backopen/ 0%. Theresult-readycase was green before and stays green, which is the legal path being guarded.Ran at this tip: 7f1520c
Not run
npm run verify(the whole suite) — the box runs one at a time and another PR fast lane held it.node scripts/ds-bot-patches.mjs generate— it requires git, which this box does not have;patches/ds-bot/files/was updated to the same bytesgeneratewould write, andcheckpasses on the result.arch-docs— needsorigin/main; no git here.docs/subsystems/core-host.md(the page owningcore/src/host/) is updated instead, so CI's run has nothing to object to.src/host/only in a pure refusal path; noindex.js/ turn / delivery behaviour changed.Out of scope
applyColumnandrequeue's other behaviour.reworkOfwritten on an already accepted card (tasks.jsopenReworkpath) — reported by the audit scout without a reproduction, not confirmed, not touched here.Checkpoint
{
"pr": 2668, "claim": "Dev", "issue": 2667,
"summary": "routeToPool now refuses a handoff recorded on an accepted, cancelled or failed card with the same stale refusal blockForInput makes, before queueRole or the handoff field lands, so a finished card keeps its terminal state and claimedBy instead of sliding back to open/0%. result-ready still hands on because that column may return to working. The subsystem page states the rule and a new test covers all four end states plus the legal result-ready path.",
"files": ["core/src/host/tasks.js", "core/test/task-handoff-terminal.test.js", "patches/ds-bot/files/src/host/tasks.js", "docs/subsystems/core-host.md", "changelog.d/2667-task-handoff-terminal.fixed.md"],
"checks": { "ran": "node --test test/task-handoff-terminal.test.js test/tasks.test.js + related task suites; node scripts/ds-bot-patches.mjs check", "result": "green", "at": "7f1520c448f26a3394cf2f643806c685adb4d9fb" },
"next": "none — ready for review (T2: core/src/host, needs a PASS at the tip)"
}