aws-samples / aws-samples/sample-autonomous-cloud-coding-agents

refactor(orchestration): pure decision-function orchestrator with CAS

オープン
#477 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement orchestration
主要言語
TypeScript
スター
143
フォーク
46
平均マージ
3日 10時間
マージ済み PR(30日)
24

説明

**Context:** ROADMAP.md → Pure decision function orchestrator refactor
**Related:** autonomous-feedback-loop draft

---

## Component

API or orchestration

## Describe the feature

Extract orchestrator decision logic into **pure functions**: `(frozen_snapshot) → typed_action`. Side-effect execution applies actions with **CAS guards** on DynamoDB `updated_at` to prevent stale writes. Prerequisite for autonomous feedback loop.

## Use case

Orchestrator logic is hard to unit test with I/O mocks. Competing durable workers risk race conditions. Complex state machines (PR watcher) need a testable core.

## Proposed solution

1. Define `OrchestratorSnapshot` and `OrchestratorAction` types.
2. Pure `decide(snapshot): Action` with exhaustive unit tests (no AWS mocks).
3. Executor applies action with `updated_at` conditional writes.
4. Incremental refactor from current durable handlers—no big-bang.
5. Document in `docs/design/ORCHESTRATOR.md`.

## Other information

- Explicit prerequisite for **autonomous feedback loop** draft.
- Design context: `docs/design/ORCHESTRATOR.md`.

- [x] This might be a breaking change

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

ROADMAP.md と docs/design/ORCHESTRATOR.md から始め、次に issue で言及されている現在の durable orchestration handler を追跡します。snapshot と action の境界を定義し、decide(snapshot) を網羅的な unit test でカバーして、実行が updated_at の条件付き書き込みを使用し、incremental compatibility を維持していることを検証します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
aws, typescript
領域
backend-api-design, cloud, distributed-systems
issue の種類
リファクタリング
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。