aws-samples / aws-samples/sample-autonomous-cloud-coding-agents
refactor(orchestration): pure decision-function orchestrator with CAS
- 主要言語
- 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