a2ui-project / a2ui-project/a2ui
[FEATURE]: Inject clocks into Dart/Flutter GenUI timestamps and timeouts
- 主要言語
- TypeScript
- スター
- 16.4k
- フォーク
- 1.3k
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 134
説明
- [x] I have searched the existing issues to make sure this feature has not already been requested.
## Is your feature request related to a problem? Please describe.
Deterministic tests cannot control all time sources in the Dart/Flutter GenUI path. Action timestamps, pending-update expiry, and widget/function timeouts can observe wall time or real timers even when the surrounding test uses Flutter's fake clock. Identical protocol input can therefore produce timing-dependent output, and timeout tests require real waits.
## Describe the Proposed Solution
Introduce public injectable clock/timer abstractions at the ownership points that create action timestamps or schedule GenUI-owned timeouts. Production defaults should retain current behavior; tests should be able to supply a monotonic fake clock and advance it without sleeping. Cover action timestamps, SurfaceController pending-update expiry, and GenUI-owned widget/client-function timeouts.
Acceptance evidence should prove identical messages and actions produce identical timestamps and timeout outcomes under an injected clock.
## Describe Alternatives Considered
Flutter WidgetTester.pump does not control every Dart/core time source. Normalizing timestamps afterward hides ordering bugs and cannot control timer behavior. Private-field patching is brittle.
## Additional Context
This concerns runtime-generated time, not A2UI protocol timestamps, and should remain independent of any one testing framework.
コントリビューションガイド
調査の方向性
Look for ownership points that create action timestamps or schedule GenUI-owned timeouts, such as SurfaceController pending-update expiry and widget/client-function timeouts. Start by examining the runtime-generated time sources in the Dart/Flutter GenUI path to understand where clock injection is needed. Verify that production defaults retain current behavior and that tests can supply a fake clock. Acceptance evidence should show identical messages and actions produce identical timestamps and timeout outcomes under an injected clock.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- dart, flutter, typescript
- 領域
- backend-api-design, testing-qa
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100