Skip to content

feat(recovery): ae-a8n supervision contract の recovery-orchestrator 統合 (#408) - #412

Merged
rebuildup merged 1 commit into
release-0-8-0from
408
Nov 23, 2026
Merged

rebuildup merged 1 commit into
release-0-8-0from
408

Conversation

@rebuildup

Copy link
Copy Markdown
Contributor

概要

Epic #407 の consumer 統合 Issue #408。ae-a8n が所有する durable supervision contract(ae-a8n.supervision/v1、supervision.json + monitor.lease.json)を ae-devtools が消費し、recovery-orchestrator の verdict・failure record・diagnostics・dev-loop evidence に一貫して反映する。

GUI 監視・dialog 操作・復旧 policy の正本は ae-a8n のまま。consumer 側に独自の GUI probing / dialog pressing / 復旧ロジックは追加していない(durable state の読み取りと verdict への写像のみ)。

変更点

  • a8n-transport/supervision.mjs(新規): 唯一の consumer read path。
    • schema 検証付き decode(bounded-wait 不変条件を含む)
    • read 時の observation-health 再評価(stale heartbeat → monitor-lost)
    • needsHumanInfo(): dialog / reason / options / requiredAction / resumePath の構造化情報
    • supervisionEscalation(): phase/health → 既存 verdict 語彙への写像(escalate のみ、downgrade なし)
    • supervisionBlocksClean(): clean verdict のゲート
    • waitForSupervisionPhase(): phase deadline を尊重する常に bounded な待機
  • recovery-orchestrator: runTimeoutRecovery が attempt 前後で supervision を読み、needs-human/quarantined → quarantined、monitor-lost/unavailable/corrupt → unknown、blocked/recovering → await-original に escalate。verifyHostExit は clean を supervision の観測健全性でゲート。CLI に --session-root を追加(observe/recover/verify-exit)。diagnostics message に supervision suffix を additive に付与。
  • dev-loop / devtools-cli / MCP: a8n session が sessionRoot を公開。execute/verify の evidence に supervision snapshot を additive に付与。UNKNOWN outcome のみ --supervision-wait-ms(default 5000、0 で無効、phase deadline でも cap)で bounded な分類待機。failure diagnostics record に record.supervision。
  • run-marker 認可・ae-a8n ownership attestation は従来どおり mutation の唯一の根拠。supervision は read-only で、monitor 起動・lease 取得・AE への接触は一切行わない。

不変条件

  • monitor-lost / degraded / unavailable は決して healthy / clean にならない
  • corrupt / absent / 未来 version の state は unavailable であり、running に丸めない
  • timed-out request の再送は行わない(既存ルール維持)
  • 既存 verdict 語彙・diagnostics schema は additive のみ

検証

  • fake/mock レベル: a8n-transport(supervision.test.mjs 22件)、dev-loop(supervision.test.mjs 6件)、recovery-orchestrator(supervision verdict 系 9件追加、全 65 件 green)、devtools-cli(53 件)、mcp-server(29 件)、diagnostics(全 green)、syntax check 144 files pass
  • real host 未検証: GUI frozen 中のため ae-a8n 実 monitor との end-to-end は未確認。durable file contract のみを対象とした fake レベル検証

Refs #407, #408

…stration (#408)

Read the durable ae-a8n.supervision/v1 state (supervision.json +
monitor.lease.json) through a single consumer module and map it onto
the existing recovery verdict vocabulary without re-owning any GUI
probing, dialog pressing, or recovery policy:

- a8n-transport/supervision.mjs: schema-validated reader, read-time
  observation-health re-evaluation (stale heartbeat -> monitor-lost),
  structured needs-human info (dialogs/options/reason/resume path),
  phase->verdict escalation (never downgrades), clean-gate, and a
  bounded phase wait honouring the document deadline.
- recovery-orchestrator: runTimeoutRecovery reads supervision before
  and after the attempt and escalates (needs-human/quarantined ->
  quarantined, monitor-lost/unavailable/corrupt -> unknown, blocked/
  recovering -> await-original); verifyHostExit gates 'clean' on
  trustworthy observation; CLI gains --session-root for observe /
  recover / verify-exit; diagnostics messages carry the supervision
  suffix additively.
- dev-loop/devtools-cli/MCP: sessionRoot exposed on a8n sessions;
  evidence.supervision snapshot on every execute/verify result;
  UNKNOWN outcomes get a bounded --supervision-wait-ms classification
  window; failure diagnostics records carry record.supervision.
- monitor-lost/degraded/unavailable are never folded into healthy or
  clean; corrupt/absent/future-version state stays unavailable.

Fake/mock evidence only; real-host GUI path remains unverified.
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8c1be38b-a708-4755-b6e9-9f60f7aab16f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant