Repository navigation
fix(platform): preserve approval decisions and scope card recovery - #3881
Conversation
03dbcf1 to
325831e
Compare
Deciding a connector operation commits the approval, its audit row and its hint, and only then pokes the run parked behind it. When that poke failed (its step job's send, or the run row's update), the door answered 500 for a decision already on record: a retry met ALREADY_RESOLVED and the gate still admitted the operation, so the reviewer was told the approval failed while it went ahead. The poke only saves time. The run's own approval poll (30 s) and the liveness sweep resume it anyway, as they did in 0.4, which had no poke. decideApproval now logs a failed wake with the approval and run ids and answers the decision it committed. A refused decision still throws from inside its transaction, and each decision still wakes its run once. The checkApprovalDecisionResume lane proves it on real Postgres through the app door and the real gate. A trigger on the pg-boss job table refuses the one step insert (the send seam) and holds every other job of the lane, so the harness worker never runs one. Beside it, approve and reject wake their run once each, a duplicate and a racing decision are refused without a second job, and a cancelled run's approval takes no late decision.
The run's approval card rendered nothing while its read loaded and nothing once the read failed, so a run waiting on a decision showed no decision, no failure and no way back. The caller had already chosen the card over its waiting banner. The card now keeps saying the run waits, masks its controls in place while the read loads, and after a failed read says "Couldn't load this approval." with Try again. Only a settled answer that no such approval exists falls back to the waiting banner. Everything the card shows belongs to one approval. A new approval id (the run's next gate, or another task's run in the same sheet) mounts a fresh card, so the refusal of the previous approval, or its late answer, never shows under the next one, and a press in flight no longer holds the next approval's buttons. The subject panel and the run page are scoped the same way. The board sheet keeps the panel mounted when it opens another task, and a Request changes draft carried over; the run routes keep the page mounted across runs, and a refused stop did. A decision reports once, from its own promise. Success shows the outcome at once and refreshes the approval's own read. A failure says "Couldn't record your decision." with the refusal's own words, never a payload, and reads the approval back, so a decision someone else made first shows as the decision on record. In English, German and French, with the manual boxes APV-B4, APV-B5 and TASK-B28.
The guide to a waiting run now says what the card shows when its approval cannot be loaded, when a decision is not recorded, and when someone else decided first, in English, German and French.
325831e to
1285a1b
Compare
yannickmonney
left a comment
There was a problem hiding this comment.
One actionable keyboard-recovery issue found; inline reproduction attached. The scoped decision/state checks passed. Please resolve the retry-focus behavior before acceptance; no merge approval.
…ed-search-recovery The manual readme counts main's boxes plus this branch's six (989). Three of this branch's new boxes collided with IDs other open PRs add — TASK-F51 (#3813), TASK-B28 (#3881), TASK-B29 (#3908) — so they move to TASK-F52, TASK-B32 and TASK-B33, in the suite, pins.md and the automation register.
The Try again recovery put focus on the new control after every retry the member started that failed again, even when they had moved focus to a control that stayed on screen while it ran (a bundle tree row, the dialog's close button), or had opened another file whose own first read then failed. It now restores focus only when removing the control stranded it, on the page or on a container around it where the dialog's focus trap parks it, and opening another skill or file disarms it. The approvals card in #3881 is asked to follow the same rule. The new cases hold a retry on the network while the member acts: a move to a tree row, a move to the close button, another file opened, and the stranded control that must still recover. SKILL-A5 covers the same in a browser. Refs #3752
|
Pickup handoff, updated 3 October 2026: TALE-89 is now P1 / To do, assigned to Claude #6. The native assignment was read back. TALE-357 owns dispatch. The 23:00 Zurich manager occurrence received a native Admission is held by the current storage-maintenance lease. After its explicit release, verify current task prerequisites, branch ownership, agent availability and disk capacity, then record the bounded repair's admitted run ID. Preserve the current implementation and evidence. Resolve the still-open retry-focus P2. With the real approval card, focus Try again, press Enter, delay the retry and fail it again: the current control unmounts and strands focus on Integrate current main and resolve the branch conflicts without losing the decision-commit/read-recovery fixes. Verify the focused component/API regressions and the keyboard behavior in a real local browser, then obtain fresh exact-head required CI. Hand off the full head SHA and finding-to-test evidence to a distinct reviewer through TALE-359. The prior 44 successful checks and earlier scoped test results do not resolve this finding or certify the rebased head. |
Add the v0.5.72 highlights and upgrade guidance through #3881. Explain the required sandbox service and connected-device updates for workspace deletion confirmation. Validate the note with the release-notes and link gates, independent fact review, and all applicable hosted checks. Later changes remain in the generated PR list.
Preserve committed approval decisions and make failed reads and writes recoverable without leaking state between approvals, runs or tasks.
A failed post-commit wake used to turn an already-recorded decision into an HTTP 500. The wake is now best effort, leaving the decision transaction and its refusal behavior intact; the existing poll/liveness paths still resume the parked run. Keeping the wake after commit also preserves approval/run lock ordering.
Approval cards keep a loading frame, show a readable failed-read state with Try again, refresh the decision after a write, and scope pending/error state to the approval identity. The run page and task feedback panel similarly isolate state when switching runs or tasks. Retrying a failed read now restores stranded keyboard focus through the existing generic recovery hook, moved to
@tale/uiand reused by both skill viewers. Deliberate focus moves and late answers from a previous approval remain isolated. UI strings and approval guidance cover EN/DE/FR; manual coverage and current suite counts are updated.Current integration:
7892fdcaad2f0890b44aeed6ead3ab64533468eb, incorporating main6524150fe108180696b9364a46adfbd621349f00. Original author commits are preserved, and the prerequisite source is on main.Validation:
Closes #3706
Closes #3707
Closes #3721
Final recovery validation (2026-10-04)
Checks, Build, E2E, SAST and Commitlint all completed successfully on their first workflow attempt for
7892fdcaad2f0890b44aeed6ead3ab64533468eb. Actual hosted checkout was merge23d986fd169fde6e8d3fbb6f72b5f453db1c8c4eover base6524150fe108180696b9364a46adfbd621349f00.272f60a7cdc053621d5d87a9fdfbe22644718e26and in-place retry recovery passed the newly relevant runnerd 9 and session-view 3 tests plus real PostgreSQL 23/23 checks. Earlier 306 focused / 142 native checks remain tied to main 9b. Recovery logic, replay consumers and migrations did not change in the intervening main delta.2aa291e9dbd1f1656ee3b4aa3ff5755242e09ec3is clean (tree473d6654076493b1ea70e51ec482dc348e27d0f9). The two subsequent Home draft/product locale changes do not alter recovery code or its dependencies. No branch rewrite or hosted rerun was used.