Repository navigation
feat(test): gate the language pairs, and lift the live-run rules out of the e2e - #140
Merged
Merged
Conversation
…of the e2e Two more layers of the testing system, and both found something. **A language-pair gate (`test/docs-pairing.test.ts`).** The README and `docs/quota-meter` are published twice, and every count in them is already held to the CODE — but nothing held the two LANGUAGES to each other, which is the drift that actually happens: a row added to one and not the other. It found two, immediately: - the Chinese README's settings table carried a control that no longer exists — the table listed TEN while its own prose said nine; - the Chinese README's configuration table was missing `credentialOrg`. The check compares structure: heading levels, fenced blocks, per-table body rows, and the list-item count. Prose is the translator's; a section, a code block or a table row is a fact, and a fact in one language only is invisible to whoever reads the other. The pair also disagreed about FORM in two places — one language stated the "three no-number states" as a table and the other as a list, and the "two design rules" the other way round. Both now say it the same way, which is what makes the row check fair rather than a demand for literal translation. **The live-run verdicts are now unit-tested (`test/e2e/verdict.ts`).** The rules that decide whether a live case SKIPS or FAILS used to live inside the e2e file, where only a run with a key could exercise them — so a mistake in them showed up as a red or a silently-skipped case, at the vendor's schedule. They are the rules that decide what a red run MEANS, which makes them worth more than the routing cases they gate: two of the last four rotations turned a live case red for a vendor-side reason, and each time the fix was here. The extraction also puts the picker's rule in one place (`usableAsSubject`), so the case and its picker cannot disagree about what a usable subject is. **Two coverage gaps closed where they were behavioural**, not decorative: - `decoratePlaneAdapters` on a model the catalog does not describe: the answer passes through WHOLE, with no `api`/`baseUrl` invented for a model the plugin knows nothing about (inventing one would send it to a guessed endpoint); - the hook's "cannot be served" diagnostic: a mistral model is filtered out of the picker deliberately, and the warning names the SDK that decided it — once per route/model pair, because the hook runs on every request.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two more layers of the testing system, and both found something.
A language-pair gate
test/docs-pairing.test.ts. The README anddocs/quota-meterare published twice, and every count in them is already held to the code — but nothing held the two languages to each other, which is the drift that actually happens: a row added to one and not the other.It found two, immediately:
credentialOrg.The check compares structure — heading levels, fenced blocks, per-table body rows, list-item count — because prose is the translator's business but a section, a code block or a table row is a fact, and a fact in one language only is invisible to whoever reads the other.
The pair also disagreed about form in two places (one language stated the "three no-number states" as a table and the other as a list; the "two design rules" the other way round). Both now say it the same way, which is what makes the row check fair rather than a demand for literal translation.
The live-run verdicts are unit-tested now
test/e2e/verdict.ts+test/probe-verdict.test.ts. The rules that decide whether a live case skips or fails used to live inside the e2e file, where only a run with a key could exercise them — so a mistake in them showed up as a red or a silently-skipped case, at the vendor's schedule.They are the rules that decide what a red run means, which makes them worth more than the routing cases they gate: two of the last four rotations turned a live case red for a vendor-side reason, and each time the fix was here. The extraction also puts the picker's rule in one place (
usableAsSubject), so a case and its picker cannot disagree about what a usable subject is.Two coverage gaps closed where they were behavioural
decoratePlaneAdapterson a model the catalog does not describe: the answer passes through whole — noapi/baseUrlinvented for a model the plugin knows nothing about. Inventing one would send it to a guessed endpoint, which is worse than the adapter's own answer.@ai-sdk/mistralmodel is filtered out of the picker deliberately, and the warning names the SDK that decided it — once per route/model pair, because the hook runs on every request.Verification
vp checkscripts/check.ts