← Back to Pull requests

①失敗の種類(code)を REST から呼ぶ Service・Action の応答に足す #90

Closed
unknown closed this pull request without merging on Nov 26, 2026 00:06 UTC
View on GitHub
unknown unknown commented on Nov 25, 2026 03:45 UTC
Author

👥 担当

| 役割 | 担当者 |
| --- | --- |
| 🔍 レビュー依頼 | @tr-motomura-akira @TriorbKumagaiKazuki |
| 🔀 マージ依頼 | @tr-motomura-akira @TriorbKumagaiKazuki |

🏷️ プロセス状態

  • 🆕 新規設計

  • ✏️ 設計修正

  • 🛠️ 新規実装

  • 🔧 実装修正
  • 🔗 タスクリンク

  • Notion: https://app.notion.com/p/triorb/v2-0-0-GUI-API-41ab60b1eaf380bc8fd0ff271649c4fa

  • Issue: TriOrb-Inc/TriOrb-AMR-Tasks#201(方針の合意は TriOrb-Inc/TriOrb-AMR-Tasks#202)
  • 📋 詳細

    TriOrb-AMR-Tasks#201 の①です。BE から FE に返す HTTP ステータスを失敗の種類で決めるための、ROS 2 の型の変更です。

    変更

  • triorb_common_interface を新しく足しました

  • - msg/ErrorCode.msg:失敗の種類の定数。名前と番号は gRPC の code.proto と同じ 17 個(OK=0 〜 UNAUTHENTICATED=16)
    - srv/Trigger・srv/SetBool・srv/SetString:success・code・message を返す汎用の型(std_srvs/Trigger・std_srvs/SetBool・triorb_static_interface/SetScalarString の置き換え先)
  • REST から呼ぶ Service の応答と Action の結果に uint8 code を足しました。code を持つ型は Service 59・Action 5 になります(上の新しい 3 つを含む。足す前は GetRobotSpec の 1 つだけ)

  • success・message を持っていなかった型には、その 2 つも足しました(GetHealth・GetLicense・GetMqttBroker・GetPackageVersions・GetRos2DdsXml・GetRos2DomainId・GetRos2LocalhostOnly・GetRos2Namespace・GetTagTransformArray)

  • README_types.md を合わせました
  • 参考ブランチ PR/error-kind-code(ecb58ed)との違い

    本村さんの参考ブランチを最新の dev/v2.0.0 に載せ直したうえで、次を足しています。

  • REST の yaml から呼んでいて success・message はあるのに code が無かった 7 つの型にも code を足しました:GetCollabConfig・SetCollabConfig・GetDefaultParameters・SetDefaultParameters・SetSlamConfig・GetRobotParameters・SetRobotParameters(どれも DRAFT の型)。不要なら外します
  • 確認

  • triorb_humble(Humble)と triorb_jazzy(Jazzy)で、全 18 パッケージの colcon build が通りました

  • ③の bridge をこの型でビルドし、colcon test が通りました(85 件、失敗 0)
  • 影響

  • 型の定義が変わるので、これらの型を使うノードは作り直しが必要です

  • code を入れないノードの応答は code=0(OK)のままです。Gateway(④)は success=false で code=0 の応答を UNKNOWN(500)として返します。各ノードが種類を入れるのは⑦(本村さん担当)です

  • std_srvs・SetScalarString 自体は消していません
  • マージの順番

    TriOrb-AMR-Tasks#201 の①〜⑤は 5 本の PR に分かれていて、型が変わるため順番があります。

    1. ① TriOrb-ROS2-Types(この型が無いとほかはビルドできない)
    2. Common-Subsystems の TriOrb-ROS2-Types の pin を①のマージ後のコミットへ上げる
    3. ② TriOrb-AMR-System(system-core)・③ TriOrb-Common-Subsystems(bridge)・④ ros-openapi-gateway を同時に入れる
    4. ⑤ TriOrb-GUI-Subsystems の yaml と、GUI の back.repos(型)・Gateway の submodule の pin

    関連 PR(TriOrb-AMR-Tasks#201 の①〜⑤)

  • ① TriOrb-Inc/TriOrb-ROS2-Types#90

  • ② TriOrb-Inc/TriOrb-AMR-System#180

  • ③ TriOrb-Inc/TriOrb-Common-Subsystems#65

  • ④ TriOrb-Inc/ros-openapi-gateway#39

  • ⑤ TriOrb-Inc/TriOrb-GUI-Subsystems#124
  • ✅ セルフチェック

  • ローカルでビルド・テストが通っている

  • 関連ドキュメント / コメントを更新した

  • 破壊的変更・互換性への影響を「詳細」に記載した
  • 🤖 Generated with Claude Code

    Diff: 345 lines (+258 / -87) across 4 files Reviewer: tr-motomura-akira Review duration: 1220m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.42) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 345 lines diff across 4 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.350
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #90"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.4% (MEDIUM) · Higher = larger blast radius
    42.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.3% · Safe to merge
    18.3%