Repository navigation
perf(project): normalize caption words in place - #3436
OptimistOtaku wants to merge 2 commits into
Conversation
|
@OptimistOtaku is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Thanks! Can you get CI green? Then we'll take a look. |
|
Thanks Richie. The failed macOS engine shard reported a runner disconnect, so I pushed a code-identical commit ( The fresh engine tests, all four GPUI builds, Clippy, sync tests and recording checks have passed. The performance measurement job is still running, so I can't call CI fully green yet. The two Vercel checks also require authorization from a Cap team member. No source changes were needed for the runner failure. |
|
Thanks! Can you get Greptile to 5/5 on the latest commit? Then we'll take a look. |
|
@greptileai please review the latest commit, c9acbc0, as requested above. It is an empty CI-retry commit; the source changes are identical to the previously reviewed commit. |
|
The fresh Greptile review is now 5/5 on the latest commit, |
GPUI's Whisper and Parakeet caption paths pass owned word vectors to
normalize_caption_words, which allocates a second vector and copies every retained word's text. Normalize the existing vector and strings in place, then attach punctuation before applying the existing duration cap.This retains Unicode trimming, leading/consecutive punctuation, word order, start/end float bits, caption text, and chunk boundaries. Punctuation may still grow the preceding string. No dependencies, public API, project format, or platform-specific code change.
Measurements
Native Windows x86_64, Ryzen 5 5600H, Rust 1.88 GNU, repository release profile (
opt-level=s, thin LTO). Median of nine alternating paired samples after warmups. Input batches are cloned before the timer; timings include normalization and dropping the complete output. The benchmark compares the exact upstream function against production code and checks full output equivalence before timing.A second complete run also improved every case. These are normalization timings, excluding speech recognition, model loading, and UI work.
cargo test --locked -p cap-project --release --lib benchmark_caption_word_normalization -- --ignored --nocaptureValidation
cargo fmt --all,cargo check --locked -p cap-projectcargo test --locked -p cap-project: 196 library tests and four integration tests passed; five benchmarks ignored by default, new benchmark run separately.cargo clippy --locked -p cap-project --all-targets -- -D warningsgit diff --checkDifferential cases cover Unicode/ASCII whitespace, empty tokens, punctuation chains, multilingual text, signed zero, NaN/infinite times, duration clamping, rendered text, and grouping. A separate test verifies reuse of vector and string allocations. Native GPUI launch is unverified locally. Fork Actions dispatch is disabled by GitHub; upstream PR CI will provide additional platform validation.


Confidence Score: 5/5
The empty CI-retry commit appears safe to merge.Summary
The latest commit is an empty CI retry. Source files are unchanged since the previous review.
Reviews (2) · Last reviewed commit: "chore: retry CI after macOS runner disco..." · Reviewed by Greptile