Skip to content

feat(gates): record each live line's decode time and any wall-clock step, so a late G6 line can be explained - #382

Merged
GeiserX merged 1 commit into
mainfrom
feat/g6-line-timing
Oct 10, 2026
Merged

GeiserX merged 1 commit into
mainfrom
feat/g6-line-timing

Conversation

@GeiserX

@GeiserX GeiserX commented Oct 10, 2026

Copy link
Copy Markdown
Owner

The G6 gate reports how late a line was committed, but not why. One x64 run on 2026-10-09 had every line about 2.6 s later than the others from 17 s into the call, and nothing recorded could say whether the recognizer was slow or something else happened (#379).

The change

  • With AKOU_LINE_TIMING=1 in the app's environment, the live Worker logs one line to the app log for every line it decodes after its segment closes. The line carries the decode time, the number and total time of the provisional re-decodes of that segment, and how much of the channel's audio the Worker had taken in when the decode started. It is off by default and nothing else changes.
  • scripts/gates/g6-live-latency.ts reads those lines from the app log and adds decodeMs, provisionals, provisionalMs and behindMs to each row. behindMs is how far behind the captured audio the Worker was when it started the decode.
  • The script also compares the wall clock with the monotonic clock twice a second during the run and lists every step of 50 ms or more in clockSteps. The gate reads latency off the wall clock, so a time sync that steps the clock mid-run moves every later line. A run with a step is not a measurement.

The streaming-engine path is not timed. G6 measures the recognizer path, which is what this covers.

Test

AKOU_LINE_TIMING=1 logs each decoded line's timing; without it the Worker logs none in tests/asr-live.test.ts. The control is the same audio with the variable unset: no timing line, and the same seg.

…tep, so a late G6 line can be explained

The G6 gate times a committed line off the wall clock and had no way to say
why one was late. With AKOU_LINE_TIMING=1 the live Worker now logs, for every
line it decodes after its segment closes, the decode time, the provisional
re-decodes before it and how much audio it had taken in. The gate script
joins that to each row, and it also checks the wall clock against the
monotonic one twice a second: a time sync that steps the clock mid-run moves
every later line, and the script now lists the step. Off by default.
@coderabbitai

coderabbitai Bot commented Oct 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 50 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: GeiserX/akou/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 541afe10-a8bf-4f93-9ef7-c669f3143646

📥 Commits

Reviewing files that changed from the base of the PR and between 22ffe72 and d8eb5de.


📒 Files selected for processing (3)
  • scripts/gates/g6-live-latency.ts
  • src/main/asr/live-worker.ts
  • tests/asr-live.test.ts

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@GeiserX
GeiserX merged commit 4bf4e14 into main Oct 10, 2026
29 checks passed
@GeiserX
GeiserX deleted the feat/g6-line-timing branch October 10, 2026 11:12
GeiserX added a commit that referenced this pull request Oct 10, 2026
…nd the one late run measured a clock step (#386)

G6 was Partial for one reason: one x64 run on 2026-10-09 read every line 3.77 to 4.32 s late from 17 s into the call, and nothing on record explained it (#379). This PR records a new x64 series and what it shows about that run. G6 becomes Pass.

## What the old run was

It was the box's clock, not akou. The Windows System event log shows the Windows Time service stepping the system clock forward by 2,572 ms at 09:41:48.417 UTC, which is 17.68 s into that call. The gate reads a line's latency off the wall clock, so every line committed after the step reads 2,572 ms late.

- With the step taken off, those 18 lines are 1.20 to 1.74 s, and every line is within 78 ms of the mean of the same clip in the two other embeddings runs.
- The sync is daily. On 2026-10-10 we started an eleventh run so that the sync fell inside it. The clock stepped by 2,572 ms again. Lines after it read 3.74 to 4.16 s, while their own decodes took 294 to 405 ms, the same as before the step.
- No Actions job overlapped the old run. The box's runner folders have no logs and were last used in July 2026.

The old run stays in its file and in the tables.

## The new series

Ten runs on the same Windows x64 box, five per diarizer, pinned to four performance cores with affinity `0x55`. The app is `v0.6.5` (`33b5d03e`) run from source, plus the line-timing change of #382. Both helpers are 0.6.5, built on the box. The setup is the one of 2026-10-07: fp32, beam search, 12 words, the same 24 clips.

Worst committed line per run, after the first 10 s of the call. The bar is 2.5 s.

| | Run 1 | Run 2 | Run 3 | Run 4 | Run 5 |
|---|---|---|---|---|---|
| Nemotron, mic | 1.74 s | 1.73 s | 1.74 s | 1.68 s | 1.67 s |
| Nemotron, call | 2.07 s | 2.05 s | 1.96 s | 1.90 s | 1.82 s |
| Embeddings, mic | 1.73 s | 1.73 s | 1.71 s | 1.69 s | 1.70 s |
| Embeddings, call | 1.69 s | 1.68 s | 1.68 s | 1.65 s | 1.68 s |

Every run committed 24 of 24 lines with no `asr.lag`, no clock step and no line over the bar. Each run also records every line's decode time, a CPU sample about every 1.2 s, the process list by group at start and end, and the System event log. The time goes to the recognizer: akou's processes used 179 to 218 s of CPU per run, and everything else on the box 24 to 32 s.

## What changes

- `docs/gates/g6-x64-series.json` is new. The other programs on the box are grouped, not named.
- `docs/gates/M0-results.md` gains a dated subsection, and the G6 row reads Pass.
- With #380's G7, every gate from G1 to G8 is now a plain Pass. The ROADMAP bullet and status line say so.
- The CI-28 positive control in `tests/release-evidence.test.ts` no longer relies on a live Partial gate. It checks that a `v1.0.0` dry run names no gate today. Then it sets one copied summary row to Partial, and then to a qualified Pass, and the dry run must fail on that row each time. With G6's real row set to Partial, the test goes red.
- `docs/CI-CD.md` CI-28 and the G6 budget row in `docs/TESTING.md` follow.
- In a real checkout, `stamp-version.ts --check --tag v1.0.0` after `--set 1.0.0` now reports only the missing `## 1.0.0` changelog section.

Issue #379 keeps its other half: a line takes up to 2.07 s on four x64 cores because the recognizer is busy for all of it. That is inside the bar and does not gate.
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