Repository navigation
refactor(harness): persist on-demand audio analysis - #160
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 86d3f9f075
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
| } | ||
| } | ||
| if err := service.prepareOnDemandAudioAnalysis(ctx, draftID, name, input); err != nil { |
There was a problem hiding this comment.
Honor the decision barrier before starting analysis
When a prior tool call in the same turn has created a blocking decision, prepareOnDemandAudioAnalysis still runs before beginToolCall checks blockingDecisionID. A subsequent speech.search or BGM mutation can therefore invoke paid ASR/media analysis, persist analysis/transcript rows, and emit successful Harness steps even though the tool is ultimately returned as waiting; concurrent provider tool calls make this scenario reachable. Acquire/check the turn barrier before performing these side effects.
Useful? React with 👍 / 👎.
| if cached, cacheErr := storage.LatestTranscript(ctx, exec.database.Read(), asset.ID); cacheErr == nil && | ||
| (TranscriptHasWordSchema(cached.Utterances) || cached.ProviderID == "sidecar-srt" || | ||
| exec.speechRecognizer == nil) { | ||
| return summarizeSpeechTranscript(cached, asset, true) |
There was a problem hiding this comment.
Validate the analyzer identity before reusing a transcript
When an asset already has any word-schema transcript, this early return bypasses speechTranscriptAnalyzerVersion and the content-addressed identity lookup below. After changing the configured ASR model—or editing a sidecar SRT—the Harness therefore keeps serving the old transcript indefinitely, despite the new model/sidecar digest being intended to invalidate the cache; the model can no longer request speech.transcribe to refresh it. Reuse should be conditioned on an analysis matching the current analyzer identity.
Useful? React with 👍 / 👎.
内置浏览器与持久化验收通过隔离栈:Web
本地门禁: CI run |
Summary
Acceptance
Local gates
Part of #157 (PR 3/7).