PDX-512: fix(mcp): correct invalid TryCatchFinally apiId to control.Finally#221
Merged
Merged
Conversation
RCA: docs/PROVAR_TEST_STEP_REFERENCE.md, the bestPracticesEngine VALID_API_IDS allow-list and the loop prompts all referenced control.TryCatchFinally, an apiId that does not exist in Provar (the canonical control-flow step is control.Finally), and the schema also carried a doubled list.ListCompareListCompare Fix: normalized every TryCatchFinally reference to control.Finally across the reference doc, allow-list, comment and prompts; corrected the ListCompare schema apiId; added a data-driven test pinning every documented apiId to the validator allow-list; bumped version to 1.6.1 and synced server.json Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Quality Orchestrator🟢 LOW · 🧪 Tests to Run · Running 2 of 57 tests
▶ Run commandnpx vitest run \
unit/mcp/loopPrompts.test.ts \
unit/mcp/bestPracticesEngine.test.ts⚡ quality-orchestrator · |
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
com.provar.plugins.bundled.apis.control.TryCatchFinallydoes not exist in Provar — the canonical control-flow step iscom.provar.plugins.bundled.apis.control.Finally(confirmed against a live Provar project andprovar_test_step_schema.json).bestPracticesEngineVALID_API_IDSallow-list, and referenced in the loop authoring prompts — soAPI-UNKNOWN-001never flagged it and agents were steered toward generating a step Provar cannot load.list.ListCompareListCompareapiId in the schema (the correct id,list.ListCompare, was already in the doc and allow-list).Jira
https://provartesting.atlassian.net/browse/PDX-512
Changes
src/mcp/tools/bestPracticesEngine.ts: removed the invalidcontrol.TryCatchFinallyfromVALID_API_IDS(the correctcontrol.Finallywas already present); updated a stale doc comment.docs/PROVAR_TEST_STEP_REFERENCE.md: normalized all 6TryCatchFinallyreferences toFinally— table row, section heading, exampleapiId+name=, and the cleanup checklist (kept the descriptivetitle="Try/Catch/Finally").src/mcp/prompts/loopPrompts.ts: reworded two prose references fromTryCatchFinallyto "a Finally block (try/catch/finally)".src/mcp/rules/provar_test_step_schema.json: fixedListCompareListCompare→ListCompare.test/unit/mcp/bestPracticesEngine.test.ts: added a data-driven parity test that extracts every apiId documented inPROVAR_TEST_STEP_REFERENCE.mdand asserts the validator raises noAPI-UNKNOWN-001for any of them — locking the reference doc to the allow-list so the two can never silently drift again — plus explicit regressions that the bogusTryCatchFinallyis now flagged and thatcontrol.Finallypasses.package.json+server.json: bumped version 1.6.0 → 1.6.1 (kept in sync).Test plan
yarn compilepassesyarn lintpassesmcp-smoke.cjs: 29/31 PASS — the 2 failures (provar_automation_compile,provar_automation_testrun) are pre-existing environmental timeouts (require a live Provar runtime + Salesforce org), unrelated to this changePublic-docs follow-up
docs/PROVAR_TEST_STEP_REFERENCE.mdis an MCP resource served verbatim to agents. If the customer-facing docs (provar-mcp-public-docs, University of Provar course) mirror the TryCatchFinally/ListCompare step references, the Provar team should update those manually.