forked from Manuel/meeting-assistant
Synchronize recording lifecycle regression tests
This commit is contained in:
1 parent
0a6afafb9b
commit
eb1ee02ea8
3 files changed
+38
-3
No files matched your search
@@ -53,8 +53,14 @@ public sealed class RecordingCoordinatorTests
|
||||
{
|
||||
try
|
||||
{
|
||||
return File.Exists(path) &&
|
||||
File.ReadAllText(path).Contains(text, StringComparison.Ordinal);
|
||||
if (!File.Exists(path))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
using var stream = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete);
|
||||
using var reader = new StreamReader(stream);
|
||||
return reader.ReadToEnd().Contains(text, StringComparison.Ordinal);
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
@@ -3290,6 +3296,7 @@ public sealed class RecordingCoordinatorTests
|
||||
|
||||
await coordinator.StartAsync(CancellationToken.None);
|
||||
await audioSource.WaitUntilCapturedAsync();
|
||||
await artifactStore.WaitUntilTranscribingAsync();
|
||||
|
||||
await coordinator.StopAsync(CancellationToken.None);
|
||||
|
||||
@@ -3433,6 +3440,7 @@ public sealed class RecordingCoordinatorTests
|
||||
{
|
||||
var audioSource = new CapturedChunkThenCancelAudioSource(new AudioChunk([1, 0, 2, 0], 16000, 1));
|
||||
var artifactStore = new InMemoryMeetingArtifactStore();
|
||||
var metadataProvider = new BlockingMeetingMetadataProvider(new MeetingMetadata("Summary failure", [], "", null));
|
||||
var coordinator = new MeetingRecordingCoordinator(
|
||||
audioSource,
|
||||
new TestSpeechRecognitionPipelineFactory(new FinalSegmentOnAudioCompletionProvider()),
|
||||
@@ -3443,11 +3451,15 @@ public sealed class RecordingCoordinatorTests
|
||||
new InMemoryRecordedAudioStore(),
|
||||
new CapturingMeetingSummaryPipeline(succeeded: false),
|
||||
Options.Create(CreateOptionsWithoutFinalizer()),
|
||||
NullLogger<MeetingRecordingCoordinator>.Instance);
|
||||
NullLogger<MeetingRecordingCoordinator>.Instance,
|
||||
meetingMetadataProvider: metadataProvider);
|
||||
|
||||
await coordinator.StartAsync(CancellationToken.None);
|
||||
await metadataProvider.WaitUntilRequestedAsync();
|
||||
await audioSource.WaitUntilCapturedAsync();
|
||||
|
||||
metadataProvider.Release();
|
||||
await artifactStore.WaitUntilTranscribingAsync();
|
||||
await coordinator.StopAsync(CancellationToken.None);
|
||||
|
||||
Assert.Equal(
|
||||
@@ -3481,6 +3493,7 @@ public sealed class RecordingCoordinatorTests
|
||||
|
||||
await coordinator.StartAsync(CancellationToken.None);
|
||||
await audioSource.WaitUntilCapturedAsync();
|
||||
await artifactStore.WaitUntilTranscribingAsync();
|
||||
|
||||
await coordinator.StopAsync(CancellationToken.None);
|
||||
|
||||
@@ -4497,6 +4510,7 @@ public sealed class RecordingCoordinatorTests
|
||||
|
||||
private sealed class InMemoryMeetingArtifactStore : IMeetingArtifactStore
|
||||
{
|
||||
private readonly TaskCompletionSource transcribing = new(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||
private readonly bool createAssistantContextFile;
|
||||
private bool failNextMetadataUpdate;
|
||||
|
||||
@@ -4512,6 +4526,11 @@ public sealed class RecordingCoordinatorTests
|
||||
|
||||
public List<AssistantContextState> States { get; } = [];
|
||||
|
||||
public Task WaitUntilTranscribingAsync()
|
||||
{
|
||||
return transcribing.Task.WaitAsync(TimeSpan.FromSeconds(15));
|
||||
}
|
||||
|
||||
public string? Agenda { get; private set; }
|
||||
|
||||
public DateTimeOffset? ScheduledEnd { get; private set; }
|
||||
@@ -4553,6 +4572,10 @@ public sealed class RecordingCoordinatorTests
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
States.Add(state);
|
||||
if (state == AssistantContextState.Transcribing)
|
||||
{
|
||||
transcribing.TrySetResult();
|
||||
}
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
|
||||
+6
@@ -58,6 +58,12 @@ The summary agent SHALL be able to read and write the assistant context body as
|
||||
- **WHEN** transcription, final speaker recognition, and summary generation progress
|
||||
- **THEN** Meeting Assistant updates assistant context frontmatter state to `transcribing`, `speaker recognition`, `summarizing`, `finished`, or `error` as appropriate
|
||||
|
||||
#### Scenario: Summary failure follows initialized transcription
|
||||
- **GIVEN** a meeting has completed its initial metadata collection and reached `transcribing`
|
||||
- **WHEN** recording stops and automatic summary generation fails
|
||||
- **THEN** assistant context transitions from `transcribing` to `summarizing` and then `error`
|
||||
- **AND** observing captured audio alone does not establish that metadata collection has finished
|
||||
|
||||
#### Scenario: Summary pipeline is invoked
|
||||
- **WHEN** transcript processing finishes for the current meeting
|
||||
- **THEN** the agent can read the transcript, assistant context, user notes, glossary, and bound project knowledge, can write the finished markdown summary to the configured summary note, and can update existing project files
|
||||
|
||||
+6
@@ -27,6 +27,12 @@ A `transcript_line` trigger MAY filter by speaker name.
|
||||
- **THEN** the written transcript line contains `[redacted]`
|
||||
- **AND** the written transcript line does not contain `*****`
|
||||
|
||||
#### Scenario: Live transcript verification does not obstruct durable writes
|
||||
- **GIVEN** a live transcript line is being durably appended and then rewritten by a `transcript_line` rule
|
||||
- **WHEN** automated behavior verification observes the live transcript file
|
||||
- **THEN** its observer permits the ongoing append and rewrite rather than denying the writer access
|
||||
- **AND** verification still requires the completed transcript line to contain the transformed text and no original masked profanity
|
||||
|
||||
### Requirement: Meeting automation rules support conditions and steps
|
||||
Meeting Assistant SHALL support rule conditions using an expression engine.
|
||||
|
||||
|
||||
Reference in new issue
Block a user