ticket: preserve typed workdir errors

This commit is contained in:
Keisuke Hirata 2026-07-13 19:59:02 +09:00
parent 60c772ec38
commit 490d5ed674
No known key found for this signature in database
3 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,23 @@
---
title: 'Preserve typed Workdir not-found errors'
state: 'planning'
created_at: '2026-07-13T10:58:32Z'
updated_at: '2026-07-13T10:59:00Z'
assignee: null
---
## 背景
Workdir detail / sync で Runtime 側に存在しない Workdir を問い合わせた時、worker-runtime は `WorkingDirectoryDiagnostic { code: working_directory_not_found }` を一度作っているにもかかわらず、RuntimeError::InvalidRequest に変換して REST error code が `invalid_request` になっている。workspace-server 側は diagnostic code の substring match で not_found を推測しており、typed error が失われて `unknown` になる。
## 要件
- Worker Runtime REST error response に Workdir diagnostic code を preserve する。
- workspace-server は diagnostic message / substring ではなく typed diagnostic code の exact match で Workdir not-found を扱う。
- Runtime に存在しない Workdir は `unknown` ではなく `not_found` / NotFound として扱える。
## 受け入れ条件
- `working_directory_not_found` が REST response の error.code として返る。
- workspace-server の `workdir_status_from_runtime_miss` が exact code match を使う。
- worker-runtime / workspace-server の関連テストが通る。

View File

@ -0,0 +1,7 @@
<!-- event: create author: "yoi ticket" at: 2026-07-13T10:58:32Z -->
## 作成
LocalTicketBackend によって作成されました。
---