Repository navigation
client: a later successful run of the same task never retires its failed card in the Inbox - #2536
Merged
Merged
Conversation
pnpm-free path: client.js from src/client/inbox.js, and the 0008 bundle, per the generated-file contract.
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.
Fixes #2534
Owner: Dev-3
Reviewer: Birfy
Written-by: FlyBot Dev-3
Risk tier: T1
Base: 90a5944
The defect
The Inbox chose a graph's failed workflow card from the failed runs alone: it walked the graph's
runsandhistory, kept the newest row whosestatusisfailedinside the same 7-day window Done uses, and drew that as a Needs you row. A task that failed and was then run again to a green finish therefore kept its Failed card, and the place it holds in the sidebar's Needs you count, for the whole window — even though the success sits in the same per-graph history under the sametask.id. The row has no dismiss path (openCardonly navigates, andinboxAnswerreturnsundefinedfor it), so nothing short of seven days retired it.Reproduction from the product run: one graph, same
task.id, afailedrun two hours old and adonerun thirty minutes old. On base90a59447the model still listsrun-failed.The change
runs+history: a run withstatus: 'done'and the sametask.idthat ended later means the work the failure named has since finished, and the card is dropped. The source change iscore/src/client/inbox.js, +4/−0. Nothing else moves: which failures are news, the 7-day window, the newest-failure pick, the title and reason, the graph's Runs tab and every task and turn card are untouched.core/test/inbox-workflow-failure.test.jsgains that fixture plus two controls: anothertask.idfailing on the same graph still lists, andneedsCountequals the model's ownneeds.length, so the sidebar badge cannot drift from the list.docs/subsystems/core-client.mdstates the rule on theinbox.jsrow;changelog.d/2534-inbox-stale-failed-card.fixed.mdis the fragment.generate+npm run build:core/client.jsandpatches/ds-bot/0008-client-bundle.patch, with the whole-file mirrorspatches/ds-bot/files/src/client/inbox.jsandpatches/ds-bot/files/test/inbox-workflow-failure.test.js.patches/ds-bot/0001-core-fixes.patchneeded no change and none was made: this source file is delivered through the bundle mirror.Red first
On a clean tree at base
90a594471b5886737b433e116f6397aa8ca2b6f2, carrying only the new case incore/test/inbox-workflow-failure.test.js,TZ=UTC node --import ./test/harness-resolve.mjs --test test/inbox-workflow-failure.test.jsexits 1:With the fix, the same file is 9/9/0 at the tip, and the four inbox suites together (
inbox.test.js32,inbox-workflow-failure.test.js9,inbox-readonly.test.js6,inbox-task-status.test.js3) are 50/50/0.Measurements at the tip
Measured in a clean worktree at
255db59673dc4a5c8be4fc5e510685e5f27e2f33, Node v22.23.2,TZ=UTC ARCH_DOCS_BASE=90a594471b5886737b433e116f6397aa8ca2b6f2 npm run verify→ exit 0:coreplugins/socialplugins/treeplugins/timelineplugins/workflow.github/scripts+policyarch-docs: OK (8 changed file(s)); oxlint 81 warnings and 0 errors; the four plugin lints 36 / 9 / 2 / 16 warnings and 0 errors;build-client.mjs --checkclean.Generated files:
node scripts/ds-bot-patches.mjs generaterun twice (the second run leftgit status --porcelainempty), thencheckandcanonical→ok ds-bot/ = Fei2411/DeepSeek-Bot@2b10c70 (tree 5834c00, v0.1.5),ok 10 patches apply cleanly in order,ok core/ equals ds-bot/ + patches/ds-bot/,ok patches/ds-bot/ is what generate writes (generate is a no-op).Files
8 files, +57/−2 against base
90a59447:core/src/client/inbox.jscore/test/inbox-workflow-failure.test.jsdocs/subsystems/core-client.mdchangelog.d/2534-inbox-stale-failed-card.fixed.mdcore/client.jspatches/ds-bot/0008-client-bundle.patchpatches/ds-bot/files/src/client/inbox.jspatches/ds-bot/files/test/inbox-workflow-failure.test.jsNot run
The smoke test, because no
index.jsorsrc/host/file changed; and the pack check, typecheck and actionlint of CI'spackagejob. CI runs those on this tip.Checkpoint
{ "pr": 2536, "claim": "Dev-3", "issue": 2534, "summary": "The Inbox picked each graph's failed workflow card from the failed runs alone, so a task that failed and was then run again to a green finish kept its Failed card, and its place in the sidebar's Needs you count, until the 7-day window closed. The scan now looks once more after choosing the failure: a done run of the same task.id in that graph that ended later means the work finished, and the card is dropped. Nothing else about which failures are news changes. The bundle mirrors and the client bundle follow generate.", "files": ["core/src/client/inbox.js", "core/test/inbox-workflow-failure.test.js", "docs/subsystems/core-client.md", "changelog.d/2534-inbox-stale-failed-card.fixed.md", "core/client.js", "patches/ds-bot/0008-client-bundle.patch", "patches/ds-bot/files/src/client/inbox.js", "patches/ds-bot/files/test/inbox-workflow-failure.test.js"], "checks": { "ran": "TZ=UTC ARCH_DOCS_BASE=90a59447 npm run verify (exit 0); node scripts/ds-bot-patches.mjs generate twice then check and canonical; node core/scripts/build-client.mjs --check", "result": "green", "at": "255db59673dc4a5c8be4fc5e510685e5f27e2f33" }, "next": "none — ready for review" }