Repository navigation
feat: add transactional recording sessions - #593
AnshulBhati01 wants to merge 1 commit into
Conversation
commit: |
|
Thanks for sending this over. I get the problem you're going after, since half-finished recordings from failed tests are annoying. We're going to pass on it, mostly because per-test snapshot folders already handle that case: you can delete a failed test's recordings in If you've hit a case that per-test folders don't cover, open an issue and tell me about it. Happy to figure out the right shape with you. Appreciate you taking the time on this. |
Record mode currently publishes each response as it arrives. This adds
LLMock.beginRecordingSession(testId)so a test can stage its HTTP text-generation recordings, then publish the batch withcommit()or abandon it withdiscard().Commit seals admission, waits for admitted captures and writes one batch file through an atomic rename before updating the fixture queue. Failed publication is retryable; discard, reset and shutdown release staged state. Session isolation, admission order and existing immediate recording are covered by regression tests. The README documents the API and its scope.
Validation: 365 tests pass across recording sessions, recorder, control and LLMock suites. Type checks, build, ESLint, formatting and package export checks pass. Generated API reports are included; please apply
public-api-additionfor compatibility review.