a2ui-project / a2ui-project/a2ui
[FEATURE]: Inject clocks into Dart/Flutter GenUI timestamps and timeouts
- Vorherrschende Sprache
- TypeScript
- Sterne
- 16.4k
- Forks
- 1.3k
- Ø Merge
- 2 T. 13 Std.
- Gemergte PRs (30 T.)
- 134
Beschreibung
- [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.
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.