Skip to content

Reduce smoke test flakiness#2720

Merged
robgruen merged 68 commits into
mainfrom
dev/robgruen/flakey
Jul 22, 2026
Merged

Reduce smoke test flakiness#2720
robgruen merged 68 commits into
mainfrom
dev/robgruen/flakey

Conversation

@robgruen

Copy link
Copy Markdown
Collaborator

This pull request introduces a suite-wide reliability reporting system for translation tests, adds new test tolerance logic for duplicate actions, and improves error handling and test data for translation reliability. The most important changes are summarized below.

Translation reliability reporting

  • Added a new script, reliability/report.ts, which aggregates per-suite translation test results and generates a comprehensive markdown report (README.md) with metrics, trend charts, and a history log (history.json). This enables tracking the mean number of translation tokens between flaky failures (MTTF) across all translation test suites. [1] [2] [3]
  • Updated .prettierignore to exclude the auto-generated reliability report from formatting.

Test tolerance improvements

  • Introduced a new duplicateOfPrevious sentinel for extraActions in translation tests, allowing tests to tolerate cases where the model repeats its final action without accepting arbitrary extra actions. Updated type definitions and helper functions to support this. [1] [2] [3]

Error handling improvements

  • Improved error handling in fetchWithPool in restClient.ts to guard against undefined responses, preventing hard failures and better handling intermittent network issues seen in translation reliability tests.

Test data and schema updates

  • Added an actions field to HistoryContext in requestAction.ts to provide structured action history for translation prompts.
  • Updated test data in various files to include new fields and improve test coverage and reliability tracking. [1] [2]
  • Enhanced the playerManifest.json schema description for clarity and completeness.

robgruen and others added 30 commits July 15, 2026 14:17
# Conflicts:
#	ts/packages/dispatcher/dispatcher/README.AUTOGEN.md
…actions

The playerSchema.agr renamed two actions in a prior commit but the variant
fixture grammars and benchmark JSONL were left with the old names:
- `resume` → `resumePlayback`
- `playTrack` (flat params) → `playMusic` (target: { kind, ... } params)

This caused `generateAllDeltas()` to produce 466 spurious deltas (vs the 25
committed rows) because every resume and play-by-artist corpus entry created
a delta between HEAD and each variant.

Changes:
- v1-v9 variant .agr files: Resume rules updated to `resumePlayback`;
  PlaySpecificTrack rules updated to `playMusic` with target-nested params
- player.regression-benchmark.jsonl: 3 v1-lost-transport rows updated
  (actionA.actionName `resume` → `resumePlayback`)
- player.utterances.jsonl: corpus expectedAction fields updated to new names
  (resume → resumePlayback, playTrack → playMusic with new parameter structure)
- Revert test back to \"play despacito\" (no artist required)
- Add \"isOptional\": true to the artist sub-phrase in basic.json
- Add \"optional\": true to M:artist name_7 in constructions.json
  so track-only utterances (no artist) match the play construction
robgruen added 16 commits July 19, 2026 12:57
…nd doc

Opt-in reliability accounting in translateTestCommon, gated on TRANSLATION_RELIABILITY_DIR (no behavior change when unset): per suite it tallies attempts, assertion failures, per-request outcome variations, and LLM translation tokens, writing one JSON tally per suite in afterAll.

reliability/report.ts (compiled to dist/test/reliability/report.js) aggregates the tallies into reliability/README.md - the mean translation tokens between flaky failures across all suites - appends each run to reliability/history.json, and renders the trend as inline mermaid xychart charts. The generated README.md is prettier-ignored to avoid table-alignment churn.
Mirror UnknownAction.reason on ReasoningAction so the model must state why a request needs multi-step reasoning instead of a single known action. Optional, so it never blocks translation, and it surfaces in traces to diagnose deferrals.

Observed effect: in a repeat=20 full translate run this eliminated the mcpfilesystem move-file reasoning deferral (14 -> 0 escapes) and took the suite from 15 failures to 0, with no test tolerances added.
Append the recent runs to the trend, including the repeat=20 stress runs before (15 failures) and after (0 failures across 6.79M tokens) the clarify + reasoning schema fixes.
@robgruen
robgruen marked this pull request as ready for review July 22, 2026 04:31
@robgruen
robgruen enabled auto-merge July 22, 2026 04:31
@robgruen
robgruen added this pull request to the merge queue Jul 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 22, 2026
@robgruen
robgruen added this pull request to the merge queue Jul 22, 2026
Merged via the queue into main with commit 2d88fc4 Jul 22, 2026
27 checks passed
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.

3 participants