Repository navigation
test: L2 contract check and index eval on every PR - #618
Open
chaitanyakdukkipaty wants to merge 8 commits into
Open
chaitanyakdukkipaty wants to merge 8 commits into
chaitanyakdukkipaty wants to merge 8 commits into
Conversation
check:contract now runs scripts/check-contract-all.sh. It checks every capability/*.capability-index.json against its baseline, and fails when an index has no baseline. New baselines for app_accessibility, applive, devicecontrol, mobiledevicecontrol and tra record today's findings, so only new findings fail. --against <ref> adds the diff mode as a report. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…remote The ranking test read a frozen tm copy (v1.31). It now reads every shipped capability/*.capability-index.json, in the local and the remote profile (REMOTE_MCP=true), through scripts/lib/index-eval.ts. - tests/fixtures/search-eval.json moves to search-eval/tm.json. One fixture per product; tra starts with 2 cases, the others are empty (backfill track). - tests/tools/indexEval.test.ts: maxRank per case, known misses, baseline floors. A case may say "remote": "reference" or "withheld". - 51 tm cases name capabilities that v1.46 disables. They stay, and run again when a capability is enabled. - Re-pinned on v1.46, each with a why: 5 maxRanks loosened, 4 misses promoted. - eval-index.mts: --product, --profile, --fixture; --against now works for any product. The 3 scorer-behaviour tests stay on the frozen copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- tests/fixtures/product-routing-eval.json + productRoutingEval.test.ts: 34 questions run through ambiguousProducts on the shipped indexes, local and remote. Each product has a settled case. 4 wrong routes today are recorded as "known": they do not block, and fail once they route right. - indexCoverage.test.ts: every searchable capability (641) has a search-eval case or is on search-eval/allowlist.json (518 today). Stale allowlist names fail, so it shrinks as cases are added. - eval-index.mts --guard --against <ref> (npm run eval:index:guard): the allowlist only shrinks, a looser maxRank needs a new why, a removed case needs a retired entry. The rules are a pure function with unit tests. - eval-index.mts --coverage: coverage per product. - .github/CODEOWNERS: the L2 paths, commented until the QA team handle is set. - PR template: a box for capability-index changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eval # Conflicts: # package.json
main adds bug_capture (4 searchable capabilities) with a contract baseline. Each capability gets a search-eval case (6 cases, all at rank 1 in both profiles), and the routing fixture gets a settled case and a clash case: 'bug' alone is also a tm word. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d the TM name The L2 routing eval recorded 4 wrong routes. Fixed with routing_terms: - app_accessibility, web_accessibility: "accessibility scan". It was a tra word only, so "accessibility scan on my android app" went to tra. - "page" + accessibility = web_accessibility, "screen" + accessibility = app_accessibility. "page" is shared by devicecontrol and web_accessibility, and "screen" by mobiledevicecontrol and app_accessibility, so the accessibility word decides. devicecontrol drops "login page": its own term settled every login-page request on it, and its "page" term still covers browser tasks. - applive: "team". "list the apps my team uploaded" settled on tm; now the AI asks between applive and tm, as tm runs also record the app version. - tm: "test management". Naming the product did not route to it. The "open my app in app live" case is replaced: applive only lists uploads, and opening an app is runAppLiveSession, not a catalog capability. New cases cover the page and screen rules. The other routing cases are unchanged in both profiles. The tm case "create a test case in a folder" names its open defect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
…feat/mcp-l2-contract-eval
A ref that did not resolve read as 'no files', so the guard printed OK with nothing to compare. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
L2 of the MCP Server regression (walkthrough, spec section 3). It checks the capability indexes on every PR. It calls no API and no AI model. The Jenkins stage is in browserstack/browserstack-cd#27363.
Stacked on #610 (L1). Both branches have
mainmerged (L2 needs thebug_captureindex).Old, known problems are recorded once (contract baselines,
misscases, the allowlist). Only new problems fail.1. Truth: contract check on every index
check:contractrunsscripts/check-contract-all.sh. It checks everycapability/*.capability-index.json, so a new index is found by itself. An index with no baseline fails.app_accessibility,applive,devicecontrol,mobiledevicecontrol,tra.--against <ref>adds the diff mode as a report (it never fails).2. Findable: ranking on the SHIPPED indexes
scripts/lib/index-eval.ts, in 2 profiles:local, andremote(REMOTE_MCP=true).tests/fixtures/search-eval.json→search-eval/tm.json. One fixture per product.traandbug_capturehave first cases; the others are empty (backfill track).why: 5 maxRanks loosened, 4 known misses promoted. The control row ofeval-index.mts --againstshows these came from changed text in existing entries, not from new entries."remote": "reference"(found but not callable on the hosted server:local_only) or"remote": "withheld".eval-index.mts:--product,--profile,--fixture,--coverage,--guard.--againstnow works for every product.3. Right product: routing eval
42 questions run through
ambiguousProducts(the code behindlistProducts). Each product has a settled case. The eval found wrong routes, fixed here withrouting_terms(see the last commit):pageis shared by devicecontrol and web_accessibility, andscreenby mobiledevicecontrol and app_accessibility, so the accessibility word decides. devicecontrol dropslogin page: that one term settled every login-page request on it."accessibility scan"was a tra word only. app_accessibility and web_accessibility now claim it too.4. Complete: coverage and allowlist
search-eval/allowlist.json(518 today). Disabled actions do not count.Guard (CI, needs the target branch)
npm run eval:index:guard -- origin/mainfails when an allowlist name is added, a maxRank goes up (or a case becomes a miss) without a newwhy, or a case is removed without aretiredentry. The rules are a pure function with unit tests.For developers
Ticket draft (to file)
Open
.github/CODEOWNERS: the L2 paths are commented out until the QA team handle is known.Test plan
npm run lint,npx tsc --noEmit: passnpx vitest run --project unit: 2963 / 2963 pass. The L2 tests add about 16 s.npm run check:contract -- --against origin/main: 9 indexes passnpm run eval:index:guard -- origin/main: OKwhy, a case removed, a new action with no caseRUN_MCP_CHECKSafter browserstack/browserstack-cd#27363 is seeded🤖 Generated with Claude Code