Skip to content

Fix reproducible preview release performance gate - #17

Merged
qinxujunai merged 3 commits into
masterfrom
codex/voiceflow-release-performance-gate
Aug 11, 2026
Merged

Fix reproducible preview release performance gate#17
qinxujunai merged 3 commits into
masterfrom
codex/voiceflow-release-performance-gate

Conversation

@qinxujunai

Copy link
Copy Markdown
Owner

Root cause

The public release gate always reported zero preview samples because the deterministic performance collector measured only final ASR buckets. It also compared model emission batches against the capsule's one-character paint contract and timed a second start-focus capture that the real stop path does not perform.

Fix

  • collect 20 reproducible Chinese/English streaming-preview measurements with the pinned release model
  • keep recognized text out of performance evidence
  • separate model update batches from visible one-character capsule paint steps
  • time the same start-target/stop-target delivery path used by actual recording
  • document the release-machine measurements and align README, quality docs, website test count, and release notes

Fresh local evidence

  • scripts/verify.py --release: pass
  • 344 tests: pass
  • 500 lifecycle cycles: pass
  • 10,000 state-machine stress cases: pass
  • 5,000 delivery fault cases: pass
  • 50,000 safe-text fuzz cases: pass
  • 20 samples in every final and preview performance bucket
  • short stop P95 426.809 ms; medium 454.219 ms; two-minute 541.246 ms
  • preview first model delta P95 745.5 ms; first paint 793.5 ms; queue 288 ms; visible chunk 1 character

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0356a44d6f

ℹ️ 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".

Comment on lines +115 to +119
result = evaluate_pcm(
preview,
pcm,
sample_rate,
chunk_ms=40,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Time preview emissions against the wall clock

The release collector calls evaluate_pcm, which timestamps each emission from the PCM offset (end / sample_rate) rather than elapsed wall time; recognizer execution time appears only in decode_ms, which is then discarded. On a workstation where inference falls behind real time, first-delta and update-gap values can therefore remain under 1.3 seconds even though users wait much longer, allowing a slow bundled preview model to pass the latency gate.

AGENTS.md reference: AGENTS.md:L147-L149

Useful? React with 👍 / 👎.

Comment on lines +83 to +86
"preview_first_paint_ms": (
None
if first_delta_ms is None
else round(float(first_delta_ms) + 48.0, 3)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Measure actual preview paint completion

This synthesizes first paint as model-delta time plus a fixed 48 ms without creating the Qt/WebEngine overlay or awaiting its previewPainted callback. If the GUI thread is blocked, WebEngine misses frames, or the runtime coalesces a stale backlog, the evidence still reports a passing paint time, so the newly published “first visible paint” result does not test shipped rendering behavior.

AGENTS.md reference: AGENTS.md:L159-L162

Useful? React with 👍 / 👎.

"source": "deterministic_streaming_preview",
"measured_at": measured_at,
"preview_case": str(case),
"preview_first_model_delta_ms": first_delta_ms,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject missing preview deltas without crashing the gate

When a bilingual sample produces no committed preview text, evaluate_pcm returns first_delta_ms=None and this new row serializes that null value. performance_gate.analyze_history tests only for the key and then executes float(None), causing verify.py --release to raise TypeError instead of returning a failed gate for exactly the no-output regression it should diagnose.

AGENTS.md reference: AGENTS.md:L163-L164

Useful? React with 👍 / 👎.

@qinxujunai
qinxujunai merged commit 831bc6d into master Aug 11, 2026
7 checks passed
@qinxujunai
qinxujunai deleted the codex/voiceflow-release-performance-gate branch August 11, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant