STEP 1583 — SiLA 2 Feature primitive v0.1 (design-import arc 3/3 完)

目的: SiLA 2 (Standardization in Lab Automation v2、 SiLA 財団策定、 gRPC ベース ラボ機器通信標準) の Feature + Command + Property + Observable + DefinedError contract を Rei stack 内 primitive として抽出。 STEP 1569 design-import register 6 ecosystem 中 6 番目 = 最後 (EPICS + QCoDeS 続き)。 本 STEP で 藤本さん directive「EPICS/QCoDeS/SiLA 2 順番に」 arc 3/3 = 完了

SiLA 2 core 4 concept

SiLA 2 概念役割Rei stack analog
Feature装置機能 group、 typed contract、 FDL 記述{identifier, displayName, commands: Map, properties: Map}
Command明示的 一回実行 action (Observable/Unobservable){name, params, returns, observable, definedErrors, execute}
Property装置 読取専用状態 (Observable なら subscribe 可){name, type, observable, cache, get, subscribers}
DefinedErrorFeature 側で 事前列挙する 型付例外{identifier, description}

D-FUMT₈ verdict — 5 primitive 全て使用 (arc 3 STEP で最も豊富)

状況verdict
Command 成功TRUE
Command 実行中 (pending / running)FLOWING (STEP 1541 pattern)
defined-error 発生 (予期例外)FALSE
undefined-error (実装 bug 疑い)NEITHER (保留)
Property 未初期化ZERO (STEP 1571 sensor no-data)
Service 内 duplicate Feature identifierBOTH (STEP 1577 冗長 継承)

API

createFeature(identifier, displayName, category?) → Feature
createCommand({name, params, returns, observable, definedErrors, execute}) → Command
createProperty({name, type, observable, get}) → Property

addCommand(feature, command)
addProperty(feature, property)

invokeCommand(feature, name, args) → Promise<CommandInvocation>
readProperty(prop) → Promise<T>                    // cache 更新 + subscriber notify
subscribeProperty(prop, cb) → unsubscribe fn      // observable のみ

invocationVerdict(inv) → D8Verdict
propertyVerdict(prop) → D8Verdict
verifyService(features) → ServiceVerdict          // 集約 + duplicate detect
propertyToNoData(prop) → SensorNoDataResult | null  // STEP 1571 bridge

test 結果 (30/30 PASS)

sectiontest
1. Feature compositionidentifier + displayName + add Command + add Property
2. Command succeedEcho → TRUE
3. Command defined-errorDivide by zero → FALSE + error identifier match
4. Command undefined-errorunlisted exception → NEITHER (保留)
5. Command not-found非存在 command → undefined_error
6. Property + subscriberuninitialized ZERO / read → TRUE + notify / unsubscribe
7. unobservable subscribe throws非 observable → throws
8. Service duplicate BOTHunique TRUE / duplicate identifier BOTH / empty ZERO
9. STEP 1571 bridgeuninitialized → SensorNoDataResult / initialized → null

Honest scope

Prior art

Design-import arc 進行状況 (完)

  1. ✅ STEP 1571 = Ophyd NotConnectedError → Rei 二層 型化
  2. ✅ STEP 1572+1573 = Tango 5 → Rei D-FUMT₈ 8 mapping
  3. ✅ STEP 1576 = Ophyd Movable/Readable → Rei 3 shape Connector Protocols
  4. ✅ STEP 1579 = Bluesky RunEngine analog for Rei MCP
  5. ✅ STEP 1581 = EPICS Channel Access primitive (severity → D-FUMT₈)
  6. ✅ STEP 1582 = QCoDeS Instrument primitive (3 abstraction + snapshot)
  7. STEP 1583 = SiLA 2 Feature primitive (5 verdict primitive 全使用) ← 本 STEP

STEP 1569 design-import register 6 ecosystem 全て輸入完了。 chat-Claude 2026-08-30 arc 指摘 「実験室制御 mature ecosystem 10+ 年」 の Rei stack 内 完全対応達成。