Commit Graph
5 Commits
Author SHA1 Message Date
can1357 c053afa087 test(agent): migrated yield tests to use YieldGate for stability
- Replaced global timer mocks with local `YieldGate` instances to avoid test flakiness from concurrent environment interference.
- Introduced an injected clock and counting sleep pattern to test gating logic without relying on `process` globals.
- Added a test case to ensure the gate correctly handles negative clock jumps without stalling.
2026-06-24 15:30:29 +02:00
can1357 9d457f73d9 test: migrated test imports to package subpath exports
- Replaced relative `../src` imports with `@oh-my-pi/pi-ai` and `@oh-my-pi/pi-agent-core` subpaths.
2026-06-08 19:03:55 +02:00
can1357 4e6f04220f chore: reformat 2026-05-31 13:04:25 +02:00
can1357 6cee7a666d test(tests): added deterministic yield tests and viewport mutation regression coverage
- Replaced real-time yield assertions with a mocked clock and scheduler wait spy to validate gate timing deterministically.
- Updated fact consolidation conflict tests to capture console warnings and verify duplicate-resolution messaging.
- Added TUI offscreen-expansion regressions for unknown-viewports, covering deferred rebuild and user-driven rebuild behavior.
2026-05-31 13:02:32 +02:00
can1357 1d8ee5a891 refactor(yield): migrated to scheduler.wait with abort support and gate
- Replaced Bun.sleep with scheduler.wait for Node-compatible cancellable sleeps.
- Added module-level timestamp gate to skip yields within 50ms of the last one.
- Threaded AbortSignal through ExponentialYield.sleep to cancel losing timers in race.
- Added tests covering gate behaviour and stray-timer cancellation.
2026-05-26 20:37:39 +02:00