Repository navigation
Collapse a conversation failure a later turn superseded; only the last failed turn offers retry (APT-1365) - #48
Merged
Merged
Conversation
…t failed turn offers retry (APT-1365)
- assistantMessage gave every failed turn's notice retry: 'turn', but retry('turn') resends only the last
failed turn. A failure followed by a later turn kept a red card whose 「もう一度試す」 did nothing and that
never went away (Craftsman, 0.6.1, draft 「test」: turn 1 timed out, the resent turn 2 succeeded).
- messagesFromDraft renders a failed turn that a later conversation turn followed as one information line
「この依頼は一度止まりました」 / "This request stopped once", without retry, detail or reference. The last
failed turn keeps its card and retry, which resends the same request. A tab's saved copy of the
superseded failure notice is not shown again.
- Mock: POST /api/v1/__mock/turn-failure {error} fails the next settling conversation turn once.
- Tests: messages.test.ts superseded-failure cases; story build-turn-retry.mock.spec.ts (old failure
collapsed without retry; last failure's retry POSTs the same message and the conversation continues).
…n's own last turn (APT-1365 review) - Review of #48: a tab's saved notice of an observed turn failure kept blocking a pending reply after the UI collapsed it, and retry('turn') resent the last turn of any kind (an Excel → app turn after the failed conversation turn). Matching saved notices by role/at/title also hid or kept the wrong ones. - Observed turn-failure notices carry the turn id; a notice naming a superseded failed turn is neither shown nor kept in the tab (withoutStaleTurnFailures), and the failure it set clears, so pending replies send. A failed send (no turn) keeps blocking until its retry, as before. - Observation, the plan-start guard and retry('turn') use the conversation's last turn (shownConversationTurns), the list the conversation renders. - A superseded policy refusal keeps its reason; only failures that offered a retry collapse. - Copy: 「この依頼は途中で止まりました」 / "This request was interrupted." - Tests: turn-id matching, language switch, policy, Excel turn after a failure, a pruning table; stories C (another tab's resend clears this tab's saved failure and a new reply is sent) and D (a failed screen-design turn does not change what 「もう一度試す」 sends).
…ntinue it (APT-1365 review 2) - Review 2 of #48: once observation and retry follow the conversation's own last turn, a draft whose Excel → app turn failed showed nothing on the build page (opened from 作りかけ), and an analysis that succeeded before a failed screen design still read as 「解析と画面の決定は済んでいます」. - When the latest Excel → app turn (analysis or screen design) failed, the conversation shows one line 「Excel から作る作業が途中で止まりました。「Excel から作る」で続けてください」 with a link 「「Excel から作る」で続ける」 to that page, which retries each step by its kind; no retry here. - Tests: stopped-step cases in messages.test.ts; story case E (a failed screen-design turn shows the line and the link to /-/excel2app?draft=<id>, no alert, no 「もう一度試す」).
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.
森さん向けの 5 行
po/lead-2026-11-14/reviews/builder-console-48-review-authz-gaps.md。既知の残り: 0.6.1 の tab に「古い失敗の通知」と「未送信の返信」が同時に保存されている稀な場合、止まりが残る(button を押すと未送信の返信が送られて解ける)。会話が止まった原因そのもの(作業環境の volume の準備待ち)は APT-1338(rc.44 で直し済み)、期限切れの文の改善は APT-1352(platform #7152、次の rc)。Summary
APT-1365.
assistantMessage(web/src/model/build/messages.ts) gave every failed conversation turn's noticeretry: 'turn', butretry('turn')(web/src/features/build/use-build-session.ts) only resends when the last draft turn is failed and nothing is pending. A failed turn followed by a later turn therefore showed a red card whose button did nothing, and the card (re-derived from the draft on every render) never went away. Seen on Craftsman (0.6.1): draft 「test」, turn 1 failed withapplication draft conversation turn timed outat 07:56Z, turn 2 (the same request resent) succeeded at 09:00Z.messagesFromDraftrenders a failed conversation turn that a later conversation turn followed, and that offered a retry, as one information notice (tone: 'info',failure.superseded) withoutretry,detailorreference. A superseded policy refusal keeps its reason. The user's request bubble stays.retry: 'turn'; pressing it resends that turn's request. Observation, the plan-start guard andretry('turn')use the conversation's last turn (shownConversationTurns), the list the conversation renders, never an Excel → app turn after it.turnId, persisted in the tab session). A notice naming a superseded failed turn is neither shown nor kept (withoutStaleTurnFailures), and the failure it set clears, so a pending reply is sent. A failed send (HTTP, no turn) keeps blocking until its retry, as before.POST /api/v1/__mock/turn-failure {error, kind?}makes the next settling turn (of that kind; default conversation) fail once with that error (reset clears it).Known risk (review 2, medium, not fixed): a 0.6.1 tab session that saved an observed-failure notice without
turnIdtogether with a pending reply keeps the reply blocked until the user presses that notice's 「もう一度試す」, which then sends the pending reply.Verification
Local (head 470c80c, Bun 1.4.2, Playwright 1.65, serialize-vm-tests local):
bun run typecheck,bun run typecheck:e2e: clean.bun test src: 2223 pass, 0 fail.src/model/build/messages.test.ts: superseded failures (collapsed only when they offered a retry; policy keeps its reason; [failed, failed] only the last retries; turn-id matching of saved notices, a different or missing turnId is still shown; language switch), the pruning table forwithoutStaleTurnFailures, an Excel turn after a failed request, and the stopped Excel → app step line.playwright test --grep @mock:build-turn-retry(A old failure collapsed without retry; B last failure's 「もう一度試す」 POSTs the same message and the conversation continues; C another tab's resend clears this tab's saved failure and a new reply is POSTed; D a failed screen-design turn after the failed request does not change what 「もう一度試す」 sends; E a failed screen-design turn shows the stopped line and a link to/-/excel2app?draft=<id>),app-create-excel2app,app-build-ai,app-build-console-conversation: 26 passed. Earlier on this branch alsobuild-failure-cause,build-run-failure,app-build-malformed-response,app-create-excel2app-set,app-create-excel2app-malformed-response: passed.console-mock-stories).