andreagrandi / andreagrandi/draftomen

Coordinate narration through the shared live session

オープン
#460 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
draftomen enhancement size: M
主要言語
Python
スター
0
フォーク
0
平均マージ
1時間 23分
マージ済み PR(30日)
181

説明

## Problem

Independent inference results can arrive after a new pick or lifecycle transition and contaminate the currently displayed recommendation.

## Proposed change

Extend the immutable session state/command boundary with model-management intentions and narration state. Publish normal recommendations before scheduling inference. Use request generations plus recommendation identity to admit every chunk/completion/error; cancel obsolete work where possible and always reject stale work. Coordinate disable/remove, account/draft/pack/recommendation changes, rescoring, stop and shutdown. Preserve deterministic fallback and bounded failure reporting/backoff according to the chosen policy. Keep event-loop scheduling and marshalling in adapters and engine facts in shared Python.

## Acceptance Criteria

- [ ] AC1: Session replay with a deliberately slow worker publishes the normal recommendation before narration begins and leaves its card, score/order and audit identity unchanged.
- [ ] AC2: Overlap/ABA tests reject every stale chunk, completion and error after a recommendation changes, even when a later recommendation has the same visible card name.
- [ ] AC3: Lifecycle tests clear obsolete narration and reject late output after account/draft changes, disable/remove, stop and shutdown.
- [ ] AC4: Failure/repeated-failure tests retain deterministic recommendations, expose diagnosable bounded errors, and avoid continuous disruptive UI retries.
- [ ] AC5: A session contract check exposes immutable model/narration state and explicit intentions without introducing frontend types or allowing a narrator to modify scoring.
- [ ] AC6: A shared-session smoke check exercises install/enable/request/disable/remove through the command boundary with the real services.

## Implementation classification

- **Estimated size:** M
- **Orchestration risk:** High
- **Reason:** Asynchronous request identity and lifecycle transitions protect against stale user-visible content.

## Dependencies

Direct prerequisites: #458, #459. Consumers: Expose local model controls in desktop Settings, Display progressive recommendation dialogue on desktop, Expose local narration and model controls in the TUI, Support explicit local narration in plain watch.

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

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

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

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